On this page
No Headings
Oauth 2.0 authentication
Client CredentialsToken URL/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/payments/paymenthttps://uri.paypal.com/services/payments/channelpartnerhttps://uri.paypal.com/services/payments/partnerfeehttps://uri.paypal.com/services/payments/realtimepaymentapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X POST "https://api-m.sandbox.paypal.com/v1/checkout/orders" \ -H "Content-Type: application/json" \ -d '{ "purchase_units": [ { "reference_id": "store_mobile_world_order_1234", "description": "Mobile World Store order-1234", "amount": { "currency": "USD", "details": { "subtotal": "1.09", "shipping": "0.02", "tax": "0.33" }, "total": "1.44" }, "payee": { "email": "seller@example.com" }, "items": [ { "name": "NeoPhone", "sku": "sku03", "price": "0.54", "currency": "USD", "quantity": "1" }, { "name": "Fitness Watch", "sku": "sku04", "price": "0.55", "currency": "USD", "quantity": "1" } ], "shipping_address": { "line1": "2211 N First Street", "line2": "Building 17", "city": "San Jose", "country_code": "US", "postal_code": "95131", "state": "CA", "phone": "(123) 456-7890" }, "shipping_method": "United Postal Service", "partner_fee_details": { "receiver": { "email": "partner@example.com" }, "amount": { "value": "0.01", "currency": "USD" } }, "payment_linked_group": 1, "custom": "custom_value_2388", "invoice_number": "invoice_number_2388", "payment_descriptor": "Payment Mobile World" } ], "redirect_urls": { "return_url": "https://example.com/return", "cancel_url": "https://example.com/cancel" } }'{
"id": "string",
"intent": "SALE",
"purchase_units": [
{
"reference_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"
}
},
"payee": {
"email": "user@example.com",
"merchant_id": "string",
"payee_display_metadata": {
"email": "user@example.com",
"display_phone": {
"country_code": "string",
"number": "string"
},
"brand_name": "string"
}
},
"description": "string",
"custom": "string",
"invoice_number": "string",
"payment_descriptor": "string",
"items": [
{
"sku": "string",
"name": "string",
"description": "string",
"quantity": "string",
"price": "string",
"currency": "string",
"tax": "string",
"url": "http://example.com"
}
],
"notify_url": "http://example.com",
"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",
"partner_fee_details": {
"receiver": {
"email": "user@example.com",
"merchant_id": "string",
"payee_display_metadata": {
"email": "user@example.com",
"display_phone": {
"country_code": "string",
"number": "string"
},
"brand_name": "string"
}
},
"amount": {
"currency": "string",
"value": "string"
}
},
"payment_linked_group": 1,
"metadata": {
"supplementary_data": [
{
"name": "string",
"value": "string"
}
]
},
"payment_summary": {
"captures": [
{
"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"
}
},
"status": "PENDING",
"reason_code": "CHARGEBACK",
"transaction_fee": {
"currency": "string",
"value": "string"
},
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
],
"refunds": [
{
"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"
}
},
"capture_id": "string",
"sale_id": "string",
"status": "PENDING",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
],
"sales": [
{
"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"
}
},
"transaction_fee": {
"currency": "string",
"value": "string"
},
"status": "COMPLETED",
"reason_code": "CHARGEBACK",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
],
"authorizations": [
{
"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"
}
},
"transaction_fee": {
"currency": "string",
"value": "string"
},
"status": "COMPLETED",
"reason_code": "CHARGEBACK",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
]
},
"status": "NOT_PROCESSED",
"reason_code": "PAYER_SHIPPING_UNCONFIRMED"
}
],
"payment_details": {
"payment_id": "string",
"disbursement_mode": "INSTANT"
},
"gross_total_amount": {
"currency": "string",
"value": "string"
},
"application_context": {
"brand_name": "string",
"locale": "string",
"shipping_preference": "NO_SHIPPING",
"user_action": "string",
"supplementary_data": [
{
"name": "string",
"value": "string"
}
]
},
"metadata": {
"supplementary_data": [
{
"name": "string",
"value": "string"
}
]
},
"status": "CREATED",
"redirect_urls": {
"return_url": "http://example.com",
"cancel_url": "http://example.com"
},
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}{
"name": "string",
"message": "string",
"debug_id": "string",
"information_link": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}The intent.
"SALE" | "AUTHORIZE"An array of purchase units. Each purchase unit establishes a contract between a customer and merchant.
1 <= itemsThe payment details for the order.
The amount and currency of the partner fee.
Customizes the payer experience during the approval process for the payment with PayPal.Note: The PayPal Commerce Platform might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
The name-and-value pairs that contain external data, such as user, user feedback, score, and so on.
The redirect URLs. Required only for the PayPal payment method. The supported settings are return and cancel URLs.