---
title: "Get checkout URL"
method: POST
path: "/accounts/payment/checkout-url"
tags: ["Payment"]
---

# Get checkout URL

`POST /accounts/payment/checkout-url`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/payment/checkout-url`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/payment/checkout-url/post.ts> (a function with typed inputs; its response is checked against the schema)

Generates a Stripe checkout URL for subscription

## Request body

- CheckoutURLRequest
  - `base_subscription` string, required: Base subscription price ID
  - `addons` object[]: Subscription addons
    - `id` string, required: Addon price ID
    - `type` string, required: Addon type
    - `quantity` number, required: Quantity

## Response `200`

Checkout URL generated successfully

- object
  - `data` string, uri, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized

## Changes

- **2025-06-12** `4979dfd00eda`: 1 breaking, 1 info
  - the response's body type changed from `string` to `object`, and format from `uri` to no format for status `200`
  - added the required property `data` to the response with the `200` status
- **2025-06-10** `964e2801b73d`: 2 breaking, 1 info
  - added the new required request property `base_subscription`
  - the request's body type changed from no type to `object`
  - added the new optional request property `addons`
- **2025-06-06** `b675c0d97cbd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/payment/checkout-url/post.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
