Webhooks

voucher.pre_purchase

HOOKWe ask your decision hook; your answer decides.

Not an event: a question. Sent to your decision hook before a customer pays; your answer decides whether they may. See Decision hooks above.

Request body

apiVersionstring

Example:"string"

idstring

Unique per call; also sent as ogawifi-request-id

Example:"req_3f9c0a1b2c3d4e5f"

event"voucher.pre_purchase"

Example:"voucher.pre_purchase"

createdAtstring

ISO 8601 time, UTC

Example:"2026-10-30T10:00:00.000Z"

testtrue

Present only on calls from the Send test button

Example:true

dataobject

Your answer: allow

allowedtrue

Example:true

Your answer: refuse

allowedfalse

Example:false

reasonstring

Shown to the customer as plain text

Example:"Verify your membership to buy this plan."

codestring

For your own logs

Example:"NOT_LINKED"

requireLinktrue

You don't know this customer yet: offer to verify them

Example:true

HOOKPOST to your URL
1{2  "apiVersion": "string",3  "id": "req_3f9c0a1b2c3d4e5f",4  "event": "voucher.pre_purchase",5  "createdAt": "2026-10-30T10:00:00.000Z",6  "test": true,7  "data": {8    "customer": {9      "uid": "u_9fK2mP7qR1",10      "email": "ada@example.com",11      "emailVerified": true,12      "externalId": "MEMBER-0042"13    },14    "plan": {15      "id": "pln_8Hq2LmZ0aB3c",16      "name": "Daily 5GB",17      "priceKobo": 5000018    },19    "location": {20      "id": "loc_3cD4eF5gH6",21      "name": "Main branch"22    },23    "purchase": {24      "intent": "reuse"25    }26  }27}
200Allow
1{2  "allowed": true3}
200Refuse
1{2  "allowed": false,3  "reason": "Verify your membership to buy this plan.",4  "code": "NOT_LINKED",5  "requireLink": true6}
Was this helpful?