request_delegation
Start the human delegation (approval) flow needed for checkout/payment. PREFERRED: pass the buyer's email — the gateway emails them a 6-digit code and returns a device_code; ask the user for the code and call submit_delegation_otp. This keeps approval fully in-chat (no link) and you never see the code, so you cannot approve on their behalf. If you omit email, it falls back to a browser approval link (device flow) which the user must open; then poll check_delegation. You can never approve a delegation yourself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | Buyer's email. When provided, a one-time approval code is emailed to them and approval happens in-chat via submit_delegation_otp (recommended). | ||
| scopes | No | Scopes to request (defaults to all four scopes) | |
| site_id | Yes | Site ID requiring delegation | |
| marketing_opt_in | No | Set true ONLY if the buyer explicitly agreed to receive marketing/deals emails (e.g. ticked the opt-in box). Subscribes their email to the consumer mailing list. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | ||
| delivery | No | ||
| user_code | No | ||
| approvalUrl | No | ||
| device_code | No | ||
| delegation_token | No |