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,
  "fallbackAuthAmount": 1.5
}'

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.

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.

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.

Body

customerData
object

Object describing the Customer/Payor owner of payment method. Required for POST requests. Which fields are required depends on the paypoint's custom identifier settings. See PayorData Object Model for a complete reference.

entryPoint
string | null

Entrypoint identifier. Required for POST requests.

Maximum length: 50
fallbackAuth
boolean | null
default:
false

When true, if tokenization fails, Payabli will attempt an authorization transaction to request a permanent token for the card. If the authorization is successful, the card will be tokenized and the authorization will be voided automatically.

fallbackAuthAmount
number | null
default:
1

The amount for the fallbackAuth transaction. Defaults to one dollar.

methodDescription
string | null

Custom description for stored payment method.

paymentMethod
object

Information about the payment method for the transaction.

source
string | null

Custom identifier to indicate the source for the request

Maximum length: 100
subdomain
string | null

Refers to the payment page identifier. If provided, then the transaction is linked to the payment page.

Maximum length: 50

Response

200 - application/json
isSuccess
boolean

Boolean indicating whether the operation was successful. A true value indicates success. A false value indicates failure.

responseData
object | null

The object containing the response data.

responseText
string | null

Response text for operation: 'Success' or 'Declined'.