Skip to content

Checkout Session ​

A Checkout Session represents your customer's session as they pay for one-time purchases or subscriptions through Paylinker Checkout.

The Session Object ​

The session object contains all the information about the transaction, including the line items, the customer, and the status of the payment.

json
{
  "id": "cs_test_a1b2c3d4",
  "object": "checkout.session",
  "mode": "payment",
  "payment_status": "unpaid",
  "status": "open",
  "url": "https://checkout.paylinker.com/c/pay/cs_test_a1b2c3d4"
}

Session Lifecycle ​

  1. Creation: You create a session on your backend.
  2. Redirection: You redirect the customer to the url.
  3. Completion: The customer enters payment details and confirms.
  4. Fulfillment: Paylinker redirects the customer to your success_url and sends a webhook.

Expiration ​

Sessions expire after 24 hours. You can also manually expire a session if you need to cancel the order flow.

bash
curl https://api.paylinker.com/v1/checkout/sessions/cs_test_a1b2.../expire \
  -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
  -X POST

Released under the MIT License.