Customer : Add and save card Server-to-server

Follow

If your workflow is :

1. Customer adds card
2. Your systems store card 
3. When amount is due, stored card is billed

Then please see sample code below - please refer to our technical documentation for conclusive instructions:

__________________________


1.  Customer adds card


curl https://test.oppwa.com/v1/payments \
 -d "authentication.userId=XXXXXXX" \
 -d "authentication.password=XXXXXX" \
 -d "authentication.entityId=XXXXXXXXX" \
 -d "amount=1.00" \
 -d "currency=ZAR" \
 -d "paymentBrand=VISA" \
 -d "paymentType=PA" \
 -d "card.number=4200000000000000" \
 -d "createRegistration=true\
 -d "card.number=4200000000000000" \
 -d "card.holder=Jane Jones" \
 -d "card.expiryMonth=05" \
 -d "card.expiryYear=2018" \
 -d "card.cvv=123" \
 -d "shopperResultUrl=https://peachpayments.docs.oppwa.com/tutorials/server-to-server"

This will validate the card and once validated, store the card details and return a payload.

 

2. Your systems store card token

 

The payload (response from our systems) will include a registrationID, which you can save as the token of the card. You can then make payments on this stored card by referencing its token.

 

3. When amount is due, stored card is billed

curl https://test.oppwa.com/v1/registrations/{id}/payments \
 -d "authentication.userId=XXXXXXXXX" \
 -d "authentication.password=XXXXXXXx" \
 -d "authentication.entityId=XXXXXXX" \
 -d "amount=92.00" \
 -d "currency=ZAR" \
 -d "paymentType=DB"
 -d "recurringType=REPEATED"

Please note that the entity ID here should be the recurring entityID -d "authentication.entityId=XXXXXXXX" \



Also, please find recommended parameters to include at this link : https://support.peachpayments.com/hc/en-us/articles/206087578-Recommended-Parameters-to-include-with-CheckoutId-request-Transactions-

Have more questions? Submit a request

Comments

Powered by Zendesk