Credential on File Best Practices
Credential on File (CoF) refers to stored payment credentials used for future transactions. Proper CoF flags are required by Visa and Mastercard to reduce declines.
Transaction Types
| Type | Who Initiates | Example | Parameter |
|---|---|---|---|
| Customer-Initiated (CIT) | Cardholder | One-click checkout | initiated_by=customer |
| Merchant-Initiated (MIT) | Merchant | Subscription renewal | initiated_by=merchant |
First Storage
$post['customer_vault'] = 'add_customer';
$post['initiated_by'] = 'customer';
$post['stored_credential_indicator'] = 'stored';
Subsequent MIT Charges
$post['initiated_by'] = 'merchant';
$post['stored_credential_indicator'] = 'used';
$post['initial_transaction_id'] = $original_txn_id;
Save the
transactionid from the initial CoF transaction — it's required as initial_transaction_id on all subsequent merchant-initiated charges.