Quote a Charge
POST/subscriptions/:id/charge-quoteDescription
Quote the next charge for a subscription. No request body and no signature — this call moves no funds.
- Token-priced plans (
price_currency: null) echo the plan’spriceasamount, withprice_lock_code,rate, andexpires_atallnull. You can skip the quote entirely and signpricedirectly. - Fiat-priced plans (
price_currencyset) convert the fiatpriceto a settlement-tokenamountat the live rate and lock that rate: pass the returnedamountandprice_lock_codetoPOST /subscriptions/:id/chargebeforeexpires_at.
The quote binds the price_lock_code to the exact amount it returned. Charging a different
amount under that lock is rejected with quote_amount_mismatch; charging after expires_at is
rejected with quote_expired — re-quote and re-sign.
Headers
| Header | Description | Required |
|---|---|---|
| Authorization | Bearer token with your API key | yes |
Path Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | The on-chain subscription ID (bytes32 hex, e.g. `0x9f3a...`). Obtain it from `GET /merchants/:merchantId/subscriptions`, the `subscription.created` webhook, or the `subscription_checkout.completed` webhook. | yes |
Example Request
const response = await fetch(
'https://checkout-api.exodus-int.com/subscriptions/0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a/charge-quote',
{
method: 'POST',
headers: {
Authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxx',
},
},
);Response
For a token-priced plan the quote fields are null — amount is the plan’s price:
TOKEN-PRICED PLAN
{
"object": "subscription_charge_quote",
"subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
"amount": "9990000",
"price_lock_code": null,
"rate": null,
"expires_at": null
}For a fiat-priced plan, amount is the token amount at the locked live rate:
FIAT-PRICED PLAN
{
"object": "subscription_charge_quote",
"subscription_id": "0x9f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a",
"amount": "10250000",
"price_lock_code": "plk_8f2a1c9d7e3b4a65",
"rate": "0.9746",
"expires_at": "2026-05-19T12:07:00Z"
}| Field | Description |
|---|---|
amount | The amount to sign and charge, in the settlement token’s smallest unit. Equals price for token-priced plans. |
price_lock_code | Opaque code binding the locked rate to this amount. Pass it to charge alongside amount. null for token-priced plans. |
rate | The locked fiat-to-token conversion rate. null for token-priced plans. |
expires_at | ISO 8601 expiry of the price lock. Submit the charge before this moment. null for token-priced plans. |
Errors
| Status | Type | Description |
|---|---|---|
| 400 | invalid_request | Fiat-priced plan on a business without a fiat settlement configuration (“Charge quote is only available for fiat settlements”). |
| 404 | not_found | Subscription ID does not exist or belongs to another merchant. |
| 502 | invalid_request | The settlement provider failed to create the price lock. Retry. |
Token-priced plans never fail on settlement configuration — the quote is a passthrough of price.
