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.Note: For error handling and troubleshooting, see Orders v2 errors.
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/payments/paymenthttps://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchantsPreferstringOptionalreturn=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.PayPal-Client-Metadata-Idstring<guid>Optionalapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
payment_sourceobject<payment_source>Optionalcardobject<card_request>OptionalNote: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
expirystring<date_year_month>Optionaltypeenum<card_type>Optionalbrandenum<card_brand>Optionalbilling_addressobject<address_portable>Optionaladmin_area_4stringOptionaladmin_area_3stringOptionaladmin_area_1stringOptionalcountry_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.
address_detailsobject<Address Details>Optionalattributesobject<card_attributes>Optionalcustomerobject<card_customer>Optionalidstring<merchant_partner_customer_id>Optionalemail_addressstring<email>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
phoneobject<phone_with_type>Optionalphone_typeenum<phone_type>Optionalphone_numberobject<phone>Requiredcountry_codestring<country_calling_code>Requirednational_numberstringRequirednameobject<name>Optionalvaultobject<vault_instruction_base>Optionalstore_in_vaultenum<store_in_vault_instruction>Optionalverificationobject<card_verification>OptionalmethodenumOptionalvault_idstring<vault_id>Optionalsingle_use_tokenstring<single_use_token>Optionalstored_credentialobject<card_stored_credential>Optionalpayment_initiatorenum<payment_initiator>Requiredpayment_typeenum<stored_payment_source_payment_type>Requiredusageenum<stored_payment_source_usage_type>Optionalprevious_network_transaction_referenceobject<network_transaction_reference>OptionalidstringRequireddatestringOptionalnetworkenum<card_brand>Optionalnetwork_tokenobject<network_token_request>Optionalexpirystring<date_year_month>Requiredeci_flagenum<eci_flag>Optionaltoken_requestor_idstringOptionalexperience_contextobject<card_experience_context>Optionaltokenobject<token>Optionalpaypalobject<paypal_wallet>Optionalvault_idstring<vault_id>Optionalemail_addressstring<email>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
nameobject<name>Optionalphoneobject<phone_with_type>Optionalphone_typeenum<phone_type>Optionalphone_numberobject<phone>Requiredcountry_codestring<country_calling_code>Requirednational_numberstringRequiredbirth_datestring<date_no_time>Optionaltax_infoobject<tax_info>Optionaladdressobject<address_portable>Optionaladmin_area_4stringOptionaladmin_area_3stringOptionaladmin_area_1stringOptionalcountry_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.
address_detailsobject<Address Details>Optionalattributesobject<paypal_wallet_attributes>Optionalcustomerobject<paypal_wallet_customer>Optionalidstring<merchant_partner_customer_id>Optionalemail_addressstring<email>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
phoneobject<phone_with_type>Optionalphone_typeenum<phone_type>Optionalphone_numberobject<phone>Requiredcountry_codestring<country_calling_code>Requirednational_numberstringRequirednameobject<name>Optionalvaultobject<vault_paypal_wallet_base>Optionalstore_in_vaultenum<store_in_vault_instruction>Optionalusage_patternenumOptionalshippingobject<shipping_detail>Optionalnameobject<name>Optionalemail_addressstring<email_address>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
phone_numberobject<phone>Optionalcountry_codestring<country_calling_code>Requirednational_numberstringRequiredtypeenumOptionaloptionsobject<shipping_option>[]OptionallabelstringRequiredtypeenum<shipping_type>Optionalamountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredselectedbooleanRequiredaddressobject<address_portable>Optionaladmin_area_4stringOptionaladmin_area_3stringOptionaladmin_area_1stringOptionalcountry_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.
address_detailsobject<Address Details>Optionalusage_typeenumRequiredcustomer_typeenumOptionalpermit_multiple_payment_tokensbooleanOptionalexperience_contextobject<paypal_wallet_experience_context>OptionalNote: Partners and Marketplaces might configurebrand_nameandshipping_preferenceduring partner account setup, which overrides the request values.
localestring<language>Optionalshipping_preferenceenumOptionalcontact_preferenceenumOptionalapp_switch_contextobject<app_switch_context>Optionalnative_appobject<native_app_context>Optionalmobile_webobject<mobile_web_context>Optionallanding_pageenumOptionaluser_actionenumOptionalpayment_method_preferenceenumOptionalorder_update_callback_configobject<callback_configuration>Optionalcallback_urlstringRequiredbilling_agreement_idstring<billing_agreement_id>Optionalstored_credentialobject<paypal_wallet_stored_credential>Optionalpayment_initiatorenum<payment_initiator>Requiredcharge_patternenum<charge_pattern>OptionalDeprecated| See |
|---|
| usage_pattern |
usage_patternenum<charge_pattern>Optionalusageenum<stored_payment_source_usage_type>Optionalbancontactobject<bancontact_request>Optionalnamestring<full_name>Requiredcountry_codestring<country_code-2>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.
experience_contextobject<experience_context_base>Optionallocalestring<language>Optionalshipping_preferenceenumOptionalblikobject<blik_request>Optionalnamestring<full_name>Requiredcountry_codestring<country_code-2>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.
emailstring<email_address>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
experience_contextobject<blik_experience_context>Optionallocalestring<language>Optionalshipping_preferenceenumOptionalconsumer_ipstring<ip_address>Optionallevel_0object<blik_seamless>Optionalone_clickobject<blik_one_click>Optionalepsobject<eps_request>Optionalnamestring<full_name>Requiredcountry_codestring<country_code-2>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.
experience_contextobject<experience_context_base>Optionallocalestring<language>Optionalshipping_preferenceenumOptionalgiropayobject<giropay_request>Optionalnamestring<full_name>Requiredcountry_codestring<country_code-2>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.
experience_contextobject<experience_context_base>Optionallocalestring<language>Optionalshipping_preferenceenumOptionalidealobject<ideal_request>Optionalnamestring<full_name>Requiredcountry_codestring<country_code-2>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.
bicstring<bic>Optionalexperience_contextobject<experience_context_base>Optionallocalestring<language>Optionalshipping_preferenceenumOptionalmybankobject<mybank_request>Optionalnamestring<full_name>Requiredcountry_codestring<country_code-2>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.
experience_contextobject<experience_context_base>Optionallocalestring<language>Optionalshipping_preferenceenumOptionalp24object<p24_request>Optionalnamestring<full_name>Requiredemailstring<email_address>RequiredNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
country_codestring<country_code-2>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.
experience_contextobject<experience_context_base>Optionallocalestring<language>Optionalshipping_preferenceenumOptionalsofortobject<sofort_request>Optionalnamestring<full_name>Requiredcountry_codestring<country_code-2>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.
experience_contextobject<experience_context_base>Optionallocalestring<language>Optionalshipping_preferenceenumOptionaltrustlyobject<trustly_request>Optionalnamestring<full_name>Requiredcountry_codestring<country_code-2>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.
emailstring<email_address>RequiredNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
experience_contextobject<experience_context_base>Optionallocalestring<language>Optionalshipping_preferenceenumOptionalapple_payobject<apple_pay_request>Optionalnamestring<full_name>Optionalemail_addressstring<email_address>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
phone_numberobject<phone_number_without_country_code>Optionalnational_numberstringRequireddecrypted_tokenobject<apple_pay_decrypted_token_data>Optionaltransaction_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtokenized_cardobject<card>Requiredexpirystring<date_year_month>Optionaltypeenum<card_type>Optionalbrandenum<card_brand>Optionalbilling_addressobject<address_portable>Optionaladmin_area_4stringOptionaladmin_area_3stringOptionaladmin_area_1stringOptionalcountry_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.
address_detailsobject<Address Details>Optionalattributesobject<card_attributes>Optionalcustomerobject<card_customer>Optionalidstring<merchant_partner_customer_id>Optionalemail_addressstring<email>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
phoneobject<phone_with_type>Optionalphone_typeenum<phone_type>Optionalphone_numberobject<phone>Requiredcountry_codestring<country_calling_code>Requirednational_numberstringRequirednameobject<name>Optionalvaultobject<vault_instruction_base>Optionalstore_in_vaultenum<store_in_vault_instruction>Optionalverificationobject<card_verification>OptionalmethodenumOptionalpayment_data_typeenumOptionalpayment_dataobject<apple_pay_payment_data>Optionalstored_credentialobject<card_stored_credential>Optionalpayment_initiatorenum<payment_initiator>Requiredpayment_typeenum<stored_payment_source_payment_type>Requiredusageenum<stored_payment_source_usage_type>Optionalprevious_network_transaction_referenceobject<network_transaction_reference>OptionalidstringRequireddatestringOptionalnetworkenum<card_brand>Optionalvault_idstring<vault_id>Optionalattributesobject<apple_pay_attributes>Optionalcustomerobject<customer>Optionalidstring<merchant_partner_customer_id>Optionalemail_addressstring<email>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
phoneobject<phone_with_type>Optionalphone_typeenum<phone_type>Optionalphone_numberobject<phone>Requiredcountry_codestring<country_calling_code>Requirednational_numberstringRequirednameobject<name>Optionalvaultobject<v3_vault_instruction_base>Optionalstore_in_vaultenum<store_in_vault_instruction>Requiredexperience_contextobject<apple_pay_experience_context>Optionalgoogle_payobject<google_pay_request>Optionalnamestring<full_name>Optionalemail_addressstring<email_address>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
phone_numberobject<phone_number>Optionalcountry_codestring<country_calling_code>Requirednational_numberstringRequiredcardobject<google_pay_card>Optionalexpirystring<date_year_month>Optionaltypeenum<card_type>Optionalbrandenum<card_brand>Optionalbilling_addressobject<address_portable>Optionaladmin_area_4stringOptionaladmin_area_3stringOptionaladmin_area_1stringOptionalcountry_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.
address_detailsobject<Address Details>Optionaldecrypted_tokenobject<google_pay_decrypted_token_data>Optionalcardobject<google_pay_card>Requiredexpirystring<date_year_month>Requiredtypeenum<card_type>Optionalbrandenum<card_brand>Optionalbilling_addressobject<address_portable>Optionaladmin_area_4stringOptionaladmin_area_3stringOptionaladmin_area_1stringOptionalcountry_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.
address_detailsobject<Address Details>Optionalauthentication_methodenumRequiredassurance_detailsobject<assurance_details>Optionalcard_holder_authenticatedbooleanOptionalexperience_contextobject<google_pay_experience_context>Optionalvenmoobject<venmo_wallet_request>Optionalvault_idstring<vault_id>Optionalemail_addressstring<email>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
experience_contextobject<venmo_wallet_experience_context>OptionalNote: Partners and Marketplaces might configure shipping_preference during partner account setup, which overrides the request values.shipping_preferenceenumOptionalorder_update_callback_configobject<callback_configuration>Optionalcallback_urlstringRequireduser_actionenumOptionalattributesobject<venmo_wallet_attributes>Optionalcustomerobject<venmo_wallet_customer>Optionalidstring<merchant_partner_customer_id>Optionalemail_addressstring<email>OptionalNote: Up to 64 characters are allowed before and 255 characters are allowed after the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
phoneobject<phone_with_type>Optionalphone_typeenum<phone_type>Optionalphone_numberobject<phone>Requiredcountry_codestring<country_calling_code>Requirednational_numberstringRequirednameobject<name>Optionalvaultobject<vault_venmo_wallet_base>Optionalstore_in_vaultenum<store_in_vault_instruction>Requiredusage_patternenumOptionalusage_typeenumRequiredcustomer_typeenumOptionalpermit_multiple_payment_tokensbooleanOptionalcryptoobject<crypto_request>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.
nameobject<crypto_account_holder_name>Requiredexperience_contextobject<experience_context_base_without_brand_shipping>Requiredlocalestring<language>Optionalapplication/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v2/checkout/orders/5O190127TN364715T/authorize" \ -H "PayPal-Request-Id: 17e81d06-77ab-11e8-adc0-fa71639ebebc" \ -H "PayPal-Client-Metadata-Id: 1295065d-6f34-42dc-ac65-fac0c86af250" \ -H "Authorization: Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ" \ -H "PayPal-Auth-Assertion: eyJhbGciOiJub25lIn0.eyJlbWFpbCI6Im15QGVtYWlsLmNvbSJ9" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "5O190127TN364715T", "status": "COMPLETED", "payment_source": { "paypal": { "name": { "given_name": "John", "surname": "Doe" }, "account_status": "VERIFIED", "email_address": "customer@example.com", "account_id": "QYR5Z8XDVJNXQ" } }, "purchase_units": [ { "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b", "shipping": { "address": { "address_line_1": "2211 N First Street", "address_line_2": "Building 17", "admin_area_2": "San Jose", "admin_area_1": "CA", "postal_code": "95131", "country_code": "US" } }, "payments": { "authorizations": [ { "id": "0AW2184448108334S", "status": "CREATED", "amount": { "currency_code": "USD", "value": "100.00" }, "seller_protection": { "status": "ELIGIBLE", "dispute_categories": [ "ITEM_NOT_RECEIVED", "UNAUTHORIZED_TRANSACTION" ] }, "expiration_time": "2018-05-01T21:20:49Z", "create_time": "2018-04-01T21:20:49Z", "update_time": "2018-04-01T21:20:49Z", "links": [ { "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S", "rel": "self", "method": "GET" }, { "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/capture", "rel": "capture", "method": "POST" }, { "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/void", "rel": "void", "method": "POST" }, { "href": "https://api-m.paypal.com/v2/payments/authorizations/0AW2184448108334S/reauthorize", "rel": "reauthorize", "method": "POST" } ] } ] } } ], "payer": { "name": { "given_name": "John", "surname": "Doe" }, "email_address": "customer@example.com", "payer_id": "QYR5Z8XDVJNXQ" }, "links": [ { "href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T", "rel": "self", "method": "GET" } ]}