---
title: "Refresh saved payment methods from Stripe"
method: POST
path: "/v1/billing/payment-methods/sync"
tags: ["billing"]
---

# Refresh saved payment methods from Stripe

`POST /v1/billing/payment-methods/sync`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/billing/payment-methods/sync`
- Auth: HTTP bearer

Re-sync the saved-card list from Stripe (self-heal), then return it with ``refreshed`` saying whether Stripe was actually read. A false ``refreshed`` means the list is the last state we saved, not the current one.

## Headers

- `X-Tenant-Id` string, nullable

## Response `200`

Successful Response

- PaymentMethodSyncResult: POST /v1/billing/payment-methods/sync: the saved cards, plus whether Stripe was actually read. The list alone cannot tell a caller which answer it got: a Stripe outage returns the local rows unchanged, and those look exactly like a successful sync that found the same cards. ``refreshed`` is the field that separates them, and ``notice`` is the sentence to show the person when it is false, so a card that Stripe has and we do not is visible instead of simply absent.
  - `items` PaymentMethodView[], required
    - `id` string, uuid, required
    - `stripe_payment_method_id` string, required
    - `brand` string, nullable, required
    - `last4` string, nullable, required
    - `exp_month` integer, nullable, required
    - `exp_year` integer, nullable, required
    - `is_default` boolean, required
  - `refreshed` boolean, required: True when the saved cards were re-read from Stripe just now. False means the list is the last state we saved, either because this workspace has no billing account yet or because Stripe could not be reached.
  - `notice` string, nullable: A sentence to show the person when the refresh did not happen; null when it did.

## Other responses

- `400`: Malformed request (unknown plan, or no billing account yet).
- `401`: Unauthorized
- `403`: Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)
- `409`: Conflict
- `422`: Validation error
- `502`: The payment provider call failed.
- `503`: Billing is not configured on this deployment.

---

[API](https://skmtc.dev/patricia/apis/patricia-api.md) · [All operations](https://skmtc.dev/patricia/apis/patricia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/patricia/apis/patricia-api/revisions/0dfb44495ea1?raw)
