Bag Docs
API ReferenceCheckout

Complete a checkout (legacy)

Deprecated. Use the session-based flow (/api/checkout/session + /api/checkout/submit + /api/checkout/finalize) instead.

This endpoint combines session creation and transaction recording in a single call. It is maintained for backward compatibility with older integrations.

POST
/api/checkout/complete

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.justusebag.xyz/api/checkout/complete" \  -H "Content-Type: application/json" \  -d '{    "paymentLinkId": "d4e5f6a7-b8c9-4d0e-a1f2-b3c4d5e6f7a8",    "txHash": "0x8f3a2b1c4d5e6f7890abcdef1234567890abcdef1234567890abcdef12345678",    "walletAddress": "0xCuStOmEr1234567890abCdEf1234567890aBcDeF",    "network": "base"  }'
{
  "status": "success"
}
{
  "status": "error",
  "message": "amount: Amount must be a positive number up to 999,999,999.99; network: Invalid enum value",
  "code": "BAD_REQUEST"
}