POST
/
TokenStorage
/
add
curl --request POST \
--url https://api-sandbox.payabli.com/api/TokenStorage/add \
--header 'Content-Type: application/json' \
--header 'requestToken: <api-key>' \
--data '{
"paymentMethod": {
"method": "card",
"cardnumber": "4111111111111111",
"cardexp": "02/25",
"cardcvv": "123",
"cardzip": "12345",
"cardHolder": "John Doe"
},
"customerData": {
"customerId": 4440
},
"entryPoint": "f743aed24a",
"fallbackAuth": true
}'
{
  "isSuccess": true,
  "responseText": "Success",
  "responseData": {
    "ReferenceId": "1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440",
    "ResultCode": 1,
    "ResultText": "Cancelled",
    "CustomerId": 4440,
    "methodReferenceId": "1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440"
  }
}

If you are converting a temporary token to a permanent token, note that the field is tokenId in requests to this endpoint, not storedMethodId.

Authorizations

requestToken
string
header
required

Most endpoints require an organization token. Some endpoints require an application token, and those endpoints are noted.

Headers

idempotencyKey
string

A unique ID you can include to prevent duplicating objects or transactions if a request is sent more than once. This key is not generated in Payabli, you must generate it yourself.

Example:

"6B29FC40-CA47-1067-B31D-00DD010662DA"

Query Parameters

temporary
boolean
default:false

Creates a temporary, one-time-use token for the payment method that expires in 12 hours.

forceCustomerCreation
boolean
default:false

When true, the request creates a new customer record, regardless of whether customer identifiers match an existing customer.

achValidation
boolean
default:false

When true, enables real-time validation of ACH account and routing numbers. This is an add-on feature, contact Payabli for more information.

Example:

"true"

createAnonymous
boolean

When true, creates a saved method with no associated customer information. The token will be associated with customer information the first time it's used to make a payment. Defaults to false.

Example:

true

Body

The body for the token storage request.

The body is of type object.

Response

200
application/json

Success

The response is of type object.