Created
August 29, 2012 19:37
-
-
Save xcommerce-gists/3517719 to your computer and use it in GitHub Desktop.
How to Use Express Checkout for One-Time Payments.curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request | |
------- | |
Endpoint URL: https://api-3t.sandbox.paypal.com/nvp | |
HTTP method: POST | |
POST data: | |
USER=insert_merchant_user_name_here | |
&PWD=insert_merchant_password_here | |
&SIGNATURE=insert_merchant_signature_value_here | |
&METHOD=DoExpressCheckoutPayment | |
&VERSION=86 | |
&TOKEN=insert_token_value_here | |
&PAYERID=payer_id_value #Identifies the consumer's account | |
&PAYMENTREQUEST_0_PAYMENTACTION=SALE #The type of payment | |
&PAYMENTREQUEST_0_AMT=19 #The amount the consumer will pay | |
&PAYMENTREQUEST_0_CURRENCYCODE=USD #The currency, e.g. US dollars | |
Response | |
-------- | |
TOKEN=EC%123458644AS127201F | |
&SUCCESSPAGEREDIRECTREQUESTED=false | |
&TIMESTAMP=2012%2d02%2d02T20%3a48%3a42Z | |
&CORRELATIONID=123456101411b | |
&ACK=Success | |
&VERSION=86 | |
&BUILD=2515991 | |
&INSURANCEOPTIONSELECTED=false | |
&SHIPPINGOPTIONISDEFAULT=false | |
&PAYMENTINFO_0_TRANSACTIONID=12345337YG654084X | |
&PAYMENTINFO_0_TRANSACTIONTYPE=expresscheckout | |
&PAYMENTINFO_0_PAYMENTTYPE=instant | |
&PAYMENTINFO_0_ORDERTIME=2012%2d02%2d02T20%3a48%3a40Z | |
&PAYMENTINFO_0_AMT=19%2e00 | |
&PAYMENTINFO_0_FEEAMT=0%2e85 | |
&PAYMENTINFO_0_TAXAMT=0%2e00 | |
&PAYMENTINFO_0_CURRENCYCODE=USD | |
&PAYMENTINFO_0_PAYMENTSTATUS=Completed | |
&PAYMENTINFO_0_PENDINGREASON=None | |
&PAYMENTINFO_0_REASONCODE=None | |
&PAYMENTINFO_0_PROTECTIONELIGIBILITY=Eligible | |
&PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE=ItemNotReceivedEligible%2cUnauthorizedPaymentEligible | |
&PAYMENTINFO_0_SECUREMERCHANTACCOUNTID=12345JW1234 | |
&PAYMENTINFO_0_ERRORCODE=0 | |
&PAYMENTINFO_0_ACK=Success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request | |
------- | |
Endpoint URL: https://api-3t.sandbox.paypal.com/nvp | |
HTTP method: POST | |
POST data: | |
USER=insert_merchant_user_name_here | |
&PWD=insert_merchant_password_here | |
&SIGNATURE=insert_merchant_signature_value_here | |
&METHOD=GetExpressCheckoutDetails | |
&VERSION=86 | |
&TOKEN=insert_token_value_here | |
Response | |
-------- | |
TOKEN=token_value | |
&CHECKOUTSTATUS=PaymentActionNotInitiated | |
&TIMESTAMP=2012%2d02%2d02T20%3a45%3a34Z | |
&CORRELATIONID=123458464cec | |
&ACK=Success | |
&VERSION=86 | |
&BUILD=2515991 | |
&EMAIL=sender_1234522775_per%40domain%2ecom | |
&PAYERID=1234512345MW8 | |
&PAYERSTATUS=verified | |
&FIRSTNAME=Test | |
&LASTNAME=User | |
&COUNTRYCODE=US | |
&SHIPTONAME=Test%20User | |
&SHIPTOSTREET=1%20Main%20St | |
&SHIPTOCITY=San%20Jose | |
&SHIPTOSTATE=CA | |
&SHIPTOZIP=95131 | |
&SHIPTOCOUNTRYCODE=US | |
&SHIPTOCOUNTRYNAME=United%20States | |
&ADDRESSSTATUS=Confirmed | |
&CURRENCYCODE=USD | |
&AMT=19%2e00 | |
&SHIPPINGAMT=0%2e00 | |
&HANDLINGAMT=0%2e00 | |
&TAXAMT=0%2e00 | |
&INSURANCEAMT=0%2e00 | |
&SHIPDISCAMT=0%2e00 | |
&PAYMENTREQUEST_0_CURRENCYCODE=USD | |
&PAYMENTREQUEST_0_AMT=19%2e00 | |
&PAYMENTREQUEST_0_SHIPPINGAMT=0%2e00 | |
&PAYMENTREQUEST_0_HANDLINGAMT=0%2e00 | |
&PAYMENTREQUEST_0_TAXAMT=0%2e00 | |
&PAYMENTREQUEST_0_INSURANCEAMT=0%2e00 | |
&PAYMENTREQUEST_0_SHIPDISCAMT=0%2e00 | |
&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false | |
&PAYMENTREQUEST_0_SHIPTONAME=Test%20User | |
&PAYMENTREQUEST_0_SHIPTOSTREET=1%20Main%20St | |
&PAYMENTREQUEST_0_SHIPTOCITY=San%20Jose | |
&PAYMENTREQUEST_0_SHIPTOSTATE=CA | |
&PAYMENTREQUEST_0_SHIPTOZIP=95131 | |
&PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=US | |
&PAYMENTREQUEST_0_SHIPTOCOUNTRYNAME=United%20States | |
&PAYMENTREQUESTINFO_0_ERRORCODE=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request | |
------- | |
Endpoint URL: https://api-3t.sandbox.paypal.com/nvp | |
HTTP method: POST | |
POST data: | |
USER=insert_merchant_user_name_here | |
&PWD=insert_merchant_password_here | |
&SIGNATURE=insert_merchant_signature_value_here | |
&METHOD=SetExpressCheckout | |
&VERSION=86 | |
&PAYMENTREQUEST_0_PAYMENTACTION=SALE #The type of payment | |
&PAYMENTREQUEST_0_AMT=19 #The amount the buyer will pay | |
&PAYMENTREQUEST_0_CURRENCYCODE=USD #The currency, e.g. US dollars | |
&cancelUrl=http://www.yourdomain.com/cancel.html #For use if the consumer decides not to proceed with payment | |
&returnUrl=http://www.yourdomain.com/success.html #For use if the consumer proceeds with payment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment