Create a setup intent

Creates a setup intent. If successfully created, it returns a setup intent object that contains information related to the setup intent.

SecurityOAuth2
Request
Request Body schema: application/json
customerId
required
string <uuid>

The unique identifier for the customer record.

usage
required
string (Usage)
Default: "ON_SESSION"

The usage of the setup intent. Use ON_SESSION for payments made when customer are present and OFF_SESSION for payments made when customer are not present.

Enum: "ON_SESSION" "OFF_SESSION"
Responses
201

Successful operation. Setup intent created.

400

Bad request / Missing required fields.

401

Unauthorized.

403

Forbidden.

500

Internal server error.

post/v1/setup-intents
Request samples
application/json
{
  • "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",
  • "usage": "ON_SESSION"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",
  • "sessionSecret": "string",
  • "paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",
  • "status": "REQUIRES_PAYMENT_METHOD",
  • "usage": "ON_SESSION"
}