Quote a tip and tax
Prices the amount the session was opened with (amount, minor units, on Create checkout session) plus a tip and the account's tax. The body carries modifiers only; a base amount or currency here is refused. Each modifier is minor units, or { preset } / { bps } / { amountMinor }.
Returns { base, tax?, tip?, total, estimated? } in minor units. A preview, not a reservation: the charge amount is whatever your server sends to POST /v1/payments, never the session amount. A surcharge is never priced here: sending one is refused (SURCHARGE_UNAVAILABLE), and when the account has one enabled the answer carries estimated: { surcharge: true } so your page can say the total may change.
A session opened without an amount answers SESSION_AMOUNT_REQUIRED.
Response contract
The successful wire shape and errors an integration should branch on.
Quote
application/jsonbaseintegerrequired- The amount the session was opened with, in minor units.
taxinteger- Tax in minor units. Omitted when none applies.
tipinteger- Tip in minor units. Omitted when none applies.
totalintegerrequired- Base plus the parts, in minor units. A preview: the charge amount is what your server sends to POST /v1/payments.
estimatedobject- Present as { surcharge: true } when the account has a surcharge this total leaves out.
Example response
{
"base": 2599,
"tax": 200,
"tip": 390,
"total": 3189,
"estimated": {
"surcharge": true
}
}Error responses
authentication_failedThe key is missing, malformed, revoked, or invalid for this environment.
not_foundThe resource does not exist for this merchant.
invalid_requestOne or more request fields are invalid.