Skip to main content
POST
/
tokenization_requests
Create a tokenization request
curl --request POST \
  --url https://api.withacclaim.com/v1/tokenization_requests \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payer_id": "pyr_AbC123XyZ",
  "description": "Tokenize payment method for customer",
  "metadata": {
    "custom_field": "value",
    "source": "api"
  }
}
'
{
  "id": "trq_XyZ789AbC",
  "status": "RequiresPaymentMethod",
  "payer_id": "pyr_AbC123XyZ",
  "payment_method": {},
  "session_identifier": "trq_XyZ789AbC_abc123...",
  "description": "Tokenize payment method for customer",
  "failure_code": "validation_failed",
  "failure_message": "Payment method validation failed",
  "expires_at": "2025-12-31T23:59:59Z",
  "completed_at": "2025-10-08T18:25:00Z",
  "ip_address": "192.168.1.1",
  "user_agent": "Mozilla/5.0...",
  "metadata": {
    "custom_field": "value",
    "source": "api"
  },
  "created_at": "2025-10-08T18:20:31Z",
  "updated_at": "2025-10-08T18:25:00Z"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
payer_id
string | null

ID of the payer to associate with this tokenization request

Example:

"pyr_AbC123XyZ"

description
string | null

Optional description of the tokenization request

Maximum string length: 255
Example:

"Tokenize payment method for customer"

metadata
object

Optional metadata as key-value pairs

Example:
{ "custom_field": "value", "source": "api" }

Response

Tokenization request created.

id
string
Example:

"trq_XyZ789AbC"

status
enum<string>

Current status of the tokenization request

Available options:
RequiresPaymentMethod,
RequiresAction,
Processing,
Succeeded,
Failed,
Canceled
Example:

"RequiresPaymentMethod"

payer_id
string | null

ID of the payer associated with this tokenization request

Example:

"pyr_AbC123XyZ"

payment_method
object

Payment method associated with this tokenization request

session_identifier
string

External session identifier for this tokenization request

Example:

"trq_XyZ789AbC_abc123..."

description
string | null

Optional description of the tokenization request

Example:

"Tokenize payment method for customer"

failure_code
string | null

Error code if the tokenization request failed

Example:

"validation_failed"

failure_message
string | null

Human-readable error message if the tokenization request failed

Example:

"Payment method validation failed"

expires_at
string<date-time> | null

When the tokenization request expires

Example:

"2025-12-31T23:59:59Z"

completed_at
string<date-time> | null

When the tokenization request was completed

Example:

"2025-10-08T18:25:00Z"

ip_address
string | null

IP address of the client making the tokenization request

Example:

"192.168.1.1"

user_agent
string | null

User agent string of the client making the tokenization request

Example:

"Mozilla/5.0..."

metadata
object

Optional metadata as key-value pairs

Example:
{ "custom_field": "value", "source": "api" }
created_at
string<date-time>
Example:

"2025-10-08T18:20:31Z"

updated_at
string<date-time>
Example:

"2025-10-08T18:25:00Z"

Last modified on April 14, 2026