Create Yolfi Checkout Session
yolfi_checkout_sessions_createCreate a hosted checkout session from an existing paylink or approved standalone amount and currency, with idempotency keys for safe retries.
Instructions
Create hosted checkout for an existing paylink or a server-approved standalone amount and currency. Reuse the same idempotencyKey for the same order on retries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Positive decimal string for standalone checkout, calculated by trusted server code. | |
| currency | No | Required for standalone checkout. Must match the approved order currency. | |
| metadata | No | Flat non-secret metadata with string, finite number, or boolean values. | |
| cancelUrl | No | Approved return URL when checkout is cancelled. | |
| paylinkId | No | Existing paylink ID. Omit amount and currency when supplied; the paylink determines the price. | |
| successUrl | No | Approved return URL after checkout. A redirect is not proof of payment. | |
| description | No | Optional customer-facing description of the approved purchase. | |
| customerName | No | Optional customer name already known to the merchant. | |
| customerEmail | No | Optional known customer email. Checkout must collect an email before creating a payment if it is absent. | |
| idempotencyKey | No | Stable retry key, required for standalone sessions and recommended for every order. Reuse with the identical request. | |
| subscriptionId | No | Existing subscription ID for a paylink-backed session only. | |
| merchantOrderId | No | Stable merchant-side order identifier for reconciliation. | |
| expiresInMinutes | No | Checkout lifetime in minutes; defaults to 60. | |
| clientReferenceId | No | Stable merchant customer or user ID for webhook attribution. |