Skip to main content
POST
Create a setup request

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 setup request

Example:

"pyr_AbC123XyZ"

description
string | null

Optional description of the setup request

Maximum string length: 255
Example:

"Tokenize payment method for customer"

metadata
object | null

Optional metadata as key-value pairs

Example:

Response

Setup request created.

id
string
Example:

"trq_XyZ789AbC"

status
enum<string>

Current status of the setup request

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

"RequiresPaymentMethod"

payer_id
string | null

ID of the payer associated with this setup request

Example:

"pyr_AbC123XyZ"

payment_method
object | null

Payment method associated with this setup request

session_identifier
string

External session identifier for this setup request

Example:

"trq_XyZ789AbC_abc123..."

description
string | null

Optional description of the setup request

Example:

"Tokenize payment method for customer"

failure_code
string | null

Error code if the setup request failed

Example:

"validation_failed"

failure_message
string | null

Human-readable error message if the setup request failed

Example:

"Payment method validation failed"

expires_at
string<date-time> | null

When the setup request expires

Example:

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

completed_at
string<date-time> | null

When the setup request was completed

Example:

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

ip_address
string | null

IP address of the client making the setup request

Example:

"192.168.1.1"

user_agent
string | null

User agent string of the client making the setup request

Example:

"Mozilla/5.0..."

metadata
object | null

Optional metadata as key-value pairs

Example:
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 June 14, 2026