On this page
No Headings
Note: For error handling and troubleshooting, see Orders v2 errors.
Oauth 2.0 authentication
Client CredentialsToken URLhttps://api-m.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/payments/paymenthttps://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchantsA unique ID identifying the request header for idempotency purposes.
^.*$1 <= length <= 10000PayPal Partner can send a PayPal-Partner-Attribution-Id request header with the value that they have been assigned by the PayPal Partner program. This value is known as a BN Code. In order to reward such partners (through partner programs), all the activities (including API calls) that they are doing on behalf of the merchants need to be tracked.
^[\S\s]*$1 <= length <= 36A GUID value originating from Fraudnet and Dyson passed from external API clients via HTTP header. The value is used by Risk decisions to correlate calls which, in turn, might result in lower decline rates..
^[A-Za-z0-9-{}(),]*$1 <= length <= 68The 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"^[a-zA-Z=,-]*$1 <= length <= 25Holds 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
curl -X POST "https://api-m.paypal.com/v2/checkout/orders" \ -H "PayPal-Request-Id: 17e81d06-77ab-11e8-adc0-fa71639ebebc" \ -H "PayPal-Client-Metadata-Id: 1295065d-6f34-42dc-ac65-fac0c86af250" \ -H "Prefer: return=representation" \ -H "Authorization: Bearer A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ" \ -H "PayPal-Auth-Assertion: eyJhbGciOiJub25lIn0.eyJlbWFpbCI6Im15QGVtYWlsLmNvbSJ9" \ -H "Content-Type: application/json" \ -d '{ "intent": "CAPTURE", "payment_source": { "paypal": { "experience_context": { "payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED", "landing_page": "LOGIN", "shipping_preference": "GET_FROM_FILE", "user_action": "PAY_NOW", "return_url": "https://example.com/returnUrl", "cancel_url": "https://example.com/cancelUrl" } } }, "purchase_units": [ { "invoice_id": "90210", "amount": { "currency_code": "USD", "value": "230.00", "breakdown": { "item_total": { "currency_code": "USD", "value": "220.00" }, "shipping": { "currency_code": "USD", "value": "10.00" } } }, "items": [ { "name": "T-Shirt", "description": "Super Fresh Shirt", "unit_amount": { "currency_code": "USD", "value": "20.00" }, "quantity": "1", "category": "PHYSICAL_GOODS", "sku": "sku01", "image_url": "https://example.com/static/images/items/1/tshirt_green.jpg", "url": "https://example.com/url-to-the-item-being-purchased-1", "upc": { "type": "UPC-A", "code": "123456789012" } }, { "name": "Shoes", "description": "Running, Size 10.5", "sku": "sku02", "unit_amount": { "currency_code": "USD", "value": "100.00" }, "quantity": "2", "category": "PHYSICAL_GOODS", "image_url": "https://example.com/static/images/items/1/shoes_running.jpg", "url": "https://example.com/url-to-the-item-being-purchased-2", "upc": { "type": "UPC-A", "code": "987654321012" } } ] } ] }'{
"id": "5O190127TN364715T",
"status": "PAYER_ACTION_REQUIRED",
"payment_source": {
"paypal": {}
},
"links": [
{
"href": "https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T",
"rel": "self",
"method": "GET"
},
{
"href": "https://www.paypal.com/checkoutnow?token=5O190127TN364715T",
"rel": "payer-action",
"method": "GET"
}
]
}{
"id": "8K832279M55989614",
"intent": "AUTHORIZE",
"status": "COMPLETED",
"payment_source": {
"paypal": {
"email_address": "buyer@paypal.com",
"account_id": "XQHSN372NGSP2",
"account_status": "UNVERIFIED",
"name": {
"given_name": "Tom",
"surname": "Business"
},
"phone_number": {
"national_number": "8127081430"
},
"address": {
"country_code": "US"
},
"stored_credential": {
"payment_initiator": "MERCHANT",
"usage": "SUBSEQUENT",
"usage_pattern": "RECURRING_PREPAID"
}
}
},
"purchase_units": [
{
"reference_id": "default",
"amount": {
"currency_code": "USD",
"value": "100.00"
},
"payee": {
"email_address": "seller@paypal.com",
"merchant_id": "Q7C9N6S4YRQXG"
},
"shipping": {
"name": {
"full_name": "Tom Business"
},
"address": {
"address_line_1": "123 Fake St.",
"admin_area_2": "Baton Rouge",
"admin_area_1": "LA",
"postal_code": "70802",
"country_code": "US"
}
},
"payments": {
"authorizations": [
{
"status": "CREATED",
"id": "7X550106NA4440028",
"amount": {
"currency_code": "USD",
"value": "100.00"
},
"seller_protection": {
"status": "ELIGIBLE",
"dispute_categories": [
"UNAUTHORIZED_TRANSACTION"
]
},
"expiration_time": "2024-06-05T18:46:54Z",
"links": [
{
"href": "https://api-m.paypal.com/v2/payments/authorizations/7X550106NA4440028",
"rel": "self",
"method": "GET"
},
{
"href": "https://api-m.paypal.com/v2/payments/authorizations/7X550106NA4440028/capture",
"rel": "capture",
"method": "POST"
},
{
"href": "https://api-m.paypal.com/v2/payments/authorizations/7X550106NA4440028/void",
"rel": "void",
"method": "POST"
},
{
"href": "https://api-m.paypal.com/v2/checkout/orders/8K832279M55989614",
"rel": "up",
"method": "GET"
}
],
"create_time": "2024-05-07T18:46:54Z",
"update_time": "2024-05-07T18:46:54Z"
}
]
}
}
],
"payer": {
"name": {
"given_name": "Tom",
"surname": "Business"
},
"email_address": "buyer@paypal.com",
"payer_id": "XQHSN372NGSP2",
"phone": {
"phone_number": {
"national_number": "8127081430"
}
},
"address": {
"country_code": "US"
}
},
"create_time": "2024-05-07T18:46:15Z",
"update_time": "2024-05-07T18:46:54Z",
"links": [
{
"href": "https://api-m.paypal.com/v2/checkout/orders/8K832279M55989614",
"rel": "self",
"method": "GET"
}
]
}{
"create_time": "string",
"update_time": "string",
"id": "string",
"payment_source": {
"card": {
"name": "string",
"last_digits": "string",
"brand": "VISA",
"available_networks": [
"VISA"
],
"type": "CREDIT",
"authentication_result": {
"liability_shift": "NO",
"three_d_secure": {
"authentication_status": "Y",
"enrollment_status": "Y"
}
},
"attributes": {
"vault": {
"id": "string",
"status": "VAULTED",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET",
"title": "string",
"mediaType": "string",
"encType": "application/json",
"schema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
},
"targetSchema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
}
}
],
"customer": {
"id": "string",
"email_address": "string",
"phone": {
"phone_type": "FAX",
"phone_number": {
"country_code": "str",
"national_number": "string",
"extension_number": "string"
}
},
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string",
"suffix": "string",
"full_name": "string"
},
"merchant_customer_id": "string"
}
}
},
"from_request": {
"expiry": "string",
"last_digits": "stri"
},
"expiry": "string",
"bin_details": {
"bin": "string",
"issuing_bank": "string",
"bin_country_code": "string",
"products": [
"string"
]
},
"stored_credential": {
"payment_initiator": "CUSTOMER",
"payment_type": "ONE_TIME",
"usage": "FIRST",
"previous_network_transaction_reference": {
"id": "stringstr",
"date": "stri",
"network": "VISA",
"acquirer_reference_number": "string"
}
}
},
"paypal": {
"email_address": "string",
"account_id": "string",
"account_status": "VERIFIED",
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string",
"suffix": "string",
"full_name": "string"
},
"phone_type": "FAX",
"phone_number": {
"national_number": "string"
},
"birth_date": "string",
"business_name": "string",
"tax_info": {
"tax_id": "string",
"tax_id_type": "BR_CPF"
},
"address": {
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"admin_area_4": "string",
"admin_area_3": "string",
"admin_area_2": "string",
"admin_area_1": "string",
"postal_code": "string",
"country_code": "st",
"address_details": {
"street_number": "string",
"street_name": "string",
"street_type": "string",
"delivery_service": "string",
"building_name": "string",
"sub_building": "string"
}
},
"attributes": {
"vault": {
"id": "string",
"status": "VAULTED",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET",
"title": "string",
"mediaType": "string",
"encType": "application/json",
"schema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
},
"targetSchema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
}
}
],
"customer": {
"id": "string",
"email_address": "string",
"phone": {
"phone_type": "FAX",
"phone_number": {
"country_code": "str",
"national_number": "string",
"extension_number": "string"
}
},
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string",
"suffix": "string",
"full_name": "string"
},
"merchant_customer_id": "string"
}
},
"cobranded_cards": []
},
"stored_credential": {
"payment_initiator": "CUSTOMER",
"charge_pattern": "IMMEDIATE",
"usage_pattern": "IMMEDIATE",
"usage": "FIRST"
},
"experience_status": "NOT_STARTED"
},
"bancontact": {
"name": "string",
"country_code": "string",
"bic": "string",
"iban_last_chars": "string",
"card_last_digits": "stri"
},
"blik": {
"name": "string",
"country_code": "string",
"email": "string",
"one_click": {
"consumer_reference": "string"
}
},
"eps": {
"name": "string",
"country_code": "string",
"bic": "string"
},
"giropay": {
"name": "string",
"country_code": "string",
"bic": "string"
},
"ideal": {
"name": "string",
"country_code": "string",
"bic": "string",
"iban_last_chars": "string"
},
"mybank": {
"name": "string",
"country_code": "string",
"bic": "string",
"iban_last_chars": "string"
},
"p24": {
"name": "string",
"email": "string",
"country_code": "string",
"payment_descriptor": "string",
"method_id": "string",
"method_description": "string"
},
"sofort": {
"name": "string",
"country_code": "string",
"bic": "string",
"iban_last_chars": "string"
},
"trustly": {
"name": "string",
"country_code": "string",
"email": "string",
"bic": "string",
"iban_last_chars": "string"
},
"apple_pay": {
"id": "string",
"token": "string",
"name": "string",
"email_address": "string",
"phone_number": {
"country_code": "str",
"national_number": "string",
"extension_number": "string"
},
"card": {
"last_digits": "string",
"brand": "VISA",
"available_networks": [
"VISA"
],
"type": "CREDIT",
"authentication_result": {
"liability_shift": "NO",
"three_d_secure": {
"authentication_status": "Y",
"enrollment_status": "Y"
}
},
"attributes": {
"vault": {
"id": "string",
"status": "VAULTED",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET",
"title": "string",
"mediaType": "string",
"encType": "application/json",
"schema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
},
"targetSchema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
}
}
],
"customer": {
"id": "string",
"email_address": "string",
"phone": {
"phone_type": "FAX",
"phone_number": {
"country_code": "str",
"national_number": "string",
"extension_number": "string"
}
},
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string",
"suffix": "string",
"full_name": "string"
},
"merchant_customer_id": "string"
}
}
},
"from_request": {
"expiry": "string",
"last_digits": "stri"
},
"expiry": "string",
"bin_details": {
"bin": "string",
"issuing_bank": "string",
"bin_country_code": "string",
"products": [
"string"
]
},
"stored_credential": {
"payment_initiator": "CUSTOMER",
"payment_type": "ONE_TIME",
"usage": "FIRST",
"previous_network_transaction_reference": {
"id": "stringstr",
"date": "stri",
"network": "VISA",
"acquirer_reference_number": "string"
}
},
"name": "string",
"billing_address": {
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"admin_area_4": "string",
"admin_area_3": "string",
"admin_area_2": "string",
"admin_area_1": "string",
"postal_code": "string",
"country_code": "st",
"address_details": {
"street_number": "string",
"street_name": "string",
"street_type": "string",
"delivery_service": "string",
"building_name": "string",
"sub_building": "string"
}
},
"country_code": "string"
},
"attributes": {
"vault": {
"id": "string",
"status": "VAULTED",
"customer": {
"id": "string",
"email_address": "string",
"phone": {
"phone_type": "FAX",
"phone_number": {
"country_code": "str",
"national_number": "string",
"extension_number": "string"
}
},
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string",
"suffix": "string",
"full_name": "string"
}
},
"links": [
{
"href": "string",
"rel": "string",
"method": "GET",
"title": "string",
"mediaType": "string",
"encType": "application/json",
"schema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
},
"targetSchema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
}
}
]
}
},
"stored_credential": {
"payment_initiator": "CUSTOMER",
"payment_type": "ONE_TIME",
"usage": "FIRST",
"previous_network_transaction_reference": {
"id": "stringstr",
"date": "stri",
"network": "VISA",
"acquirer_reference_number": "string"
}
}
},
"google_pay": {
"name": "string",
"email_address": "string",
"phone_number": {
"country_code": "str",
"national_number": "string"
},
"card": {
"name": "string",
"last_digits": "stri",
"type": "CREDIT",
"brand": "VISA",
"billing_address": {
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"admin_area_4": "string",
"admin_area_3": "string",
"admin_area_2": "string",
"admin_area_1": "string",
"postal_code": "string",
"country_code": "st",
"address_details": {
"street_number": "string",
"street_name": "string",
"street_type": "string",
"delivery_service": "string",
"building_name": "string",
"sub_building": "string"
}
},
"authentication_result": {
"liability_shift": "NO",
"three_d_secure": {
"authentication_status": "Y",
"enrollment_status": "Y"
}
}
}
},
"venmo": {
"email_address": "string",
"account_id": "string",
"user_name": "string",
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string",
"suffix": "string",
"full_name": "string"
},
"phone_number": {
"national_number": "string"
},
"address": {
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"admin_area_4": "string",
"admin_area_3": "string",
"admin_area_2": "string",
"admin_area_1": "string",
"postal_code": "string",
"country_code": "st",
"address_details": {
"street_number": "string",
"street_name": "string",
"street_type": "string",
"delivery_service": "string",
"building_name": "string",
"sub_building": "string"
}
},
"return_flow": "AUTO",
"attributes": {
"vault": {
"id": "string",
"status": "VAULTED",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET",
"title": "string",
"mediaType": "string",
"encType": "application/json",
"schema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
},
"targetSchema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"definitions": {},
"patternProperties": {},
"properties": {},
"allOf": [],
"anyOf": [],
"oneOf": [],
"not": {},
"links": [],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
}
}
],
"customer": {
"id": "string",
"email_address": "string",
"phone": {
"phone_type": "FAX",
"phone_number": {
"country_code": "str",
"national_number": "string",
"extension_number": "string"
}
},
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string",
"suffix": "string",
"full_name": "string"
}
}
}
}
},
"crypto": {
"country_code": "string",
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string"
},
"experience_context": {
"brand_name": "string",
"locale": "string",
"shipping_preference": "GET_FROM_FILE",
"return_url": "http://example.com",
"cancel_url": "http://example.com"
}
}
},
"intent": "CAPTURE",
"processing_instruction": "ORDER_COMPLETE_ON_PAYMENT_APPROVAL",
"payer": {
"email_address": "string",
"payer_id": "string",
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string",
"suffix": "string",
"full_name": "string"
},
"phone": {
"phone_type": "FAX",
"phone_number": {
"country_code": "str",
"national_number": "string",
"extension_number": "string"
}
},
"birth_date": "string",
"tax_info": {
"tax_id": "string",
"tax_id_type": "BR_CPF"
},
"address": {
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"admin_area_4": "string",
"admin_area_3": "string",
"admin_area_2": "string",
"admin_area_1": "string",
"postal_code": "string",
"country_code": "st",
"address_details": {
"street_number": "string",
"street_name": "string",
"street_type": "string",
"delivery_service": "string",
"building_name": "string",
"sub_building": "string"
}
}
},
"purchase_units": [
{
"reference_id": "string",
"amount": {
"currency_code": "str",
"value": "string",
"breakdown": {
"item_total": {
"currency_code": "str",
"value": "string"
},
"shipping": {
"currency_code": "str",
"value": "string"
},
"handling": {
"currency_code": "str",
"value": "string"
},
"tax_total": {
"currency_code": "str",
"value": "string"
},
"insurance": {
"currency_code": "str",
"value": "string"
},
"shipping_discount": {
"currency_code": "str",
"value": "string"
},
"discount": {
"currency_code": "str",
"value": "string"
}
}
},
"payee": {
"email_address": "string",
"merchant_id": "string"
},
"payment_instruction": {
"platform_fees": [],
"disbursement_mode": "INSTANT",
"payee_pricing_tier_id": "string",
"payee_receivable_fx_rate_id": "string"
},
"description": "string",
"custom_id": "string",
"invoice_id": "string",
"id": "string",
"soft_descriptor": "string",
"items": [],
"shipping": {
"name": {
"prefix": "string",
"given_name": "string",
"surname": "string",
"middle_name": "string",
"suffix": "string",
"full_name": "string"
},
"email_address": "string",
"type": "SHIPPING",
"options": [],
"address": {
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"admin_area_4": "string",
"admin_area_3": "string",
"admin_area_2": "string",
"admin_area_1": "string",
"postal_code": "string",
"country_code": "st",
"address_details": {
"street_number": "string",
"street_name": "string",
"street_type": "string",
"delivery_service": "string",
"building_name": "string",
"sub_building": "string"
}
},
"phone_number": {
"extension_number": "string",
"country_code": "str",
"national_number": "string"
},
"trackers": []
},
"supplementary_data": {
"card": {
"level_2": {
"invoice_id": "string",
"tax_total": {
"currency_code": "str",
"value": "string"
}
},
"level_3": {
"shipping_amount": {
"currency_code": "str",
"value": "string"
},
"duty_amount": {
"currency_code": "str",
"value": "string"
},
"discount_amount": {
"currency_code": "str",
"value": "string"
},
"shipping_address": {
"address_line_1": "string",
"address_line_2": "string",
"address_line_3": "string",
"admin_area_4": "string",
"admin_area_3": "string",
"admin_area_2": "string",
"admin_area_1": "string",
"postal_code": "string",
"country_code": "st",
"address_details": {
"street_number": "string",
"street_name": "string",
"street_type": "string",
"delivery_service": "string",
"building_name": "string",
"sub_building": "string"
}
},
"ships_from_postal_code": "string",
"line_items": [
{
"name": "string",
"quantity": "string",
"description": "string",
"sku": "string",
"url": "http://example.com",
"image_url": "http://example.com",
"upc": {
"type": "UPC-A",
"code": "string"
},
"billing_plan": {
"billing_cycles": [
{
"tenure_type": "REGULAR",
"pricing_scheme": {
"price": {
"currency_code": "str",
"value": "string"
},
"pricing_model": "FIXED",
"reload_threshold_amount": {
"currency_code": "str",
"value": "string"
}
},
"total_cycles": 1,
"sequence": 1,
"start_date": "string"
}
],
"setup_fee": {
"currency_code": "str",
"value": "string"
},
"name": "string"
},
"unit_amount": {
"currency_code": "str",
"value": "string"
},
"tax": {
"currency_code": "str",
"value": "string"
},
"commodity_code": "string",
"discount_amount": {
"currency_code": "str",
"value": "string"
},
"total_amount": {
"currency_code": "str",
"value": "string"
},
"unit_of_measure": "string"
}
]
}
},
"risk": {
"customer": {
"ip_address": "string"
}
}
},
"payments": {
"authorizations": [],
"captures": [],
"refunds": []
}
}
],
"status": "CREATED",
"links": []
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "10398537340c8",
"details": [
{
"field": "/purchase_units",
"value": "[]",
"location": "body",
"issue": "INVALID_ARRAY_MIN_ITEMS",
"description": "The number of items in an array parameter is too small."
}
],
"links": [
{
"href": "https://developer.paypal.com/api/orders/v2/#error-INVALID_ARRAY_MIN_ITEMS",
"rel": "information_link"
}
]
}{
"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": "UNPROCESSABLE_ENTITY",
"details": [
{
"field": "/purchase_units/@reference_id=='PUHF'/shipping/address",
"issue": "MISSING_SHIPPING_ADDRESS",
"description": "The shipping address is required when `shipping_preference=SET_PROVIDED_ADDRESS`."
}
],
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "f200264a4e02a",
"links": [
{
"href": "https://developer.paypal.com/api/rest/reference/orders/v2/errors/#MISSING_SHIPPING_ADDRESS",
"rel": "information_link",
"method": "GET"
}
]
}{
"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 intent to either capture payment immediately or authorize a payment for an order after order creation.
"CAPTURE" | "AUTHORIZE"The instruction to process an order.
"NO_INSTRUCTION""ORDER_COMPLETE_ON_PAYMENT_APPROVAL"An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.
1 <= items <= 10The payment source definition.