Store card or ACH payment information for a customer in Payjunction’s secure Vault.
The billing address for the payment can also be specified.
Maximum vaults per customer: 50
Parameters
Prior Transaction
required | name | format | description |
---|---|---|---|
* | transactionId | Numeric | An existing transactionId to attach as a new vault under the customer |
Address information must still be added to the vault by either referencing an addressId or by including the address information as specified in the optional parameters below for AVS verification on card accounts. This applies whether or not an address was used on the original transaction that created the transactionId.
It is recommended for transactionIds on card accounts to check the AVS results of the original transaction using GET /transactions/{transactionId} and to use the address information from the transaction details for the vault address information to prevent unexpected declines.
ACH
required | name | format | description |
---|---|---|---|
* | achRoutingNumber | ABA Routing Number | ACH Routing Number |
* | achAccountNumber | [0-9]{,17} | ACH Account Number |
* | achAccountType | CHECKING, SAVINGS | ACH Account Type |
* | achType | CCD, PPD | Default ACH Type |
CARD
required | name | format | description |
---|---|---|---|
* | cardNumber | 5105105105105100, 5105-1051-0510-5100, 5105 1051 0510 5100 |
Valid Card Number |
* | cardExpMonth | 1-12 | Card Expiration Month |
* | cardExpYear | YYYY, YY | Card Expiration Year |
Token
required | name | format | description |
---|---|---|---|
* | tokenId | Valid Token ID | A Token ID created using JavaScript Tokenization. |
required | name | format | description |
---|---|---|---|
address | Text, Max Length 128 | Billing Address | |
city | Text, Max Length 32 | Billing City | |
state | Text, Max Length 32 | Billing State | |
zip | Text, Max Length 12 | Billing Zip | |
addressId | Address Id of an existing Customer Address. If present, this address will be used as the Billing Address for the Vault. The other address parameters will be ignored. |
Example Response
{ "vaultId": 942, "uri": "https://api.payjunctionlabs.com/customers/916/vaults/942", "customerId": 916, "type": "ACH", "accountType": "CHECKING", "lastFour": "6789", "achRoutingNumber": "104000016", "achType": "PPD", "created": "2013-11-19T04:05:30Z", "lastModified": "2013-11-19T04:05:30Z", "address": { "addressId": 878, "uri": "https://api.payjunctionlabs.com/customers/916/addresses/878", "address": "123 State St", "city": "Santa Barbara", "state": "CA", "zip": "93105", "created": "2013-11-19T04:05:30Z", "lastModified": "2013-11-19T04:05:30Z" } }