Save a Card

First things first, before you can use this guide and save a card for future use you will need to select an integration method to send us the card data. You can either use the API or the Hosted Payment Page to do this.

Be careful! PCI DSS rules state that the CVV (3 digits on the back of the card) can never be stored by us or you.



Time to play - access your API using these endpoints:

If you are integrated via the API it couldn't be easier to let us know you want to store the card for future use.

As you will see in our Card API guide there is a subscription_type parameter - all you need to do is set it to INIT.

Here is an example of the transaction object when you are trying to store a card:

"transaction": {
    "merchant_order_id": "a9f0ce93-6f0d-4a15-a18b-45f1304b4bc0",
    "transaction_type": "AUTH_ONLY",
    "amount": "0.00",
    "currency_code_iso3": "GBP",
    "subscription_type": "INIT"         
Note: This example shows what to do if you don't want to charge the card now and just want to store it for later. You can do the same thing with a full amount and the transaction_type set to AUTH_CAPTURE.

If the transaction gets a successful response, you're all done! We have securely stored the card and, as you will see in the rest of this section, you can use the transaction_id you get back in the response for future transactions.

Hosted Payment Page


Time to play - access your API using these endpoints:

If you are integrated via the HPP then the decision to store (or not store) the card details is set in the template you upload with the is_remember value.

Take a look at this code from the Default Template.

<div class="input checkbox">
    <input type="checkbox" name="is_remember" id="is_remember" value="1">
    <div class="checkbox-toggle"><img src="{{cdn_url}}/images/icon-tick.svg"></div>
    <label for="is_remember">Remember my card</label>

It adds the tick box asking the cardholder if they would like to save their card details and performs the same action as setting the subscription_type to INIT.

In the response back to your Return URL and Callback URL we will let you know what the user has selected by sending you the is_remember parameter as either 0 (not saved) or 1 (saved).

Also in the response is going to be the transaction_id. This value is going to be used in future requests to replace the card details, so make sure you store it.

Some extra info

In some cases, you may have received authorisation from the cardholder to store their details before reaching the payment page. If you want to remove the tick box option from the HPP and always tell us to store the card replace the code above with this:

<input type="hidden" name="is_remember" id="is_remember" value="1">