Issuing real-time authorizations
Using the synchronous webhook, you can approve or decline authorization requests in real time.
Your webhook endpoint can be configured in your settings. When a card is used to make a purchase, Stripe creates an issuing_authorization.request
and sends it to your configured endpoint for your approval.
Responding to authorization requests
Make an API call to either approve or decline the request and include the Authorization ID.
Your webhook must approve or decline each authorization before responding to the incoming webhook request. If Stripe does not receive your approve or decline request within 2 seconds, the Authorization
is automatically approved or declined based on your timeout settings.
If your Issuing balance has insufficient funds for the incoming authorization, the authorization will be denied and your webhook endpoint will not receive the issuing_authorization.request
event. To learn more about funding your Issuing balance, read here.
Authorization requests
When an authorization request is sent to your webhook, the amount
requested is stored in pending_request
.
{ "id": "iauth_1CmMk2IyNTgGDVfzFKlCm0gU", "object": "issuing_authorization", "approved": false, "amount": 0, "currency": "usd", "status": "pending", ... "pending_request": { "amount": 400, "currency": "usd", "merchant_amount": 360, "merchant_currency": "gbp" } }
The top-level amount
in the request is set to 0 and approved
is false. Once you respond to the request, the top-level amount
reflects the total amount approved or declined, the approved
field is updated, and pending_request
is set to null.
Testing webhooks locally
To test webhooks locally, you can use Stripe CLI. Once you have it installed, you can forward events to your server:
stripe listen --forward-to localhost:4242/webhook Ready! Your webhook signing secret is '{{WEBHOOK_SIGNING_SECRET}}' (^C to quit)
In another terminal, you can then manually trigger issuing_authorization.request
events from the CLI for more streamlined testing.
stripe trigger issuing_authorization.request
Learn more about setting up webhooks.