---
title: "Start saving a payment method"
method: POST
path: "/v1/billing/payment-method/setup"
---

# Start saving a payment method

`POST /v1/billing/payment-method/setup`

## Request

- Base URL: `https://docs.greatwait.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.greatwait.dev/v1/billing/payment-method/setup`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer and API key in header `Greatwait-Environment` and API key in header `Greatwait-Project`

Creates a short-lived provider-hosted payment-method setup session for the verified organization and returns its address. It offers every payment method the provider account enables that can be charged later without the customer present — cards, Link and others. Saving one there charges nothing; it becomes the saved payment method only once billing.paymentmethodconfirm (when the browser returns) or the provider's notification reads the completed setup by authenticated provider call. An optional return address must share the origin of the configured billing page.

## Request body

- object
  - `returnUrl` string, uri

## Response `200`

Start saving a payment method

- object
  - `url` string, uri, required

## Other responses

- `400`: Problem document. Possible codes at this status: invalid_request.
- `401`: Problem document. Possible codes at this status: authentication_required, credential_expired, credential_revoked.
- `403`: Problem document. Possible codes at this status: scope_missing, test_to_live_escalation.
- `404`: Problem document. Possible codes at this status: not_found.
- `409`: Problem document. Possible codes at this status: project_archived, revision_conflict, state_conflict.
- `429`: Problem document. Possible codes at this status: rate_limited.
- `503`: Problem document. Possible codes at this status: capability_not_configured, service_unavailable.

---

[API](https://skmtc.dev/greatwait/apis/greatwait-v1.md) · [All operations](https://skmtc.dev/greatwait/apis/greatwait-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/greatwait/apis/greatwait-v1/revisions/6855bce23e72?raw)
