High Wire Payments
Payments

Create a checkout session

Creates a hosted checkout session for the total of the supplied line items and returns its URL. Payment-method saving is enabled by default and requires a customer email; set enablePaymentMethodSave to false to opt out.

POST
/v1/payments/checkout-session
AuthorizationBasic <token>

Basic HTTP authentication

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/payments/checkout-session" \  -H "Content-Type: application/json" \  -d '{    "lineItems": [      {        "name": "Test Widget",        "amount": 2000,        "quantity": 1      }    ],    "successUrl": "https://merchant.example.com/success?session_id={CHECKOUT_SESSION_ID}",    "cancelUrl": "https://merchant.example.com/cancel"  }'
{  "paymentId": "01928e3e-7b6c-7c8e-9b3a-5b9f8b9b9b9b",  "status": "PENDING",  "amount": 7200,  "sessionId": "cs_test_a1B2c3D4",  "sessionUrl": "https://checkout.stripe.com/c/pay/cs_test_a1B2c3D4",  "customerId": "01928e3e-7b6c-7c8e-9b3a-5b9f8b9b9bcc",  "paymentMethodId": "01928e3e-7b6c-7c8e-9b3a-5b9f8b9b9bff"}