Example description: Card Storage with Upsell Offer

In this demo example you have Custom Form with enabled support for verification for a Payment with Credit Card storage. Once the payment has been processed and the card is stored.



Fill the form with a valid name, email and a valid card* number (or use default values clicking on the EXAMPLE DATA button).


Step 1
Collecting the personal information and credit card data. All required fields must be filled before sending data. Select the Remember my card option to store your card.
Step 2
Card data is sent to CentralPay through the browser with token.js. CentralPay stores the card data and returns the CardTokenID to the merchant form. Using the CardToken ID, a new Customer ID is requested.
Step 3
Either if it's a new card or an existing one, use your Customer ID / Card ID validated with the CVV to process a new transaction.
Step 4
The Payment Authentication Response, Customer ID / Card ID, currency, amount, and order data are sent to the API by submitting the form. CentralPay creates a Transaction and returns TransactionId with JSON response to the merchant.

Try a new transaction using the Customer / Card created here »
Click on the button to fill the form fields:          
Test Card number: 4000 0000 0000 0002    
Expiration date: valid date
CVV: 3 digit number


-

-

-

Card data

Use your card
Your card data is stored securely. More information»
Select card and enter CVV
Secure payment by CentralPay
CentralPay is a PCI-DSS compliant payment gateway.




curl -v https://test-api.centralpay.net/v2/rest/cardToken \
-H 'Origin:' \
-d card[number]=  \
-d card[expirationMonth]=  \
-d card[expirationYear]= \
-d card[cvc]=  \
-d card[country]=  \
-d card[holderName]=  \
-d card[holderEmail]=  \
-d merchantPublicKey=  \

 
curl -v customer \
-u ' ' \
-d merchantCustomerId=  \
-d cardTokenId=  \
-d firstName=  \
-d lastName=  \
-d email=  \
 

curl -v card \
-u ' ' \
-d merchantCardId=  \
-d customerId=  \
-d cardTokenId=  \


curl -v https://test-api.centralpay.net/v2/rest/transaction \
-u ' ' \
-d merchantTransactionId=  \
-d amount= \
-d capture=  \
-d currency= \
-d receiptEmail=  \
-d pointOfSaleId=  \
-d cardTokenId=  \
-d customerId=  \
-d cardId=  \
-d cvcValidation=  \
-d description=  \
-d endUserIp= 34.204.169.76 \
-d order[firstName]=  \
-d order[lastName]=  \
-d order[country]=  \
-d endUserLanguage=  \
-d browserAcceptLanguage=  \
-d browserUserAgent=  \


curl -v https://test-api.centralpay.net/v2/rest/transaction \
-u ' ' \
-d merchantTransactionId=  \
-d pointOfSaleId=  \
-d customerId=  \
-d cardId=  \
-d cvcValidation=  \
-d receiptEmail=  \
-d card[holderEmail]=  \
-d currency= \
-d amount= \
-d endUserIp= 34.204.169.76 \
-d capture=   \
-d order[firstName]=  \
-d order[lastName]=  \
-d order[email]=  \
-d order[country]=  \

22