Save a payment method
Learn how to use the Payabli API to add and manage saved payment methods
This guide explains how to save a payment method for reuse via tokenization with the Payabli API. This call exchanges sensitive payment information for a token that you can use to process future transactions.
PCI information
Because improperly handling customer card data can result in fines and impact your ability to process transactions, you must understand and fulfill PCI security requirements. When using the direct-access APIs, you must make sure that your systems and practices meet PCI requirements.
If you have any questions about how to maintain PCI compliance, reach out to the Payabli team.
Build the request
Send a POST request to /api/TokenStorage/add
to save a payment method. For complete information, see the API reference for this endpoint.
This endpoint accepts several optional parameters that you can use to customize the request.
Creates a temporary, one-time-use token for the payment method that expires in 12 hours.
When true
, enables real-time validation of ACH account. This is an add-on feature. Contact Payabli for more information.
When set to true
, a new customer record will be created even if an existing customer record is found. Possible values: true
or false
. Default is false
.
When true
, the request doesn’t require you to pass the customerData
object, and creates the token with no customer information attached. When the token is used to make a payment for the first time, it will be associated to the customer making the payment.
The response returns a ReferenceId
, which is both the storedMethodId
to use with transactions, and the methodId
used to manage the payment method.
Examples
These examples show how to save various payment methods using the API.
Tokenize a card
Create anonymous Token
Convert a temp token to permanent
Managing tokenized payment methods
You can manage saved payment methods with the following endpoints: