You can find decent examples with Json in the official Paypal documentation .
Below is an example based on the official PayPal page.
curl -v -X POST https://api.sandbox.paypal.com/v1/payments/payment \ -H "Content-Type:application/json" \ -H "Authorization: Bearer Access-Token" \ -d '{ "intent": "sale", "payer": { "payment_method": "paypal" }, "transactions": [ { "amount": { "total": "30.11", "currency": "USD", "details": { "subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "handling_fee": "1.00", "shipping_discount": "-1.00", "insurance": "0.01" } }, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_SOMENUMBER", "invoice_number": "INV000001", "payment_options": { "allowed_payment_method": "INSTANT_FUNDING_SOURCE" }, "soft_descriptor": "ECHI5786786", "item_list": { "items": [ { "name": "dontation", "description": "dontation", "quantity": "1", "price": "10", "tax": "0.00", "sku": "1", "currency": "USD" } ] } } ], "note_to_payer": "Thankyour for your donation.", "redirect_urls": { "return_url": "https://example.com", "cancel_url": "https://example.com" } }
source share