---
title: "Confirm a saved payment method"
method: POST
path: "/v1/billing/payment-method/confirm"
---

# Confirm a saved payment method

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

## 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/confirm`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer and API key in header `Greatwait-Environment` and API key in header `Greatwait-Project`

Makes the payment method saved in one completed hosted setup the organization's saved payment method, typically when the browser returns from it. The session is read by authenticated provider call and must belong to the verified organization's own customer; a session of another organization is answered not found. It becomes the provider default for invoices, the default of the organization's project subscription, and the automatic top-up payment method — readying a top-up rule that was waiting for one. The response has the shape billing.paymentmethod returns. When the previous method was removed (billing.paymentmethodremove) and the paid period it let run out has not ended, renewal resumes for the projects that removal stopped; a project the customer cancelled themselves stays cancelled. Nothing in the request can claim a setup succeeded, and repeating the call is safe.

## Request body

- object
  - `checkoutSession` string, required

## Response `200`

Confirm a saved payment method

- object
  - `card` object, nullable, required
    - `brand` string, required
    - `last4` string, required
    - `expMonth` integer, required
    - `expYear` integer, required
  - `method` union, required
    - object
      - `brand` string, required
      - `last4` string, required
      - `expMonth` integer, required
      - `expYear` integer, required
      - `type` 'card', required
      - `label` string, required
    - object
      - `type` 'link', required
      - `label` string, required
      - `email` string, nullable, required
    - object
      - `type` 'other', required
      - `label` string, required
      - `providerType` string, 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)
