username:password
Authorization: Basic *****************
{
"amount": {
"value": "60",
"currency_code": "USD"
},
"invoice_id": "{{$timestamp}}",
"final_capture": true,
"note_to_payer": "If the ordered color is not available, we will substitute with a different color free of charge.",
"soft_descriptor": "Bob's Custom Sweaters"
}
curl --location -g --request POST 'https://api-m.sandbox.paypal.com/v2/payments/authorizations/{{authorization_id}}/capture' \
--header 'PayPal-Request-Id: ' \
--header 'Prefer: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"amount": {
"value": "60",
"currency_code": "USD"
},
"invoice_id": "{{$timestamp}}",
"final_capture": true,
"note_to_payer": "If the ordered color is not available, we will substitute with a different color free of charge.",
"soft_descriptor": "Bob'\''s Custom Sweaters"
}'
{
"id": "9FV01025HL4947129",
"amount": {
"currency_code": "USD",
"value": "10.99"
},
"final_capture": true,
"seller_protection": {
"status": "NOT_ELIGIBLE"
},
"seller_receivable_breakdown": {
"gross_amount": {
"currency_code": "USD",
"value": "10.99"
},
"paypal_fee": {
"currency_code": "USD",
"value": "1.04"
},
"net_amount": {
"currency_code": "USD",
"value": "9.95"
},
"exchange_rate": {}
},
"invoice_id": "1644277471",
"status": "COMPLETED",
"create_time": "2022-02-07T23:44:31Z",
"update_time": "2022-02-07T23:44:31Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v2/payments/captures/9FV01025HL4947129",
"rel": "self",
"method": "GET"
},
{
"href": "https://api.sandbox.paypal.com/v2/payments/captures/9FV01025HL4947129/refund",
"rel": "refund",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v2/payments/authorizations/6MU44042UC2498019",
"rel": "up",
"method": "GET"
}
]
}