Adding Customers to the Vault
During a Transaction
$post = array(
'security_key' => YOUR_PRIVATE_KEY,
'type' => 'sale',
'amount' => '29.99',
'payment_token' => $payment_token,
'customer_vault' => 'add_customer',
'firstname' => 'Jane', 'lastname' => 'Smith',
'email' => 'jane@example.com',
'address1' => '456 Oak Ave',
'city' => 'Tampa', 'state' => 'FL', 'zip' => '33601',
);
$result = gateway_post($post);
$vault_id = $result['customer_vault_id']; // Save this
Vault-Only (No Charge)
$post = array(
'security_key' => YOUR_PRIVATE_KEY,
'customer_vault' => 'add_customer',
'payment_token' => $payment_token,
'firstname' => 'Jane', 'lastname' => 'Smith',
'email' => 'jane@example.com',
);
Response Fields
| Field | Description |
customer_vault_id | The vault ID — store this in your database |
response | 1=Success, 2=Failed, 3=Error |
transactionid | Transaction ID if a sale was also processed |