On this page
No Headings
OAuth 2.0 authentication
Client CredentialsToken URLhttps://api-m.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/payments/payment/authcaptureThe PayPal-generated ID for the authorized payment to capture.
^[\S\s]*$0 <= length <= 2147483647A unique ID identifying the request header for idempotency purposes.
^.*$1 <= length <= 10000The preferred server response upon successful completion of the request. Value is:return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.return=representation. The server returns a complete resource representation, including the current state of the resource.
"return=minimal"^[\S\s]*$0 <= length <= 2147483647Holds authorization information for external API calls.
^.*$1 <= length <= 16000Header for an API client-provided JWT assertion that identifies the merchant. Establishing the consent to act-on-behalf of a merchant is a prerequisite for using this header.
^.*$1 <= length <= 10000application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-m.paypal.com/v2/payments/authorizations/0VF52814937998046/capture" \ -H "PayPal-Request-Id: 17e81d06-77ab-11e8-adc0-fa71639ebebc" \ -H "Prefer: return=representation" \ -H "Authorization: Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ" \ -H "PayPal-Auth-Assertion: eyJhbGciOiJub25lIn0.eyJlbWFpbCI6Im15QGVtYWlsLmNvbSJ9" \ -H "Content-Type: application/json" \ -d '{ "amount": { "value": "10.99", "currency_code": "USD" }, "invoice_id": "INVOICE-123", "final_capture": true, "note_to_payer": "If the ordered color is not available, we will substitute with a different color free of charge.", "soft_descriptor": "Bob\'s Custom Sweaters" }'{
"id": "23T524207X938445J",
"amount": {
"currency_code": "USD",
"value": "100.00"
},
"final_capture": false,
"seller_protection": {
"status": "ELIGIBLE",
"dispute_categories": [
"ITEM_NOT_RECEIVED",
"UNAUTHORIZED_TRANSACTION"
]
},
"seller_receivable_breakdown": {
"gross_amount": {
"currency_code": "USD",
"value": "1.00"
},
"paypal_fee": {
"currency_code": "USD",
"value": "0.52"
},
"net_amount": {
"currency_code": "USD",
"value": "0.48"
},
"exchange_rate": {}
},
"invoice_id": "OrderInvoice-10_10_2024_12_58_20_pm",
"status": "COMPLETED",
"create_time": "2024-10-14T21:29:26Z",
"update_time": "2024-10-14T21:29:26Z",
"links": [
{
"href": "https://api-m.paypal.com/v2/payments/captures/23T524207X938445J",
"rel": "self",
"method": "GET"
},
{
"href": "https://api-m.paypal.com/v2/payments/captures/23T524207X938445J/refund",
"rel": "refund",
"method": "POST"
},
{
"href": "https://api-m.paypal.com/v2/payments/authorizations/6DR965477U7140544",
"rel": "up",
"method": "GET"
}
]
}{
"id": "2GG279541U471931P",
"status": "COMPLETED",
"links": [
{
"rel": "self",
"method": "GET",
"href": "https://api-m.paypal.com/v2/payments/captures/2GG279541U471931P"
},
{
"rel": "refund",
"method": "POST",
"href": "https://api-m.paypal.com/v2/payments/captures/2GG279541U471931P/refund"
},
{
"rel": "up",
"method": "GET",
"href": "https://api-m.paypal.com/v2/payments/authorizations/0VF52814937998046"
}
]
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "90bff07028f7f",
"details": [
{
"field": "/invoice_id",
"value": "ABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZABCDEFGHIJKLMNOPQRSTUVXYZ_this_invoice_is_too_long",
"issue": "INVALID_STRING_MAX_LENGTH",
"description": "The value of a field is too long."
}
]
}{
"name": "AUTHENTICATION_FAILURE",
"debug_id": "b1d1f06c7246c",
"message": "Authentication failed due to missing Authorization header, or invalid authentication credentials."
}{
"name": "NOT_AUTHORIZED",
"debug_id": "b1d1f06c7246c",
"message": "Authorization failed due to insufficient permissions."
}{
"name": "RESOURCE_NOT_FOUND",
"debug_id": "b1d1f06c7246c",
"message": "The specified resource does not exist."
}{
"name": "RESOURCE_CONFLICT",
"debug_id": "b1d1f06c7246c",
"message": "The server has detected a conflict while processing this request.",
"details": [
{
"issue": "PREVIOUS_REQUEST_IN_PROGRESS",
"description": "A previous request on this resource is currently in progress. Please wait for some time and try again. It is best to space out the initial and the subsequent request(s) to avoid receiving this error."
}
]
}{
"name": "UNPROCCESSABLE_ENTITY",
"message": "The requested action could not be completed, is semantically incorrect, or failed business validation.",
"debug_id": "90bff07028f7f",
"details": [
{
"field": "/amount/value",
"value": "10.99",
"issue": "MAX_CAPTURE_AMOUNT_EXCEEDED",
"description": "Capture amount specified exceeded allowable limit. You can only capture up to the original authorization amount.",
"location": "body"
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"debug_id": "b1d1f06c7246c",
"message": "An internal server error has occurred."
}{
"name": "INTERNAL_SERVER_ERROR",
"debug_id": "b1d1f06c7246c",
"message": "An internal server error has occurred."
}The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
^[\S\s]*$1 <= length <= 127An informational note about this settlement. Appears in both the payer's transaction history and the emails that the payer receives.
^[\S\s]*$1 <= length <= 255Indicates whether you can make additional captures against the authorized payment. Set to true if you do not intend to capture additional payments against the authorization. Set to false if you intend to capture additional payments against the authorization.
falseThe payment descriptor on the payer's account statement.
^[\S\s]*$0 <= length <= 22