Example description: Card acceptance using CustomerID / CardID

In this demo example you have Custom Form enabled to pay creating a CustomerID / CardID first. After that CustomerID is used to process next transactions and acceptance rules will request a second validation depending on different settings:
  -  The third transaction for the same customer will require always, at least, CVC.
  -  All 1-Click payments between 50€ and 90€ will also require CVC.
  -  Payments above 90€ will require 3DS validation.
  -  If total amount per customer in a day exceeds 725€, transaction will be refused.
After creating CustomerID in the first payment, new examples will show the different behavior of the rule engine for each one-click payment.



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.
Step 3
CardTokenId, currency, amount, and order data are sent to the API from the form. CentralPay creates a CustomerId with a CardId that can be used to make recurrent Transactions.
Step 4
After sending the CardTokenId to the CentralPay API the Transaction is processed. The merchant will receive a JSON with the response message.  
Step 0
Another card can be added to your customer. Fill again card* data, a CardTokenID will be requested to create a new CardID inherited in your CustomerID.
Step 1
Use again the e-mail submitted in the previous transactions. Choose one of the cards stored in CentralPay and displayed in the form list (or a new one). Mind that this time there is no CVV form field. The lower amount offer* is allowed to be debited with one-click payment.
Step 2
A Transaction request is made to CentralPay API using CustomerID/CardID currency, amount and order data just with one only click (without need of CVV validation).
After sending CustomerId/CardId to the CentralPay API the Transaction is processed. The merchant will receive a JSON with the response message.
Step 1
Use again the e-mail submitted in the previous transactions. Choose one of the cards stored in CentralPay and displayed in the form list (or a new one). By default CVV field is not included in the form. At the third hourly transaction, even selecting the lower amount offer*, CVV will be required.
Step 2
Acceptance rule returns a HTTP status 307 and an object specifying which verification is requested. In this case CVV is requested to process successfully the transaction. A form field to submit CVV is displayed. Cardholder must enter the CVV value
Step 3
A Transaction request is made to CentralPay API using CustomerID/CardID currency, amount and order data. After sending CustomerId/CardId to the CentralPay API, this time with the CVV in the request as "cvcValidation", the Transaction is processed. The merchant will receive a JSON with the response message.
Step 1
Use CustomerID / CardID validated with CVV to make a new transaction request. Currency, amount, and order data are sent with your CustomerID/CardID to the CentralPay API from the form.
Step 2
A Transaction request is made to CentralPay API using CustomerID / CardID currency, amount and order data. The acceptance rule set will enforce 3DSecure in the second transaction processed with this card. The API will return an Enrollment object with the parameters to send a request to the ACS bank.
Step 3
A 3DSecure form belonging to the ACS bank is loaded in an iFrame. Fill the OTP field and submit. The response will be read from the merchant's form and submitted with CustomerID / CardID / EnrollmentID to the CentralPay API to create a Transaction.
Step 4
CentralPay API checks if the validation is correct and processes the Transaction (successfully or not). The merchant will receive a JSON with the response message.
Step 1
Use again the e-mail submitted in the previous transactions. Choose one of the cards stored in CentralPay and displayed in the form list. If the amount is below 50€ one-click payment could be processed without further verification.
Step 2
A Transaction request is made to CentralPay API using CustomerID/CardID currency, amount and order data.
CentralPay API checks if the validation is correct and processes the Transaction (successfully or not). The merchant will receive a JSON with the response message.
Step 1
Use again the e-mail submitted in the previous transactions. Select the highest amount offer*. Now the total amount spent in the last hour for the customer will be over 750€.
Step 2
After sending CustomerId/CardId to the CentralPay API the Transaction is processed. CentralPay API checks validation, if hourly amount exceeds 750€ (value set in acceptance rule) transaction will be refused. The merchant will receive a JSON with the response message.
Try a new transaction to see if it will be allowed below the 750€ threshold.
Step 1
Use again the e-mail submitted in the previous transactions. Fill card CVV if requested. Select now a lower amount offer*. Now the total amount spent in the last hour will be still under 750€.
Step 2
Acceptance rule returns a HTTP status 307 and an object specifying which verification is requested. In this case CVV is requested to process successfully the transaction. A form field to submit CVV is displayed. Cardholder must enter the CVV value
Step 3
After sending CustomerId/CardId to the CentralPay API the Transaction is processed. CentralPay API checks validation, as hourly amount should not be exceeding 750€ transaction will be accepted. The merchant will receive a JSON with the response message.
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 an Electronic Money Issuer authorised by the Banque de France (CIB 17138).




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.173.45 \
-d order[firstName]=  \
-d order[lastName]=  \
-d order[country]=  \
-d endUserLanguage=  \
-d browserAcceptLanguage=  \
-d browserUserAgent=  \

22