Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceBilling and usageBilling

Settle a saved card

Called right after stripe.confirmSetup succeeds. Settles the card the SetupIntent saved and reports whether it was saved, refused, or held. Settlement runs once: a card tied to fraud, or a second card the bank did not verify when it was asked to, puts the account on hold (held, ACCOUNT_PENDING_VERIFICATION); a card the bank did not verify is removed (refused, CARD_NOT_VERIFIED); any other card becomes the account's default (saved). Calling it again, or after the Stripe webhook settled the card, answers the same outcome and changes nothing.

Required permission

Requires the billing.manage permission. See Permissions for the roles and API key permissions that include it.

POST
/v1/orgs/{orgId}/billing/setup-intent/{setupIntentId}/complete

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

orgId*string
setupIntentId*string
Lengthlength <= 255

Response Body

How the card was settled

application/json
  1. response
status*string

saved: the card is the account's default. refused: the card was removed; add a different one. held: the card was removed and the account is on a verification hold.

Value in"saved""refused""held"
code?string

Why the card was not kept. Absent for a saved card.

Value in"CARD_NOT_VERIFIED""ACCOUNT_PENDING_VERIFICATION"
message*string

What to show the customer.

Example Request
curl -X POST 'https://api.openrelay.inc/v1/orgs/string/billing/setup-intent/string/complete'
Example Response
{  "status": "saved",  "code": "CARD_NOT_VERIFIED",  "message": "string"}