# Authorizations and webhooks for stablecoin-backed cards

Track onchain fund movements and Stripe and Bridge events throughout the authorization lifecycle.

Stablecoin-backed cards use the standard Issuing [authorization](https://docs.stripe.com/issuing/purchases/authorizations.md) and [transaction](https://docs.stripe.com/issuing/purchases/transactions.md) lifecycle. Funds can also move onchain between the card’s wallet and Bridge at each stage. This page explains when funds move and which events notify you.

## Event sources

Stripe sends events for cards and payments, and Bridge sends events for customers and verification.

| Events | Source | Use cases |
| --- | --- | --- |
| `issuing_authorization.*` and `issuing_transaction.*` | Stripe | Track purchases, captures, refunds, and expirations. |
| `issuing_cardholder.created` | Stripe | Detect when Bridge creates a cardholder for an approved consumer customer. |
| `customer.*` | Bridge | Track `cards` endorsement approvals, revocations, and changes to verification requirements. |

Set up a [webhook endpoint](https://docs.stripe.com/webhooks.md) for Stripe events and subscribe to the `customer` category in [Bridge webhooks](https://apidocs.bridge.xyz/platform/additional-information/webhooks/overview).

> #### Verify webhook signatures
> 
> Verify the signature of every event before you act on it. See how to [verify Stripe webhook events](https://docs.stripe.com/webhooks.md#verify-events) and the Bridge [webhook signature](https://apidocs.bridge.xyz/platform/additional-information/webhooks/overview) instructions.

## Authorization lifecycle

The following table shows the Stripe events for each stage of a purchase and the onchain effect for cards linked to a Bridge wallet or non-custodial wallet.

| Stage | Stripe event | Onchain effect |
| --- | --- | --- |
| Authorization | `issuing_authorization.created` | Bridge pulls the hold amount from the wallet. |
| Incremental authorization | `issuing_authorization.updated` | Bridge pulls the additional amount. |
| Partial or full reversal | `issuing_authorization.updated` | Bridge returns the reversed amount to the wallet. |
| Capture | `issuing_transaction.created` | Bridge pulls the difference if the captured amount exceeds the amount held, or returns the excess after settlement. |
| Expiration | `issuing_authorization.updated` | Bridge returns the remaining held amount to the wallet. |

### Authorizations

When a card is authorized, Stripe checks that the wallet has enough funds and, for non-custodial wallets, an active approval. Bridge then submits an onchain transaction to pull the funds. Stripe can send `issuing_authorization.created` before the onchain transaction confirms.

Each incremental authorization adds an entry to the authorization’s [request_history](https://docs.stripe.com/api/issuing/authorizations/object.md#issuing_authorization_object-request_history), and each entry has its own onchain pull.

### Holds above the authorized amount

Some businesses, such as restaurants and car rental companies, often capture more than they authorize. For these businesses, Stripe adds a reserve to the amount held from the wallet at authorization, and Bridge returns any unused amount after capture. Cardholder fees that your program charges are also held at authorization. See [holds for reserves and fees](https://docs.stripe.com/issuing/bridge-stablecoin-cards/hold-details.md).

### Refunds and reversals

When a business reverses or refunds an authorization, Stripe sends `issuing_authorization.updated` with the new amount. Bridge returns the funds to the wallet asynchronously and might combine multiple refunds into one onchain transaction.

### Expirations

If the business doesn’t capture an authorization, it expires. Stripe sends `issuing_authorization.updated`, the authorization’s status changes to `expired`, and Bridge returns the remaining funds to the wallet.

## Onchain transaction details

The `crypto_transactions` attribute on an [Authorization](https://docs.stripe.com/api/issuing/authorizations/object.md) or [Transaction](https://docs.stripe.com/api/issuing/transactions/object.md) lists each onchain transaction that Bridge submits for it, including the chain, amount, addresses, and transaction hash. Use it to reconcile authorizations and transactions with onchain data. See [simulate purchases](https://docs.stripe.com/issuing/stablecoin-cards/testing.md#simulate-purchases) for an example.

## Real-time authorizations

With [real-time authorizations](https://docs.stripe.com/issuing/controls/real-time-authorizations.md), you approve or decline each authorization by responding to the `issuing_authorization.request` webhook.

Real-time authorizations are turned off by default for stablecoin-backed cards. To turn them on for your program, contact your Stripe account manager. For cards funded by non-custodial wallets, Stripe can enable real-time authorizations only on chains whose confirmation times allow Bridge to submit the onchain transaction within the authorization window.

After Stripe turns on real-time authorizations, configure your endpoint in the [Dashboard](https://dashboard.stripe.com/settings/issuing/authorizations). Your endpoint must respond within 2 seconds.

Stripe can still decline an authorization that your endpoint approves, for example if the wallet doesn’t have enough funds or the onchain transaction fails screening. Listen for `issuing_authorization.created` and `issuing_authorization.updated` events to check whether Stripe approved or declined the authorization.
