# Paypal API ## API Docs - Authorization [Generate access_token](https://jt97ovxf53.apifox.cn/api-103384626.md): Shows user profile information. Filters the response by a schema. Supported schema value is `paypalv1.1`. - Authorization [Terminate access_token](https://jt97ovxf53.apifox.cn/api-103384627.md): - Authorization [User Info](https://jt97ovxf53.apifox.cn/api-103384628.md): Shows user profile information. Filters the response by a schema. Supported schema value is `paypalv1.1`. - Authorization [Generate client_token](https://jt97ovxf53.apifox.cn/api-103384629.md): - Orders [Create order](https://jt97ovxf53.apifox.cn/api-103384630.md): Creates an order.
Note: For error handling and troubleshooting, see Orders v2 errors.- Orders [Show order details](https://jt97ovxf53.apifox.cn/api-103384631.md): Shows details for an order, by ID.
Note: For error handling and troubleshooting, see Orders v2 errors.- Orders [Update order](https://jt97ovxf53.apifox.cn/api-103384632.md): Updates an order with a `CREATED` or `APPROVED` status. You cannot update an order with the `COMPLETED` status.
"/purchase_units/@reference_id=='default'/{attribute-or-object}"
.Note: For error handling and troubleshooting, see Orders v2 errors.Patchable attributes or objects:
Attribute | Op | Notes |
---|---|---|
intent | replace | |
payer | replace, add | Using replace op for payer will replace the whole payer object with the value sent in request. |
purchase_units | replace, add | |
purchase_units[].custom_id | replace, add, remove | |
purchase_units[].description | replace, add, remove | |
purchase_units[].payee.email | replace | |
purchase_units[].shipping.name | replace, add | |
purchase_units[].shipping.address | replace, add | |
purchase_units[].shipping.type | replace, add | |
purchase_units[].soft_descriptor | replace, remove | |
purchase_units[].amount | replace | |
purchase_units[].invoice_id | replace, add, remove | |
purchase_units[].payment_instruction | replace | |
purchase_units[].payment_instruction.disbursement_mode | replace | By default, disbursement_mode is INSTANT . |
purchase_units[].payment_instruction.platform_fees | replace, add, remove |
Note: For error handling and troubleshooting, see Orders v2 errors.- Orders [Capture payment for order](https://jt97ovxf53.apifox.cn/api-103384634.md): Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.
Note: For error handling and troubleshooting, see Orders v2 errors.- Payments [Show details for authorized payment](https://jt97ovxf53.apifox.cn/api-103384635.md): Shows details for an authorized payment, by ID. - Payments [Reauthorize authorized payment](https://jt97ovxf53.apifox.cn/api-103384636.md): Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires.
Note: This request is currently not supported for Partner use cases.- Payments [Void authorized payment](https://jt97ovxf53.apifox.cn/api-103384637.md): Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured. - Payments [Capture authorized payment](https://jt97ovxf53.apifox.cn/api-103384638.md): Captures an authorized payment, by ID. - Payments [Show captured payment details](https://jt97ovxf53.apifox.cn/api-103384639.md): Shows details for a captured payment, by ID. - Payments [Refund captured payment](https://jt97ovxf53.apifox.cn/api-103384640.md): Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an
amount
object in the JSON request body.
- Payments [Show refund details](https://jt97ovxf53.apifox.cn/api-103384641.md): Shows details for a refund, by ID.
- Invoices > Invoices [Generate invoice number](https://jt97ovxf53.apifox.cn/api-103384642.md): Generates the next invoice number that is available to the merchant. The next invoice number uses the prefix and suffix from the last invoice number and increments the number by one. For example, the next invoice number after `INVOICE-1234` is `INVOICE-1235`.
- Invoices > Invoices [Create draft invoice](https://jt97ovxf53.apifox.cn/api-103384643.md): Creates a draft invoice. To move the invoice from a draft to payable state, you must send the invoice.invoice
object must include an items
array.Note: The merchant that you specify in an invoice must have a PayPal account in good standing.. - Invoices > Invoices [Show invoice details](https://jt97ovxf53.apifox.cn/api-103384644.md): Shows details for an invoice, by ID. - Invoices > Invoices [List invoices](https://jt97ovxf53.apifox.cn/api-103384645.md): Lists invoices. To filter the invoices that appear in the response, you can specify one or more optional query parameters. - Invoices > Invoices [Generate QR code](https://jt97ovxf53.apifox.cn/api-103384646.md): Generates a QR code for an invoice, by ID. The QR code is a PNG image in Base64-encoded format that corresponds to the invoice ID. You can generate a QR code for an invoice and add it to a paper or PDF invoice. When customers use their mobile devices to scan the QR code, they are redirected to the PayPal mobile payment flow where they can view the invoice and pay online with PayPal or a credit card. Before you get a QR code, you must create an invoice and send an invoice to move the invoice from a draft to payable state. Do not include an email address if you do not want the invoice emailed. - Invoices > Invoices [Fully update invoice](https://jt97ovxf53.apifox.cn/api-103384647.md): Fully updates an invoice, by ID. In the JSON request body, include a complete `invoice` object. This call does not support partial updates. - Invoices > Invoices [Send invoice](https://jt97ovxf53.apifox.cn/api-103384648.md): Sends or schedules an invoice, by ID, to be sent to a customer. The action depends on the invoice issue date:
send_to_recipient
parameter to false
in the notification
object. The send_to_recipient
parameter does not apply to a future issue date because the invoice is scheduled to be sent through PayPal on that date.Notes:- Invoices > Invoices [Send invoice reminder](https://jt97ovxf53.apifox.cn/api-103384649.md): Sends a reminder to the payer about an invoice, by ID. In the JSON request body, include a `notification` object that defines the subject of the reminder and other details. - Invoices > Invoices [Cancel sent invoice](https://jt97ovxf53.apifox.cn/api-103384650.md): Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and CC: emails. - Invoices > Invoices [Delete invoice](https://jt97ovxf53.apifox.cn/api-103384651.md): Deletes a draft or scheduled invoice, by ID. Deletes invoices in the draft or scheduled state only. For invoices that have already been sent, you can cancel the invoice. After you delete a draft or scheduled invoice, you can no longer use it or show its details. However, you can reuse its invoice number. - Invoices > Invoices [Search for invoices](https://jt97ovxf53.apifox.cn/api-103384652.md): Searches for and lists invoices that match search criteria. If you pass multiple criteria, the response lists invoices that match all criteria. - Invoices > Invoices [Record payment for invoice](https://jt97ovxf53.apifox.cn/api-103384653.md): Records a payment for the invoice. If no payment is due, the invoice is marked as `PAID`. Otherwise, the invoice is marked as `PARTIALLY PAID`. - Invoices > Invoices [Delete external payment](https://jt97ovxf53.apifox.cn/api-103384654.md): Deletes an external payment, by invoice ID and transaction ID. - Invoices > Invoices [Record refund for invoice](https://jt97ovxf53.apifox.cn/api-103384655.md): Records a refund for the invoice. If all payments are refunded, the invoice is marked as `REFUNDED`. Otherwise, the invoice is marked as `PARTIALLY REFUNDED`. - Invoices > Invoices [Delete external refund](https://jt97ovxf53.apifox.cn/api-103384656.md): Deletes an external refund, by invoice ID and transaction ID. - Invoices > Templates [List templates](https://jt97ovxf53.apifox.cn/api-103384657.md): Lists merchant-created templates with associated details. The associated details include the emails, addresses, and phone numbers from the user's PayPal profile.
- After you send an invoice, resending it has no effect.
- To send a notification for updates, update the invoice and set the
send_to_recipient
body parameter totrue
.
Note: Every merchant starts with three PayPal system templates that are optimized for the unit type billed. The template includes `Quantity`, `Hours`, and `Amount`.- Invoices > Templates [Show template details](https://jt97ovxf53.apifox.cn/api-103384659.md): Shows details for a template, by ID. - Invoices > Templates [Fully update template](https://jt97ovxf53.apifox.cn/api-103384660.md): Fully updates a template, by ID. In the JSON request body, include a complete `template` object. This call does not support partial updates. - Invoices > Templates [Delete template](https://jt97ovxf53.apifox.cn/api-103384661.md): Deletes a template, by ID. - Subscriptions > Catalog Products [Create product](https://jt97ovxf53.apifox.cn/api-103384662.md): Creates a product. - Subscriptions > Catalog Products [List products](https://jt97ovxf53.apifox.cn/api-103384663.md): Lists products. - Subscriptions > Catalog Products [Show product details](https://jt97ovxf53.apifox.cn/api-103384664.md): Shows details for a product, by ID. - Subscriptions > Catalog Products [Update product](https://jt97ovxf53.apifox.cn/api-103384665.md): Updates a product, by ID. You can patch these attributes and objects:
Attribute or object | Operations |
---|---|
description | add, replace, remove |
category | add, replace, remove |
image_url | add, replace, remove |
home_url | add, replace, remove |
Attribute or object | Operations |
---|---|
description | replace |
payment_preferences.auto_bill_outstanding | replace |
taxes.percentage | replace |
payment_preferences.payment_failure_threshold | replace |
payment_preferences.setup_fee | replace |
payment_preferences.setup_fee_failure_action | replace |
name | replace |
ACTIVE
or SUSPENDED
status. You can override plan level default attributes by providing customised values for plan path in the patch request.Attribute or object | Operations |
---|---|
billing_info.outstanding_balance | replace |
custom_id | add,replace |
plan.billing_cycles[@sequence==n]. | add,replace |
plan.billing_cycles[@sequence==n]. | replace |
plan.billing_cycles[@sequence==n]. | replace |
plan.payment_preferences. | replace |
plan.payment_preferences. | replace |
plan.taxes.inclusive | add,replace |
plan.taxes.percentage | add,replace |
shipping_amount | add,replace |
start_time | replace |
subscriber.shipping_address | add,replace |
subscriber.payment_source (for subscriptions funded | replace |
Notes:- Payouts [Show payout batch details](https://jt97ovxf53.apifox.cn/api-103384684.md): Shows the latest status of a batch payout. Includes the transaction status and other data for individual payout items. - Payouts [Show payout item details](https://jt97ovxf53.apifox.cn/api-103384685.md): Shows details for a payout item, by ID. A
PayPal does not process duplicate payouts. If you specify a
sender_batch_id
that was used in the last 30 days, the API rejects the request with an error message that shows the duplicatesender_batch_id
and includes a HATEOAS link to the original payout with the samesender_batch_id
.If you receive an HTTP
5nn
status code, you can safely retry the request with the samesender_batch_id
.The Payouts API does not support build notation (BN) codes. In a future Payouts release, you can optionally provide BN codes in the
PayPal-Partner-Attribution-Id
request header.For information about the
PayPal-Partner-Attribution-Id
header, see HTTP request headers. To learn about or request a BN code, contact your partner manager or see PayPal Partner Program.
payout_item_id
helps you identify denied payments. If a payment is denied, you can use the payout_item_id
to identify the payment even if it lacks a transaction_id
.
- Payouts [Cancel unclaimed payout item](https://jt97ovxf53.apifox.cn/api-103384686.md): Cancels an unclaimed payout item, by ID. If no one claims the unclaimed item within 30 days, the API automatically returns the funds to the sender. Use this call to cancel the unclaimed item before the automatic 30-day refund. You can cancel payout items with a transaction_status
of UNCLAIMED
.
- Webhooks [List available events](https://jt97ovxf53.apifox.cn/api-103384687.md): Lists available events to which any webhook can subscribe. For a list of supported events, see [Webhook event names](https://developer.paypal.com/docs/api/notifications/webhooks/event-names/).
- Webhooks [Create webhook](https://jt97ovxf53.apifox.cn/api-103384688.md): Subscribes your webhook listener to events. For testing create a sample webhook endpoint on https://pipedream.com/ to receive webhook events sent by PayPal.
- Webhooks [List webhooks](https://jt97ovxf53.apifox.cn/api-103384689.md): Lists webhooks for an app.
- Webhooks [Show webhook details](https://jt97ovxf53.apifox.cn/api-103384690.md): Shows details for a webhook, by ID.
- Webhooks [List event notifications](https://jt97ovxf53.apifox.cn/api-103384691.md): Lists webhooks event notifications. Use query parameters to filter the response.
- Webhooks [List event subscriptions for webhook](https://jt97ovxf53.apifox.cn/api-103384692.md): Lists event subscriptions for a webhook, by ID.
- Webhooks [Show event notification details](https://jt97ovxf53.apifox.cn/api-103384693.md): Shows details for a webhooks event notification, by ID.
- Webhooks [Trigger a sample event](https://jt97ovxf53.apifox.cn/api-103384694.md): Creates a product.
- Webhooks [Verify webhook signature](https://jt97ovxf53.apifox.cn/api-103384695.md): Verifies a webhook signature.
- Webhooks [Resend event notification](https://jt97ovxf53.apifox.cn/api-103384696.md): Resends a webhook event notification, by ID. Any pending notifications are not resent.
- Webhooks [Simulate webhook event](https://jt97ovxf53.apifox.cn/api-103384697.md): Use the `/simulate-event` resource to use a sample payload to simulate a webhook event. The events that this call generates only serve to validate the connection to the listener URL and to show how webhook events look. Note: You can also use the Webhooks simulator to simulate webhook events.- Webhooks [Update webhook](https://jt97ovxf53.apifox.cn/api-103384698.md): Updates a webhook to replace webhook fields with new values. Supports only the `replace` operation. Pass a `json_patch` object with `replace` operation and `path`, which is `/url` for a URL or `/event_types` for events. The `value` is either the URL or a list of events. - Webhooks [Delete webhook](https://jt97ovxf53.apifox.cn/api-103384699.md): Deletes a webhook, by ID. - Shipment Tracking [Add tracking information for multiple PayPal transactions](https://jt97ovxf53.apifox.cn/api-103384700.md): Adds tracking information, with or without tracking numbers, for multiple PayPal transactions. Accepts up to 20 tracking IDs. For more information, see Add tracking information with tracking numbers and Add tracking information without tracking numbers. - Shipment Tracking [Show tracking information](https://jt97ovxf53.apifox.cn/api-103384701.md): Shows tracking information, by tracker ID, for a PayPal transaction. - Shipment Tracking [Update or cancel tracking information for PayPal transaction](https://jt97ovxf53.apifox.cn/api-103384702.md): Updates or cancels the tracking information for a PayPal transaction, by ID. To cancel tracking information, call this method and set the status to CANCELLED. For more information, see Update or cancel tracking information. - Transaction Search [List transactions](https://jt97ovxf53.apifox.cn/api-103384703.md): Lists transactions. Specify one or more query parameters to filter the transaction that appear in the response.
Notes:- Transaction Search [List all balances](https://jt97ovxf53.apifox.cn/api-103384704.md): List all balances. Specify date time to list balances for that time that appear in the response.
- If you specify one or more optional query parameters, the
ending_balance
response field is empty.- It takes a maximum of three hours for executed transactions to appear in the list transactions call.
- This call lists transaction for the previous three years.
Notes:- Disputes [List disputes](https://jt97ovxf53.apifox.cn/api-103384705.md): Lists disputes with a summary set of details, which shows the
- It takes a maximum of three hours for balances to appear in the list balances call.
- This call lists balances upto the previous three years.
dispute_id
, reason
, status
, dispute_state
, dispute_life_cycle_stage
, dispute_channel
, dispute_amount
, create_time
and update_time
fields.page_size
query parameter.page_size=2
start_time
instead of disputed_transaction_id
Note: The fields that appear in the response depend on whether you access this call through first- or third-party access. For example, if the merchant shows dispute details through third-party access, the customer's email ID does not appear.- Disputes [Accept claim](https://jt97ovxf53.apifox.cn/api-103384707.md): Accepts liability for a claim, by ID. When you accept liability for a claim, the dispute closes in the customer’s favor and PayPal automatically refunds money to the customer from the merchant's account. Allowed accept_claim_type values for the request is available in dispute details allowed response options object. - Disputes [Appeal dispute](https://jt97ovxf53.apifox.cn/api-103384708.md): Appeals a dispute, by ID. To appeal a dispute, use the
appeal
link in the HATEOAS links from the show dispute details response. If this link does not appear, you cannot appeal the dispute. Submit new evidence as a document or notes in the JSON request body. The following rules apply to document file types and sizes:Important: This method is for sandbox use only.Settles a dispute in either the customer's or merchant's favor. Merchants can make this call in the sandbox to complete end-to-end dispute resolution testing, which mimics the dispute resolution that PayPal agents normally complete. To make this call, the dispute
status
must be UNDER_REVIEW
.
- Disputes [Update dispute status](https://jt97ovxf53.apifox.cn/api-103384710.md): Important: This method is for sandbox use only.Updates the status of a dispute, by ID, from
UNDER_REVIEW
to either:WAITING_FOR_BUYER_RESPONSE
WAITING_FOR_SELLER_RESPONSE
status
must be UNDER_REVIEW
. Specify an action
value in the JSON request body to indicate whether the status change enables the customer or merchant to submit evidence:If action is | The status updates to |
---|---|
BUYER_EVIDENCE | WAITING_FOR_BUYER_RESPONSE |
SELLER_EVIDENCE | WAITING_FOR_SELLER_RESPONSE |
WAITING_FOR_SELLER_RESPONSE
status while customers can provide evidence for disputes with the WAITING_FOR_BUYER_RESPONSE
status. Evidence can be a proof of delivery or proof of refund document or notes, which can include logs. A proof of delivery document includes a tracking number while a proof of refund document includes a refund ID. For other evidence type, notes and documents can be given. The following rules apply to document file types and sizes: