Each Customer object can have multiple Payment Account objects attached to it. PaySimple supports two payment method account types: Credit Card and ACH (bank account).
Account Objects
Account objects are used when creating payments. The Customer associated with the Account specified in the new Payment is associated with the newly created Payment.
For Example:
- Credit Card object (AccountId 12345) is associated with Customer (CustomerId 6789)
- A Payment is collected for AccountId 12345
- The Resulting Payment object is associated with both AccountId 12345 and CustomerId 6789
- For each Customer, one Credit Card Account Id can be set as the default credit card account and one bank account can be set at the default ACH account object. Default accounts enable more direct routes for processing payments, as they remove the need to select one of several saved payment accounts prior to processing a payment.
API 4.0 can be used to create new Credit Card and ACH (bank account) objects, as well as to view saved accounts, edit saved accounts, delete saved accounts, manage default accounts, and list all accounts associated with an individual Customer object.
When processing a payment for an existing customer you have the option of charging the default ACH or CC account, charging any non-default ACH or CC account, or entering a new ACH or CC account as part of the payment process.
Default Accounts
Default payment accounts are used to quickly process new payments and without requiring a selection from a list of all available payment accounts.
Default credit card and ACH accounts are changed via the Set Default ACH/CC route.
When making the change, you always set the new default account; you never un-designate the existing default account.
The default designation can be assigned for a NEW payment account when it is entered (Method = POST), by setting the IsDefault field to "true." However, it cannot be changed by changing the value of the IsDefault field for an existing payment account object (Method = PUT).
If you delete the existing default Credit Card or ACH Account, the system will automatically designate the oldest remaining account of the deleted type as the new default. For Example:
- Credit Card AccountID 1234 was CreatedOn 12/1/2013 and set as the default credit card
- Credit Card AccountId 789 was CreatedOn 11/1/2013
- Credit Card AccountId 456 was CreatedOn 10/1/2013
- Credit Card AccoutId 1234 is Deleted
- The system will set Credit Card AccountId 456 as the new default credit card
If you would like a different account set as default, you will need to use the route described in this section to change it.