Checkout Sessions
A Checkout Session generates a hosted payment page at pay.ynopay.com. The customer selects their preferred rail and completes payment.
Create a Checkout Session
POST /v1/checkout_sessions| Param | Type | Required |
|---|---|---|
paymentIntentId | string | No* |
priceId | string | No* |
*Provide either paymentIntentId or priceId.
Response
{
"id": "cs_abc123",
"object": "checkout_session",
"url": "https://pay.ynopay.com/cs_abc123",
"status": "open",
"expiresAt": 1716003600
}Retrieve / List
GET /v1/checkout_sessions/:id
GET /v1/checkout_sessionsStatuses
| Status | Description |
|---|---|
open | Waiting for customer payment |
complete | Payment confirmed |
expired | Session timed out |