curl -v -X POST https://api.sandbox.paypal.com/v2/checkout/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
-d '{
"intent": "CAPTURE",
"application_context": {
"return_url": "https://example.com/return",
"cancel_url": "https://example.com/cancel",
"client_configuration": {
"integration_artifact": "PAYPAL_JS_SDK",
"experience": {
"user_experience_flow": "FULL_PAGE_REDIRECT",
"entry_point": "PAY_WITH_PAYPAL",
"channel": "WEB",
"product_flow": "HERMES"
}
},
"preferred_payment_source": {
"token": {
"type": "BILLING_AGREEMENT",
"id": "B-6282561050045662U"
}
}
},
"purchase_units": [
{
"reference_id": "PUHF",
"amount": {
"currency_code": "USD",
"value": "240.00"
}
}
]
}'