SET Crypto API Suite · With a Direct Deposit key
Require a second approval on batches
POST/api/partner/batch_approval
Switches batch approval on or off for your Payable Email batches. With required: true, every new batch starts with approval pending and its pay-to addresses withheld until someone other than who asked approves it.
Headers
Idempotency-Keystring- Any unique string, so a retry runs once. See Idempotency.
Body
requiredbooleanrequiredtrueto require a second approval on each new batch,falseto stop. Anything but a boolean answers 400required_invalid.
Notes
- Direct Deposit is switched on per deployment; while it is off this call answers 503
direct_deposit_disabled. CheckGET /v1/capabilities(features.*). - It is a Payable Email control: Payable Email must be on for the deployment (503
payable_email_disabled) and for your account (403payable_email_off; SET switches it on). - Call it with your partner key (
set_partner_…), or with a SET API key that has thedirect_depositscope. - Turning it on takes any write: the partner key, or a SET API key with
writeanddirect_deposit. - Turning it off takes the right to approve: a dashboard admin, or a SET API key with
write,approveanddirect_deposit. The partner key cannot turn it off (403scope_missing). A SET API key withapprovebut nowriteis refused as read-only (403scope_missing), and one withwritebut noapproveis refused too. - While it is on, a new batch reads
approval: pending, withitems[].addressnull andpayToempty, until it is approved atPOST /api/partner/payees/batch/{id}/approve. - The change is written to your audit log as
batch_approval_onorbatch_approval_off. - A browser cross-site request answers 403
cross_origin: call it from your server. - This example is a recorded run of SET's own code (wallet release
e9b03447) with a sandbox key; ids and times are that run's.
Errors
503 payable_email_disabled403 payable_email_merchant403 payable_email_off400 required_invalid503 direct_deposit_disabled403 scope_missing