Create single use token

View as MarkdownOpen in Claude
Use this method to create a single-use token that represents a customer’s payment details. A single-use token expires after 30 minutes and merchants can use them only once. **Note:** To create a reusable permanent token, go to [Create Secure Token](https://docs.payroc.com/api/schema/tokenization/secure-tokens/create). In the request, send the customer’s payment details. If the request is successful, our gateway returns a token that you can use in a follow-on action, for example, [run a sale](https://docs.payroc.com/api/schema/card-payments/payments/create).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

processingTerminalIdstringRequired4-50 characters
Unique identifier that our gateway assigned to the terminal.

Headers

Idempotency-KeystringRequiredformat: "uuid"
Unique identifier that you generate for each request. You must use the [UUID v4 format](https://www.rfc-editor.org/rfc/rfc4122) for the identifier. For more information about the idempotency key, go to [Idempotency](https://docs.payroc.com/api/idempotency).

Request

This endpoint expects an object.
channelenumRequired
Channel that the merchant used to receive the payment details.
Allowed values:
sourceobjectRequired

Polymorphic object that contains the payment method to tokenize.

The value of the type parameter determines which variant you should use:

  • ach - Automated Clearing House (ACH) details
  • pad - Pre-authorized debit (PAD) details
  • card - Payment card details
operatorstringOptional1-50 characters
Operator who initiated the request.

Response headers

locationstring
URI reference to created resource.

Response

Successful request. We created the single-use token.

processingTerminalIdstringRead-only4-50 characters
Unique identifier that we assigned to the terminal.
tokenstringRead-only=128 characters

Unique identifier that our gateway assigned to the payment details.
Note: Merchants can use the token with other terminals linked to their account.

expiresAtdatetimeRead-only

Date and time that the token expires. We return this value in the ISO 8601 format.

sourceobject

Polymorphic object that contains the payment method that we tokenized.

The value of the type parameter determines which variant you should use:

  • ach - Automated Clearing House (ACH) details
  • pad - Pre-authorized debit (PAD) details
  • card - Payment card details

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
409
Conflict Error
415
Unsupported Media Type Error
500
Internal Server Error