Storing Cardholder Data

Save a card and charge it later using tagged transactions

Storing Cardholder Data Without the Recurring Module

The Recurring System is the scheduling module — subscriptions, instalments, and charges your server runs on a timetable. If all you need is to keep a card on file and charge it when the customer asks, you don't need it.

Two things get confused here, so to be clear up front:

  • The Recurring System is the scheduling module in RPM. You don't need it for this.
  • The seed transaction types (40 and 41) are how the API creates a reusable tag. You do need those if you're integrating at the API rather than through a payment page.

Either way you finish holding a transaction tag and an authorization number — never the card number.

What you actually store

A tag on its own is not enough. Every subsequent transaction needs both values:

ValueAPI fieldHCO field
Transaction tagtransaction_tagx_trans_id
Authorization numberauthorization_numx_auth_code

Store them against your customer record alongside anything non-sensitive you need for display — card type, last four, expiry. The PAN itself never enters your database.


Option A — Hosted payment page, then tagged transactions via API

The lower PCI-scope option. The card is entered on E-xact's payment page and never touches your servers.

The two HCO token types

There are exactly two x_type values that save a card through the payment page:

x_typeWhat it does
AUTH_TOKENPre-authorizes the card and returns a tag. Funds are held, not captured.
PURCHASE_TOKENCharges the card and returns a tag. Funds are captured.

Use AUTH_TOKEN when you're saving the card without selling anything yet, and PURCHASE_TOKEN when the customer is buying at the same time.

Sending the cardholder to the page

You need a payment page configured on your account first — see the Hosted Checkout Integration Guide. Then send the customer there either by generating a Payment Link through the API, or by posting a traditional HTML form:

<form action="https://checkout.e-xact.com/payment" method="post">
  <input name="x_login" value="WSP-YOUR-PAGE-ID" type="hidden">
  <input name="x_type" value="AUTH_TOKEN" type="hidden">
  <input name="x_amount" value="0.00" type="hidden">
  <input name="x_fp_sequence" value="12345" type="hidden">
  <input name="x_fp_timestamp" value="1723757397" type="hidden">
  <input name="x_fp_hash" value="..." type="hidden">
  <input name="x_show_form" value="PAYMENT_FORM" type="hidden">
  <input value="Checkout" type="submit">
</form>

The demo endpoint is https://rpm.demo.e-xact.com/payment; production is https://checkout.e-xact.com/payment.

Capturing the tag from the response

On approval the response carries both values. In the raw response they are x_auth_code and x_trans_id; in the full payload they also appear as Authorization_Num and Transaction_Tag.

Store both against the customer.

Charging the stored card later

Send a Tagged Purchase with the stored values. No card data is required:

{
  "transaction_type": "30",
  "amount": "49.00",
  "transaction_tag": "2151376984",
  "authorization_num": "ET187443"
}

Option B — API only

Your servers handle the card number directly, so the PCI-DSS scope is higher. Only take this path if you can meet those obligations.

Creating the tag

Token creation through the API uses the seed transaction types:

CodeTypeWhat it does
40Recurring SeedPre-authorizes the card and returns a tag. Send at $0.00 when you only want to store the card without charging.
41Recurring Seed PurchaseCharges the card and returns a tag.
{
  "transaction_type": "40",
  "amount": "0.00",
  "cc_number": "4111111111111111",
  "cc_expiry": "1225"
}

The response returns transaction_tag and authorization_num. Store both, and from here the two options are identical — every subsequent charge uses the same tagged transaction types.

These are transaction types, not the Recurring System. Enabling scheduled billing in RPM is a separate decision and not required to hold a tag.


Processing with the tag

Once you hold a tag, these are the transaction types you'll use. None of them take card data.

CodeTypeUse it for
30Tagged PurchaseCharging the stored card. The default choice.
31Tagged Pre-AuthHolding funds on a stored card before capturing later.
32Tagged CompletionCapturing a 31. One completion per pre-authorization.
33Tagged VoidCancelling an unsettled tagged sale — same day, before the batch closes.
34Tagged RefundReturning funds after the sale has settled.

The split between 33 and 34 is purely timing: void if the batch is still open, refund once it has closed. A void against a closed batch will be declined.


Tell the networks it's a stored credential

This is the step most integrations miss, and it costs money. Visa and Mastercard require every stored-credential transaction to declare whether the cardholder initiated it and on what schedule. Without those flags, transactions downgrade to higher interchange and decline more often.

FieldValues
indicator1 first time the card is stored (Visa/Discover), S subsequent charge
initiationC cardholder initiated, M merchant initiated
scheduleS scheduled, U unscheduled
ecommerce_flag7 standard online checkout, 2 recurring, 3 instalment, 5/6 3-D Secure

A stored card charged later by your server looks like this:

{
  "transaction_type": "30",
  "amount": "10.00",
  "transaction_tag": "2150127336",
  "authorization_num": "ET184355",
  "ecommerce_flag": 2,
  "indicator": "S",
  "initiation": "M",
  "schedule": "S",
}

Choosing between the two

Option A keeps the card number off your infrastructure entirely. It is the right default for most merchants, and the only practical choice if you'd rather not carry the PCI burden of handling PANs.

Option B gives you full control of the checkout experience and suits integrations that already hold card data securely. It is not a shortcut — the compliance scope is real.

Both end in the same place, and you can mix them: store cards through the payment page and process them through the API, which is the combination most integrations settle on.


Things that catch people out

  • The authorization number is mandatory. A tag alone is rejected. Both values must be stored and sent together.
  • Only one completion per pre-authorization. A 31 can be captured once, for up to the original amount.
  • Refunds are capped at the original amount. Multiple partial 34s are allowed up to that ceiling.
  • Voids expire at batch close. After that, refund instead.
  • Tags can be shared across an enterprise. Business units under different merchant numbers can reference each other's tags where the relationship has been configured.

Related reading


Did this page help you?