Skip to main content
POST
Pay an order (embedded Accept.js)

Authorizations

Authorization
string
header
required

API key issued by VitaRelay. Send as Authorization: Bearer vr_live_… (production) or Authorization: Bearer vr_test_… (sandbox).

Path Parameters

id
string<uuid>
required

Order UUID.

Body

application/json
opaque_data
object
required

The Accept.js nonce returned by Accept.dispatchData.

save_card
boolean

Optional. Save the approved card to the patient's wallet (it becomes their default if they have none) so subscriptions can charge it. Send true only with the patient's consent.

Response

Payment captured (or the order was already paid).

paid
enum<boolean>
Available options:
true
order_id
string<uuid>
transaction_id
string | null
payment_status
enum<string>
Available options:
paid
saved_payment_method_id
string<uuid> | null

Present when save_card was requested; the saved wallet card, or null if it could not be saved (the charge itself still succeeded).