Note: For error handling and troubleshooting, see Orders v2 errors.
username:passwordAuthorization: Basic *****************{}curl --location -g --request POST 'https://api-m.sandbox.paypal.com/v2/checkout/orders/{{order_id}}/authorize' \
--header 'Prefer: ' \
--header 'PayPal-Request-Id: ' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data-raw '{}'{
"id": "9P375962UG756752D",
"status": "COMPLETED",
"purchase_units": [
{
"reference_id": "default",
"shipping": {
"name": {
"full_name": "FooBuyer Jones"
},
"address": {
"address_line_1": "1 Main St",
"admin_area_2": "San Jose",
"admin_area_1": "CA",
"postal_code": "95131",
"country_code": "US"
}
},
"payments": {
"authorizations": [
{
"status": "CREATED",
"id": "8VF53974JG831581P",
"amount": {
"currency_code": "USD",
"value": "1000.00"
},
"seller_protection": {
"status": "ELIGIBLE",
"dispute_categories": [
"ITEM_NOT_RECEIVED",
"UNAUTHORIZED_TRANSACTION"
]
},
"expiration_time": "2022-02-18T19:00:45Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v2/payments/authorizations/8VF53974JG831581P",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v2/payments/authorizations/8VF53974JG831581P/capture",
"rel": "capture",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v2/payments/authorizations/8VF53974JG831581P/void",
"rel": "void",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v2/payments/authorizations/8VF53974JG831581P/reauthorize",
"rel": "reauthorize",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v2/checkout/orders/9P375962UG756752D",
"rel": "up",
"method": "GET"
}
],
"create_time": "2022-01-20T19:00:45Z",
"update_time": "2022-01-20T19:00:45Z"
}
]
}
}
],
"payer": {
"name": {
"given_name": "FooBuyer",
"surname": "Jones"
},
"email_address": "foobuyer@gmail.com",
"payer_id": "QYR5Z8XDVJNXQ",
"address": {
"country_code": "US"
}
},
"links": [
{
"href": "https://api.sandbox.paypal.com/v2/checkout/orders/9P375962UG756752D",
"rel": "self",
"method": "GET"
}
]
}