Customer : Add and save a card in CopyAndPay


When a customer adds a card, a PA transaction needs to be processed.

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

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.

From an implementation perspective what this means is that you simply change the CheckoutID request from Step 1 (CopyAndPay) to :

paymentType = PA
Amount = ZAR 1.00

Main reason why you cannot do a RG and then a DB :

- The RG does not go to the bank and therefore will not be authenticated (the banks only process transactions with an amount - we also cannot attach an amount to the RG, since amounts will differ in the future). Processing an RG only therefore may store a card that cannot be billed.

Sample code below:

function request() {
$url = "";
$data = "authentication.userId=XXXXXXXXX".
"&authentication.password=XXXXXX" .
"&authentication.entityId=XXXXXXXXXXXX" .
"&amount=1.00" .
"&currency=ZAR" .

Have more questions? Submit a request


Powered by Zendesk