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.Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/payments/paymentPayPal-Transmission-Timestring<date_time>Requiredapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
shipping_addressobject<address_portable>Optionaladdress_line_1string<currency_code>Optionaladdress_line_2string<currency_code>Optionaladdress_line_3string<currency_code>Optionaladmin_area_4string<currency_code>Optionaladmin_area_3string<currency_code>Optionaladmin_area_2string<currency_code>Optionaladmin_area_1string<currency_code>Optionalpostal_codestring<currency_code>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.
address_detailsobject<Address Details>Optionalstreet_namestring<currency_code>Optionalstreet_typestring<currency_code>Optionaldelivery_servicestring<currency_code>Optionalbuilding_namestring<currency_code>OptionalCraven House.sub_buildingstring<currency_code>Optionalshipping_optionobject<shipping_option>Optionalidstring<currency_code>Requiredlabelstring<currency_code>Requiredtypeenum<shipping_type>Optionalamountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredselectedbooleanRequiredpurchase_unitsobject<purchase_unit_request>[]Requiredreference_idstring<currency_code>Optionalamountobject<amount_with_breakdown>Requiredcurrency_codestring<currency_code>RequiredvaluestringRequiredbreakdownobject<amount_breakdown>Optionalitem_totalobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredshippingobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredhandlingobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtax_totalobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredinsuranceobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredshipping_discountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequireddiscountobject<discount_with_breakdown>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredpayeeobject<payee>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.
merchant_idstring<account_id>Optionalpayment_instructionobject<payment_instruction>Optionalplatform_feesobject<platform_fee>[]Optionalamountobject<money>Requiredcurrency_codestring<currency_code>RequiredvaluestringRequiredpayeeobject<payee_base>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.
merchant_idstring<account_id>Optionaldisbursement_modeenum<disbursement_mode>Optionalpayee_pricing_tier_idstringOptionaldescriptionstring<currency_code>OptionalThis field supports up to 3,000 characters, but any content beyond 127 characters (including spaces) will be truncated. The 127 character limit is reflected in the response representation of this field.The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length.
custom_idstring<currency_code>Optionalinvoice_idstring<currency_code>Optionalsoft_descriptorstring<currency_code>OptionalThis field supports up to 127 characters, but any content beyond 22 characters (including spaces) will be truncated. The 22 character limit is reflected in the response representation of this field.The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement.
PAYPAL_prefix+(space)+merchant_descriptor+(space)+ soft_descriptorNote: The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/editThe
PAYPAL prefix uses 8 characters. Only the first 22 characters will be displayed in the statement. PAYPAL *.Janes Gift.800-123-1234.PAYPAL * Janes Gift 80.itemsobject<item_request>[]Optionalnamestring<currency_code>RequiredThis field supports up to 3000 characters, but any content beyond 127 characters (including spaces) will be truncated. The 127 character limit is reflected in the response representation of this field.
unit_amountobject<money>Requiredcurrency_codestring<currency_code>RequiredvaluestringRequiredtaxobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequireddescriptionstring<currency_code>OptionalThis field supports up to 4000 characters, but any content beyond 2048 characters (including spaces) will be truncated. The 2048 character limit is reflected in the response representation of this field.
skustring<currency_code>OptionalcategoryenumOptionalupcobject<universal_product_code>Optionalbilling_planobject<order_billing_plan>Optionalbilling_cyclesobject<billing_cycle>[]Requiredtenure_typeenumRequiredpricing_schemeobject<pricing_scheme>Optionalpriceobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredpricing_modelenumRequiredreload_threshold_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtotal_cyclesintegerOptional1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles).start_datestring<date_no_time>Optionalsetup_feeobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredshippingobject<shipping_detail>Optionalnameobject<name>Optionalprefixstring<currency_code>Optionalgiven_namestring<currency_code>Optionalsurnamestring<currency_code>Optionalmiddle_namestring<currency_code>Optionalsuffixstring<currency_code>Optionalfull_namestring<currency_code>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>[]Optionalidstring<currency_code>Requiredlabelstring<currency_code>Requiredtypeenum<shipping_type>Optionalamountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredselectedbooleanRequiredaddressobject<address_portable>Optionaladdress_line_1string<currency_code>Optionaladdress_line_2string<currency_code>Optionaladdress_line_3string<currency_code>Optionaladmin_area_4string<currency_code>Optionaladmin_area_3string<currency_code>Optionaladmin_area_2string<currency_code>Optionaladmin_area_1string<currency_code>Optionalpostal_codestring<currency_code>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.
address_detailsobject<Address Details>Optionalstreet_namestring<currency_code>Optionalstreet_typestring<currency_code>Optionaldelivery_servicestring<currency_code>Optionalbuilding_namestring<currency_code>OptionalCraven House.sub_buildingstring<currency_code>Optionalsupplementary_dataobject<supplementary_data>Optionalcardobject<card_supplementary_data>Optionallevel_2object<level_2_card_processing_data>Optionalinvoice_idstringOptionaltax_totalobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredlevel_3object<level_3_card_processing_data>Optionalshipping_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredduty_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequireddiscount_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredshipping_addressobject<address_portable>Optionaladdress_line_1string<currency_code>Optionaladdress_line_2string<currency_code>Optionaladdress_line_3string<currency_code>Optionaladmin_area_4string<currency_code>Optionaladmin_area_3string<currency_code>Optionaladmin_area_2string<currency_code>Optionaladmin_area_1string<currency_code>Optionalpostal_codestring<currency_code>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.
address_detailsobject<Address Details>Optionalstreet_namestring<currency_code>Optionalstreet_typestring<currency_code>Optionaldelivery_servicestring<currency_code>Optionalbuilding_namestring<currency_code>OptionalCraven House.sub_buildingstring<currency_code>Optionalline_itemsobject<line_item>[]Optionaldescriptionstring<currency_code>Optionalskustring<currency_code>Optionalupcobject<universal_product_code>Optionalbilling_planobject<order_billing_plan>Optionalbilling_cyclesobject<billing_cycle>[]Requiredtenure_typeenumRequiredpricing_schemeobject<pricing_scheme>Optionalpriceobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredpricing_modelenumRequiredreload_threshold_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtotal_cyclesintegerOptional1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles).start_datestring<date_no_time>Optionalsetup_feeobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredunit_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtaxobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredcommodity_codestringOptionaldiscount_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtotal_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredunit_of_measurestringOptionalriskobject<risk_supplementary_data>Optionalcustomerobject<participant_metadata>Optionalip_addressstring<ip_address>Optionalapplication/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v2/checkout/orders/order-update-callback" \ -H "Authorization: Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ" \ -H "PayPal-Transmission-Id: 69cd13f0-d67a-11e5-baa3-778b53f4ae55" \ -H "PayPal-Transmission-Time: 2016-02-18T20:01:35Z" \ -H "PayPal-Cert-Url: https://api-m.paypal.com/v1/notifications/certs/CERT-1234567890" \ -H "PayPal-Transmission-Sig: lmI95Jx3Y9nhR5SJWlHVIWpg4AgFk7n9bCHSRxbrd8A9zrhdu2rMyFrmz+Zjh3s3boXB07VXCXUZy/UFzUlnGJn0wDugt7FlSvdKeIJenLRemUxYCPVoEZzg9VFNqOa48gMkvF+XTpxBeUx/kWy6B5cp7GkT2+pOowfRK7OaynuxUoKW3JcMWw272VKjLTtTAShncla7tGF+55rxyt2KNZIIqxNMJ48RDZheGU5w1npu9dZHnPgTXB9iomeVRoD8O/jhRpnKsGrDschyNdkeh81BJJMH4Ctc6lnCCquoP/GzCzz33MMsNdid7vL/NIWaCsekQpW26FpWPi/tfj8nLA==" \ -H "PayPal-Auth-Algo: SHA256withRSA" \ -H "Content-Type: application/json" \ -d '{ "id": "8HFTASDATTV", "shipping_address": { "country_code": "US", "admin_area_1": "TX", "admin_area_2": "Dallas", "postal_code": "75001" }, "purchase_units": [ { "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b", "amount": { "currency_code": "USD", "value": "100.00" } } ] }'{ "id": "8HFTASDATTV", "purchase_units": { "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b", "amount": { "currency_code": "USD", "value": "105.00", "breakdown": { "item_total": { "currency_code": "USD", "value": "100.00" }, "tax_total": { "currency_code": "USD", "value": "5.00" }, "shipping": { "currency_code": "USD", "value": "0.00" } } }, "shipping_options": [ { "id": "1", "amount": { "currency_code": "USD", "value": "0.00" }, "type": "SHIPPING", "label": "Free Shipping", "selected": true }, { "id": "2", "amount": { "currency_code": "USD", "value": "7.00" }, "type": "SHIPPING", "label": "USPS Priority Shipping", "selected": false }, { "id": "3", "amount": { "currency_code": "USD", "value": "10.00" }, "type": "SHIPPING", "label": "1-Day Shipping", "selected": false } ] }}