Partners
API referenceEndpointsRedemption

Prepare the redemption transaction for wallet approval

POST
/prepare

Authorization

WalletSession
headerAuthorizationBearer <token>

Authorization: Bearer <accessToken> from POST /auth/verify. Proves control of one wallet for one hour. Used only by the Redemption endpoints, from the browser.

Request Body

application/json
  1. body

Exactly one of prizeId and prizeIds.

prizeId?integer

One prize.

prizeIds?array<integer>

Up to 50 distinct prizes held by the same wallet, including mixed product types.

Items1 <= items <= 50
address*

Preserve building, unit and street information. Street lines are reflowed for DHL without dropping details; together they must fit into at most three 45-character carrier lines without splitting words. Address fields can pass individual length limits yet fail this combined check. Return validation messages to the user; do not silently truncate their address.

productCode*string

From the quote option the winner chose.

shownShippingFeeUsd*number

Maximum shipping fee confirmed by the winner. The server charges its current DHL rate if at or below this amount; a higher rate returns RATE_CHANGED and requires a new quote and confirmation.

Response Body

{ redemption, transaction, lastValidBlockHeight }. transaction is base64 and already signed by Verity as fee payer, so the winner needs no SOL. Pass it unchanged to the wallet's signTransaction and send the result to submit. It expires in about a minute. If the winner rejects the wallet prompt, offer the same transaction again. redemption.items lists the order's prizes; redemption.raffle_prize_id is the first one's.

Example Request
curl -X POST 'https://api-staging.theverity.xyz/api/v1/redeem/prepare' \  -H 'Authorization: Bearer <wallet_access_token>' \  -H 'Content-Type: application/json' \  -d '{  "address": {    "recipientName": "string",    "recipientEmail": "user@example.com",    "recipientPhone": "string",    "addressLine1": "string",    "city": "string",    "countryCode": "st"  },  "productCode": "string",  "shownShippingFeeUsd": 0}'
Example Response
Empty