/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Get Payment Method

Get Payment Method

Get the card on file for an organization

GET/v1/billing/payment-methodTry it
Session token

Returns the card an organization pays with. The card is the organization's default payment method for invoices, or its first saved card when no default card is set. Only the brand, last four digits, expiry and billing email are returned — never the card number.

Note

Requires a session JWT and the admin or owner role in the organization. A member gets 403 forbidden ("Only admins can view the payment method"), and so does anyone who is not a member of the organization. API keys are not accepted on billing endpoints. Any plan.

To change the card, open the billing portal with POST /v1/billing/portal.

Query Parameters

NameDescription
orgId:stringqueryRequired
The organization ID (a UUID).

Response

NameDescription
data:object | null
The card on file, or null when the organization has no card — including an organization that has never had a paid subscription.
Show 5 child attributesobject | null

Response — 200 OK

No card on file:

Error Responses

400 Bad Request

Returned when orgId is missing or not a UUID.

json
{
"error": {
"code": "validation_error",
"message": "orgId: Invalid uuid",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

401 Unauthorized

Returned when the Authorization header is missing, or the token is invalid or expired.

403 Forbidden

Returned when you are a member of the organization rather than an admin or owner, or not a member at all.

json
{
"error": {
"code": "forbidden",
"message": "Only admins can view the payment method",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

502 Bad Gateway

Returned when billing details couldn't be loaded from the payment provider (stripe_error). Retry with backoff.

503 Service Unavailable

Returned when billing is temporarily unavailable (billing_unavailable). An organization with no billing record still gets data: null instead.

Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl "https://api.syntext.dev/v1/billing/payment-method?orgId=0b6f2c1e-8a4d-4f3b-9c2e-7d1a5e6f8b90" \
-H "Authorization: Bearer $SYNTEXT_JWT"
Responseapplication/json
200jsonOK
{
"data": {
"brand": "visa",
"last4": "4242",
"expMonth": 8,
"expYear": 2028,
"email": "billing@acme.com"
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext