Create a checkout for a cart
swop_create_checkoutTake payment on the seller's own website: creates a checkout for a cart of the linked account's OWN products, so a buyer pays there instead of being sent to Swop. For a single shareable link use swop_get_product_link instead. Prices come from the seller's catalogue and must NOT be sent — a price in the request is rejected. Shipping is charged automatically for physical products, and for those the buyer's name, email and delivery address are REQUIRED (the call is refused otherwise, naming what is missing). Rails: USDC on Solana always; set offerCard when the seller is card-enabled and every item is a physical good — then the response has cardOffered: true and paymentRequest is null until the buyer picks a rail on the seller's page via the public URLs POST /api/v5/checkout-intents/{intentId}/card-payment-intents (Stripe client secret for a Payment Element) or POST .../select-crypto (publishes the Solana Pay request). Otherwise paymentRequest is returned at once (a solana: URL the buyer's wallet opens, also fine as a QR code). Settlement is automatic once the payment lands — nothing to confirm; poll swop_get_checkout for status. Show the buyer the products, quantities and total before creating.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | The cart. Ids only — prices come from the catalogue | |
| buyerName | No | Buyer's name (required for physical items) | |
| offerCard | No | Offer card as well as USDC. Only takes effect when the seller is card-enabled and every item is physical; otherwise the checkout is USDC-only | |
| buyerEmail | No | Buyer's email, for the receipt (required for physical items) | |
| buyerPhone | No | Buyer's phone, for the courier | |
| description | No | What this checkout is for | |
| shippingAddress | No | Delivery address. Required when any item is a physical product |