View as Markdown
API Spec (JSON)
API Spec (YAML)
Compact modeHides field descriptions and other prose for a more compact, scannable view of the API reference.Deprecation notice: TheExecutes a PayPal payment that the customer has approved. You can optionally update one or more transactions when you execute the payment./v1/paymentsendpoint is deprecated. Use the/v2/paymentsendpoint instead. For details, see PayPal Checkout Basic Integration.
Important: This call works only after a customer has approved the payment. For more information, learn about PayPal payments.
Oauth 2.0 authentication
In: header
Scope: https://api.paypal.com/v1/payments/.*
application/json
TypeScript Definitions
Use the request body type in TypeScript.
transactionsobject<cart_base>[]Optionalamountobject<amount>RequiredtotalstringRequiredsubtotalstringOptionalNote: For an order authorization or capture, you cannot include the subtotal parameter.handling_feestringOptionalNote: For an order authorization or capture, you cannot include the handling_fee parameter.shipping_discountstringOptionalNote: For an order authorization or capture, you cannot include the shipping_discount parameter.insurancestringOptionalNote: For an order authorization or capture, you cannot include the insurance parameter.payeeobject<payee>OptionalemailstringOptionalsoft_descriptorstringOptional22 - len(PAYPAL * (8)) - len(Descriptor in Payment Receiving Preferences of Merchant account + 1)The PAYPAL prefix uses 8 characters.
itemsobject<item>[]Optionalcurrencystring<currency_code>Requiredshipping_addressobject<shipping_address>Optionalcountry_codestring<country_code>RequiredNote: The country code for Great Britain isGBand notUKas used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
statestringOptionalshipping_phone_numberstringOptionalapplication/json
application/json
curl -X POST "https://example.com/v1/payments/payment/string/execute" \ -H "Content-Type: application/json" \ -d '{ "payer_id": "CR87QHB7JTRSC" }'{ "id": "string", "intent": "sale", "payer": { "payment_method": "credit_card", "status": "VERIFIED", "funding_instruments": [ { "credit_card_token": { "credit_card_id": "string", "payer_id": "string", "external_customer_id": "string", "last4": "stri", "type": "string", "expire_month": 1, "expire_year": "stri" } } ], "payer_info": { "email": "[email protected]", "salutation": "string", "first_name": "string", "middle_name": "string", "last_name": "string", "suffix": "string", "payer_id": "string", "birth_date": "2019-08-24T14:15:22Z", "tax_id": "string", "tax_id_type": "BR_CPF", "billing_address": { "line1": "string", "line2": "string", "city": "string", "country_code": "st", "postal_code": "string", "state": "string", "phone": "string", "normalization_status": "UNKNOWN", "type": "string" }, "shipping_address": { "line1": "string", "line2": "string", "city": "string", "country_code": "st", "postal_code": "string", "state": "string", "phone": "string", "normalization_status": "UNKNOWN", "type": "string", "recipient_name": "string" } } }, "application_context": { "brand_name": "string", "locale": "string", "landing_page": "string", "shipping_preference": "NO_SHIPPING", "user_action": "string", "preferred_payment_source": { "token": { "id": "string", "type": "BILLING_AGREEMENT" } }, "payment_pattern": "CUSTOMER_PRESENT_ONETIME_PURCHASE" }, "transactions": [ { "amount": { "currency": "string", "total": "string", "details": { "subtotal": "string", "shipping": "string", "tax": "string", "handling_fee": "string", "shipping_discount": "string", "insurance": "string", "gift_wrap": "string" } }, "payee": { "email": "[email protected]", "merchant_id": "string" }, "description": "string", "note_to_payee": "string", "custom": "string", "invoice_number": "string", "soft_descriptor": "string", "payment_options": { "allowed_payment_method": "UNRESTRICTED" }, "item_list": { "items": [ { "sku": "string", "name": "string", "description": "string", "quantity": "string", "price": "string", "currency": "str", "tax": "string" } ], "shipping_address": { "line1": "string", "line2": "string", "city": "string", "country_code": "st", "postal_code": "string", "state": "string", "phone": "string", "normalization_status": "UNKNOWN", "type": "string", "recipient_name": "string" }, "shipping_method": "string", "shipping_phone_number": "string" }, "notify_url": "http://example.com", "related_resources": [ { "sale": { "id": "string", "amount": { "currency": "string", "total": "string", "details": { "subtotal": "string", "shipping": "string", "tax": "string", "handling_fee": "string", "shipping_discount": "string", "insurance": "string", "gift_wrap": "string" } }, "payment_mode": "INSTANT_TRANSFER", "state": "completed", "reason_code": "CHARGEBACK", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE", "clearing_time": "2019-08-24T14:15:22Z", "payment_hold_status": "HELD", "payment_hold_reasons": [ { "payment_hold_reason": "PAYMENT_HOLD" } ], "transaction_fee": { "currency": "string", "value": "string" }, "receivable_amount": { "currency": "string", "value": "string" }, "transaction_fee_in_receivable_currency": { "currency": "string", "value": "string" }, "exchange_rate": "string", "fmf_details": { "filter_type": "ACCEPT", "filter_id": "AVS_NO_MATCH", "name": "string", "description": "string" }, "receipt_id": "string", "parent_payment": "string", "processor_response": { "response_code": "stri", "avs_code": "s", "cvv_code": "s", "advice_code": "01_NEW_ACCOUNT_INFORMATION", "eci_submitted": "string", "vpas": "string" }, "billing_agreement_id": "string", "create_time": "2019-08-24T14:15:22Z", "update_time": "2019-08-24T14:15:22Z", "links": [ { "href": "string", "rel": "string", "method": "GET" } ] }, "authorization": { "id": "string", "amount": { "currency": "string", "total": "string", "details": { "subtotal": "string", "shipping": "string", "tax": "string", "handling_fee": "string", "shipping_discount": "string", "insurance": "string", "gift_wrap": "string" } }, "payment_mode": "INSTANT_TRANSFER", "state": "pending", "reason_code": "AUTHORIZATION", "pending_reason": "AUTHORIZATION", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE", "fmf_details": { "filter_type": "ACCEPT", "filter_id": "AVS_NO_MATCH", "name": "string", "description": "string" }, "parent_payment": "string", "processor_response": { "response_code": "stri", "avs_code": "s", "cvv_code": "s", "advice_code": "01_NEW_ACCOUNT_INFORMATION", "eci_submitted": "string", "vpas": "string" }, "valid_until": "2019-08-24T14:15:22Z", "create_time": "2019-08-24T14:15:22Z", "update_time": "2019-08-24T14:15:22Z", "receipt_id": "string", "links": [ { "href": "string", "rel": "string", "method": "GET" } ] }, "order": { "id": "string", "amount": { "currency": "string", "total": "string", "details": { "subtotal": "string", "shipping": "string", "tax": "string", "handling_fee": "string", "shipping_discount": "string", "insurance": "string", "gift_wrap": "string" } }, "payment_mode": "INSTANT_TRANSFER", "state": "PENDING", "reason_code": "PAYER_SHIPPING_UNCONFIRMED", "pending_reason": "payer_shipping_unconfirmed", "protection_eligibility": "ELIGIBLE", "protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE", "parent_payment": "string", "fmf_details": { "filter_type": "ACCEPT", "filter_id": "AVS_NO_MATCH", "name": "string", "description": "string" }, "create_time": "2019-08-24T14:15:22Z", "update_time": "2019-08-24T14:15:22Z", "links": [ { "href": "string", "rel": "string", "method": "GET" } ] }, "capture": { "id": "string", "amount": { "currency": "string", "total": "string", "details": { "subtotal": "string", "shipping": "string", "tax": "string", "handling_fee": "string", "shipping_discount": "string", "insurance": "string", "gift_wrap": "string" } }, "is_final_capture": false, "state": "pending", "reason_code": "CHARGEBACK", "parent_payment": "string", "invoice_number": "string", "transaction_fee": { "currency": "string", "value": "string" }, "transaction_fee_in_receivable_currency": { "currency": "string", "value": "string" }, "receivable_amount": { "currency": "string", "value": "string" }, "exchange_rate": "string", "note_to_payer": "string", "create_time": "2019-08-24T14:15:22Z", "update_time": "2019-08-24T14:15:22Z", "links": [ { "href": "string", "rel": "string", "method": "GET" } ] }, "refund": { "id": "string", "amount": { "currency": "string", "total": "string", "details": { "subtotal": "string", "shipping": "string", "tax": "string", "handling_fee": "string", "shipping_discount": "string", "insurance": "string", "gift_wrap": "string" } }, "state": "pending", "reason": "string", "invoice_number": "string", "sale_id": "string", "capture_id": "string", "parent_payment": "string", "description": "string", "create_time": "2019-08-24T14:15:22Z", "update_time": "2019-08-24T14:15:22Z", "links": [ { "href": "string", "rel": "string", "method": "GET" } ] } } ] } ], "state": "created", "experience_profile_id": "string", "note_to_payer": "string", "redirect_urls": { "return_url": "http://example.com", "cancel_url": "http://example.com" }, "failure_reason": "UNABLE_TO_COMPLETE_TRANSACTION", "create_time": "2019-08-24T14:15:22Z", "update_time": "2019-08-24T14:15:22Z", "links": [ { "href": "string", "rel": "string", "method": "GET" } ]}