---
title: "Create a checkout session for credit payment"
method: POST
path: "/v1/billing-accounts/{id}/credit-checkout-session"
tags: ["Billing"]
---

# Create a checkout session for credit payment

`POST /v1/billing-accounts/{id}/credit-checkout-session`

## Request

- Base URL: `https://rest.compute.cudo.org`
- URL: `https://rest.compute.cudo.org/v1/billing-accounts/{id}/credit-checkout-session`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/cudocompute/apis/cudo-compute-service/docs/v1/billing-accounts/:id/credit-checkout-session/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a checkout session for adding credit to a billing account.

## Path parameters

- `id` string, required

## Query parameters

- `amount.value` string
- `returnUrl` string, required

## Response `200`

A successful response.

- CheckoutSession
  - `clientSecret` string, required

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/cudocompute/apis/cudo-compute-service.md) - [All operations](https://skmtc.dev/cudocompute/apis/cudo-compute-service/llms.txt) - [OpenAPI document](https://skmtc.dev/cudocompute/apis/cudo-compute-service/revisions/93dc40dababc?raw)
