Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Created November 20, 2012 21:55
Show Gist options
  • Save xcommerce-gists/4121491 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/4121491 to your computer and use it in GitHub Desktop.
How to Create One-Time Payments Using Express Checkout.curl
curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d
"USER=<callerID>
&PWD=<callerPswd>
&SIGNATURE=<callerSig>
&METHOD=DoExpressCheckoutPayment
&VERSION=93
&TOKEN=<tokenValue>
&PAYERID=<payerID> # customer's unique PayPal ID
&PAYMENTREQUEST_0_PAYMENTACTION=SALE # payment type
&PAYMENTREQUEST_0_AMT=19.95 # transaction amount
&PAYMENTREQUEST_0_CURRENCYCODE=USD" # transaction currency, e.g. US dollars
curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d
"USER=<callerID>
&PWD=<callerPswd>
&SIGNATURE=<callerSig>
&METHOD=GetExpressCheckoutDetails
&VERSION=93
&TOKEN=<tokenValue>"
curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d
"USER=<callerID> # User ID of the PayPal caller account
&PWD=<callerPswd> # Password of the caller account
&SIGNATURE=<callerSig> # Signature of the caller account
&METHOD=SetExpressCheckout
&VERSION=93
&PAYMENTREQUEST_0_PAYMENTACTION=SALE # type of payment
&PAYMENTREQUEST_0_AMT=19.95 # amount of transaction
&PAYMENTREQUEST_0_CURRENCYCODE=USD # currency of transaction
&RETURNURL=http://www.example.com/success.html # URL of your payment confirmation page
&CANCELURL=http://www.example.com/cancel.html" # URL redirect if customer cancels payment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment