CreateCheckoutSessionRequest
Identify the product by `productId` or `productSlug`; at least one is required. When both are sent, `productId` wins.
Properties
| Name | Type | Description |
|---|---|---|
| productId | string | Product ID, a CUID returned by the API |
| productSlug | string | Product slug, the URL-safe name chosen when the product was created. An alternative to `productId`. |
| mode | string | Checkout mode: - `PAYMENT`: one-time payment - `SUBSCRIPTION`: subscription, binds the card - `SETUP`: save the card only, no charge |
| successUrl | string | Redirect URL after a successful payment. HTTPS is required in production. For local development the API also accepts `http://` on `localhost`, `127.0.0.1` and any `.local`, `.test` or `.dev` host. Sup |
| cancelUrl | string | Redirect URL when the customer cancels. HTTPS is required in production; the same local-development hosts allowed for `successUrl` are accepted here. |
| customerEmail | string | Pre-fill the customer's email (optional). When omitted, the customer enters it on the checkout page. An email is always required to complete checkout, for the receipt. |
| customerName | string | Pre-fill the customer's name (optional). When omitted, the customer can enter it on the checkout page. |
| promotionCode | string | Promotion code to apply up front (optional). The discount is calculated at creation and recorded on the session and the order. |
| collectPaymentMethod | string | When to collect a card: - `always` (default): ask for a card even at NT$0, with an NT$2 verification charge - `if_required`: skip the card at NT$0 and complete the subscription directly |
| metadata | object | Custom metadata (secret key only) |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/recur-tw/json-schema/recur-tw-create-checkout-session-request-schema.json",
"title": "CreateCheckoutSessionRequest",
"description": "Identify the product by `productId` or `productSlug`; at least one is required.\nWhen both are sent, `productId` wins.\n",
"x-generated": "2026-11-23",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/recur-tw-openapi.json#/components/schemas/CreateCheckoutSessionRequest",
"type": "object",
"required": [
"successUrl",
"cancelUrl"
],
"anyOf": [
{
"required": [
"productId"
]
},
{
"required": [
"productSlug"
]
}
],
"properties": {
"productId": {
"type": "string",
"description": "Product ID, a CUID returned by the API"
},
"productSlug": {
"type": "string",
"description": "Product slug, the URL-safe name chosen when the product was created.\nAn alternative to `productId`.\n"
},
"mode": {
"type": "string",
"enum": [
"PAYMENT",
"SUBSCRIPTION",
"SETUP"
],
"default": "PAYMENT",
"description": "Checkout mode:\n- `PAYMENT`: one-time payment\n- `SUBSCRIPTION`: subscription, binds the card\n- `SETUP`: save the card only, no charge\n"
},
"successUrl": {
"type": "string",
"format": "uri",
"description": "Redirect URL after a successful payment. HTTPS is required in production.\nFor local development the API also accepts `http://` on `localhost`, `127.0.0.1`\nand any `.local`, `.test` or `.dev` host.\nSupports the `{CHECKOUT_SESSION_ID}` placeholder.\n"
},
"cancelUrl": {
"type": "string",
"format": "uri",
"description": "Redirect URL when the customer cancels. HTTPS is required in production; the same\nlocal-development hosts allowed for `successUrl` are accepted here.\n"
},
"customerEmail": {
"type": "string",
"format": "email",
"description": "Pre-fill the customer's email (optional).\nWhen omitted, the customer enters it on the checkout page.\nAn email is always required to complete checkout, for the receipt.\n"
},
"customerName": {
"type": "string",
"description": "Pre-fill the customer's name (optional).\nWhen omitted, the customer can enter it on the checkout page.\n"
},
"promotionCode": {
"type": "string",
"description": "Promotion code to apply up front (optional).\nThe discount is calculated at creation and recorded on the session and the order.\n"
},
"collectPaymentMethod": {
"type": "string",
"enum": [
"always",
"if_required"
],
"default": "always",
"description": "When to collect a card:\n- `always` (default): ask for a card even at NT$0, with an NT$2 verification charge\n- `if_required`: skip the card at NT$0 and complete the subscription directly\n"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"description": "Custom metadata (secret key only)"
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/json-schemas/recur-tw-create-checkout-session-request"
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.