API ReferenceCheckout
Finalize on-chain confirmation
Triggers Bag to verify the on-chain transaction and finalize the checkout session. Call this after the transaction has enough block confirmations.
On success, the session moves to txn_finalized or complete status, a
transaction record is created, and webhook events are dispatched.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.justusebag.xyz/api/checkout/finalize" \ -H "Content-Type: application/json" \ -d '{ "sessionId": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e" }'{
"status": "success",
"data": {
"sessionId": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
"status": "txn_finalized",
"confirmed": true,
"blockNumber": 18234567
}
}{
"status": "error",
"message": "amount: Amount must be a positive number up to 999,999,999.99; network: Invalid enum value",
"code": "BAD_REQUEST"
}{
"status": "error",
"message": "Not found",
"code": "NOT_FOUND"
}{
"status": "error",
"message": "Too many requests. Please slow down.",
"retryAfter": 10
}