Confirm a payment intent

Confirm a payment intent to authorize the payment. This can be done from your server or from your checkout page.

From your server: authenticate with a dashboard session token or a merchant secret key. The body is optional. To pay with a card collected by hosted fields, send the tok_ token from createToken() as payment_method.token.

From your checkout page: monarch-zenoz.js sends X-Publishable-Key, an Idempotency-Key header and a body of { client_secret, token }. The page's Origin must be on the key's allowed origins. The response contains only browser-safe fields, with no metadata or transaction ID.

An intent can be confirmed successfully once. Errors on the checkout-page path:

  • 404: the client_secret is wrong or missing, or the intent belongs to another merchant.
  • 400 CLIENT_SECRET_EXPIRED: the client secret has expired.
  • 400 INVALID_TOKEN: the token was used already, has expired, or belongs to a different intent.
  • 409 INTENT_INVALID_STATE: the intent is no longer awaiting confirmation.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Payment intent id.

Body Params
string

Client confirm only.

string
^tok_[A-Za-z0-9_-]{16,64}$

Client confirm only — hosted-fields token.

payment_method
object

Server confirm only.

Headers
string
length ≤ 255

Required for client confirm (publishable key).

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json