raindrop_redemption.created so you can burn the cardholder’s points. This page walks through the end-to-end flow and the two pieces you build: launching the travel portal with a session token, and handling the redemption webhook that triggers the burn. For shared reference such as status values, API endpoints, and billing, see Travel Redemptions.

Rain Managed travel redemption flow
Launch the travel portal
When you open the travel portal in a webview, pass an encrypted session token (a JWE) as a query parameter. The portal decrypts the token to identify the cardholder and fetch their travel balance directly from Rain. Encrypt the token with the shared secret Rain provides; do not generate your own. Keep the token short-lived, since theuser_id claim is all the portal needs to read the balance.
The token payload carries the cardholder’s Rain user_id, their email, and an exp expiry:
generatePortalSessionToken.ts
Process the redemption webhook
For Rain-Managed programs, you burn the points after a booking. Subscribe toraindrop_redemption.created to be notified when a redemption is requested. When the cardholder books travel, Rain reserves the points and sends this webhook to your endpoint so you can prompt the user to sign the withdrawal that burns the points. Verify the signature, acknowledge the webhook immediately so Rain does not time out, then run your existing withdrawal flow out of band to burn the points to the dead address. The amount field is the TenantToken quantity in native 18-decimal (wei) units, ready to pass straight into a withdrawal.
The webhook payload looks like this:
Some tenants also receive a
version field on the payload, depending on your tenant configuration. Treat it as optional: don’t require it, and make sure your handler ignores any fields it doesn’t recognize rather than failing on them.Signature header, computed over the exact JSON body using your API key as the secret. Verify it before processing the payload (see How Webhooks Work).
redemptionWebhookListener.ts
Refunds
After the travel portal receives notice from the supplier (for example, a hotel or airline) that a booking was canceled and must be refunded, it sends Rain a message. Rain then re-issues the burned points to the cardholder and marks the redemptionREFUNDED. For Rain-Managed programs, Rain re-issues the points and re-mints them onchain on the next liquidation cycle.