Creates a token from card or check details, with no transaction attached.
POST
/api/tokens/create-standalone-async
deprecated
No permission required.
The details are validated and stored encrypted, and the response carries the token identifiers, numeric and card-format, alongside a masked echo of what was stored. Use this to store a payment method before charging it; to store one while charging it, ask for tokenization on the transaction instead. A card needs its account number in the clear. This call takes no device data and decrypts nothing, so it can't tokenize an encrypted card read from a payment terminal. Send the read on a zero-dollar `Authorization` instead, which decrypts it and takes the account number from it, and then create the token from that transaction with `POST /api/tokens/create-from-transaction-async`.
Signed in, you can send this request to your own sandbox merchant from the console and read the answer. Sign in to try it.
Example request
Each example below is one request, shown in every language. Choose an example and a language, then replace {{BASE_URL}} with the address of the API you are calling and {{API_KEY}} with your own key.
The request body is a CreateStandaloneTokenRequestDto. See the Request body section below for its fields.
Parameters
Request body
application/json
, required
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
merchantId
required |
string (uuid) |
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||||||||||||||||
customerId
required |
string (uuid) |
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||||||||||||||||
paymentDetails
required |
PaymentDetailSnapshot PaymentDetailSnapshot | Conditional: When PaymentDetails is not null.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||||||||||||||||
Fields of PaymentDetailSnapshot:
This body has no documented fields. | |||||||||||||||||||||||||||||||||||||||||||||||
type
required |
TokenType TokenType | Defines the supported token types used in transaction-related models. Also aliased as the
platform's payment-method category (`InitializeContext` imports it as
`PaymentMethodCategory`), which is what the processor-profile pre-filter narrows on.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||||||||||||||||
category
required |
TokenCategory TokenCategory | Defines the category of a token used in transaction processing.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||||||||||||||||
idempotencyKey
required |
string | Optional caller-supplied key that makes this create safe to retry. Send the same key with the
same payment details and the gateway returns the token it already minted instead of minting a
second one, so a timeout or a network retry during a bulk import cannot leave you with two
vault records for one card.
Conditional: When IdempotencyKey is not empty.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||||||||||||||||
storedCredentialConsent
required |
TokenStoredCredentialConsentInput TokenStoredCredentialConsentInput | The cardholder's stored-credential consent, when you obtained it outside the platform before
vaulting the card (for example on a payment terminal's screen or a signed form). Optional. The
card or bank account is stored on the customer as a stored payment method and the consent is
recorded against it, so a later merchant-initiated charge on the token resolves it.
Conditional: When StoredCredentialConsent is not null.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||||||||||||||||
Fields of TokenStoredCredentialConsentInput:
This body has no documented fields. | |||||||||||||||||||||||||||||||||||||||||||||||
This request body has no documented fields.
Responses
Body:
CreateStandaloneTokenResponseDto
CreateStandaloneTokenResponseDto
Each item has these fields.
| Field | Type | Description | |||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
required |
string (uuid) | The internal vault record id of the minted token. Deprecated for external use: charge with
`publicReference` instead.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
numericToken
required |
integer (int64) | Legacy numeric form of the token, retained for existing internal callers and back-compat.
Not the preferred external handle: use `publicReference`.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
cardFormatToken
required |
string | Legacy card-format (PAN-shaped) form of the token, retained for existing internal callers and
back-compat. Not the preferred external handle: use `publicReference`.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
publicReference
required |
string | The chargeable public reference of the minted token (the opaque `pt_`-prefixed handle).
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
maskedPaymentDetails
required |
PaymentDetailSnapshot PaymentDetailSnapshot |
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
Fields of PaymentDetailSnapshot:
This body has no documented fields. | |||||||||||||||||||||||||||||||||
type
required |
TokenType TokenType | Defines the supported token types used in transaction-related models. Also aliased as the
platform's payment-method category (`InitializeContext` imports it as
`PaymentMethodCategory`), which is what the processor-profile pre-filter narrows on.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
category
required |
TokenCategory TokenCategory | Defines the category of a token used in transaction processing.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
idempotencyStatus
required |
StandaloneTokenCreateIdempotencyStatus StandaloneTokenCreateIdempotencyStatus | What create idempotency did to the request that produced this response.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
storedCredentialConsentId
required |
string (uuid) | The id of the stored-credential consent recorded by a token create whose request carried one
(a standalone create or a mint from a transaction); null otherwise. A later merchant-initiated
charge on the token resolves the consent automatically, so sending this id as
`storedCredentialConsentId` is optional.
nullable
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
consentedCardPrice
required |
ConsentedCardPriceDto ConsentedCardPriceDto | The dual pricing card price the stored-credential consent recorded, as the platform priced it
from the merchant's configuration. Read-only: never taken from the request. Null when the request
carried no consent, or when the consent recorded no card price.
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| |||||||||||||||||||||||||||||||
Fields of ConsentedCardPriceDto:
This body has no documented fields. | |||||||||||||||||||||||||||||||||
This response has no documented body fields.
The request was refused because a rate limit was exceeded, or because something a later retry can clear stopped it. A rate limit refusal carries an `application/problem+json` body: wait at least the interval `Retry-After` names before retrying, then back off. Limits are tuned per deployment, so read the allowance from the response headers rather than assuming a fixed ceiling. Any other refusal carries the standard error envelope as `application/json`, and its `error.code` names the cause.
Body:
RemoteServiceErrorResponse
RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description |
|---|---|---|
error
required |
RemoteServiceErrorInfo RemoteServiceErrorInfo |
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
|
This response has no documented body fields.
- 400 Bad Request Bad request. The request was malformed or failed validation. When validation rejected it, `error.validationErrors` names each member at fault and why.
- 401 Unauthorized Unauthorized. The request carried no API key or signed-in session, or the key it carried is invalid, revoked or expired.
- 403 Forbidden Forbidden. The API key lacks the scope this operation needs, the signed-in user lacks the permission, or a business rule refused the request. The error code in the body names the reason.
- 404 Not Found Not found. The resource the request names does not exist or is not visible to the caller: a resource that belongs to a merchant or tenant outside the caller's scope is reported as not found.
- 500 Internal Server Error Internal server error. The platform failed unexpectedly while handling the request. If it keeps failing, contact support and quote the correlation id, which the response carries in the `X-Correlation-Id` header and as `error.data.correlationId`.
- 501 Not Implemented Not implemented. The operation is declared but has no implementation on this deployment, so no request to it can succeed. Retrying does not help.
- default The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. The error reference lists the values `error.code` can take.The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. The error reference lists the values `error.code` can take.
Body:
RemoteServiceErrorResponse
RemoteServiceErrorResponse
Each item has these fields.
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error
required |
RemoteServiceErrorInfo RemoteServiceErrorInfo |
Values:
Values combine: send one or more member names separated by a comma and a space, or the integer sum of their values. Responses carry the names.
| ||||||||||||||||||
Fields of RemoteServiceErrorInfo:
This body has no documented fields. | ||||||||||||||||||||
This response has no documented body fields.
Errors
A failed request returns the platform error envelope. The
error reference lists every value
error.code can carry and shows the four response shapes.
Authentication
ApiKeywith scopes