Checkout links API
Reusable hosted checkout URLs
llms.txtReusable hosted checkout URLs
Create checkout link
POST /v1/checkout-links
Body (createCheckoutLinkSchema):
| Field | Type | Required |
|---|---|---|
label | string | Yes |
productIds | string[] | Yes |
successUrl | string | No |
returnUrl | string | No |
active | boolean | No |
discountId | string | null | No |
metadata | object | No |
Response 201 - checkout link object including public URL fields from service.
Get checkout link
GET /v1/checkout-links/:id
Response 200 or 404.
const link = await kwit.checkoutLinks.create({
label: "Pro Plan",
productIds: [productId],
successUrl: "https://your-app.com/success",
});