> For the complete documentation index, see [llms.txt](https://docs.xplorpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xplorpay.com/api-reference/webhooks/working-with-webhooks/card-authorization-result-webhooks.md).

# Card Authorization Result Webhooks

Card authorization webhooks notify you when a card authorization result is available, such as `APPROVED`, `DECLINED`, or another non-approval outcome.

They also return estimated platform fees. Use these estimates to understand merchant charges before settlement.

The following card authorization response types are available:

* [Approved](https://docs.xplorpay.com/api-reference/webhooks/working-with-webhooks/card-authorization-result-webhooks/approved.md)
* [Declined](https://docs.xplorpay.com/api-reference/webhooks/working-with-webhooks/card-authorization-result-webhooks/declined.md)
* [Failed](https://docs.xplorpay.com/api-reference/webhooks/working-with-webhooks/card-authorization-result-webhooks/failed.md)

The following table describes the payload fields in each response type.

<table><thead><tr><th valign="top">Name</th><th width="100.79998779296875" valign="top">Data type</th><th valign="top">Description</th><th valign="top">Applies to (Response type → PayLoadType)</th></tr></thead><tbody><tr><td valign="top"><code>PayLoadType</code></td><td valign="top">string</td><td valign="top">Identifies the event type for routing and filtering.</td><td valign="top"><strong>Approved</strong> → <code>card.authorization.approved</code><br><br><strong>Declined</strong> → <code>card.authorization.declined</code><br><br><strong>Failed</strong> → <code>card.authorization.failed</code></td></tr><tr><td valign="top"><code>Payload</code></td><td valign="top">object</td><td valign="top">Contains the authorization result details.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data</code></td><td valign="top">object</td><td valign="top">Contains the Gateway transaction payload for the authorization. The field set varies by transaction type and version.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.payloadType</code></td><td valign="top">string</td><td valign="top">The Gateway payload type. This is typically <code>transaction</code>.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction</code></td><td valign="top">object</td><td valign="top">Contains transaction details returned by the Gateway.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.id</code></td><td valign="top">string</td><td valign="top">The unique identifier of the card transaction.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.amount</code></td><td valign="top">string</td><td valign="top">The transaction amount.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.result</code></td><td valign="top">string</td><td valign="top">The Gateway result for the authorization, such as <code>APPROVED</code> or <code>DECLINED</code>.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.type</code></td><td valign="top">string</td><td valign="top">The transaction type, such as <code>AUTH</code> or <code>SALE</code>.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.created</code></td><td valign="top">string</td><td valign="top">The date and time when the transaction was created.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.card-type</code></td><td valign="top">string</td><td valign="top">The card brand, such as <code>VISA</code>.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.last-four</code></td><td valign="top">string</td><td valign="top">The last four digits of the card.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.authorization-code</code></td><td valign="top">string</td><td valign="top">The authorization code when the transaction is approved.</td><td valign="top"><strong>Approved</strong> → <code>card.authorization.approved</code></td></tr><tr><td valign="top"><code>Payload.data.transaction.display-message</code></td><td valign="top">string</td><td valign="top">A readable message describing the result.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.merchant-id</code></td><td valign="top">string</td><td valign="top">The merchant identifier associated with the transaction.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.terminal-id</code></td><td valign="top">string</td><td valign="top">The terminal identifier associated with the transaction.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.data.transaction.billing</code></td><td valign="top">object</td><td valign="top">Billing address for the transaction. This field is included only when <code>billing</code> was supplied in the original authorization request. Nested fields can include <code>first-name</code>, <code>last-name</code>, <code>company</code>, <code>street</code>, <code>street2</code>, <code>city</code>, <code>state</code>, <code>zip</code>, <code>country</code>, and <code>phone</code>.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.platform-fees</code></td><td valign="top">array</td><td valign="top">Estimated platform fees for the transaction. This array can be empty (<code>[]</code>).</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.platform-fees[].fee</code></td><td valign="top">number</td><td valign="top">The flat fee from the merchant pricing plan.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.platform-fees[].rate</code></td><td valign="top">number</td><td valign="top">The rate from the merchant pricing plan.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.platform-fees[].description</code></td><td valign="top">string</td><td valign="top">The fee description from the pricing plan.</td><td valign="top">All response types</td></tr><tr><td valign="top"><code>Payload.platform-fees[].estimated-fee-amount</code></td><td valign="top">string</td><td valign="top">The estimated fee amount for this transaction, formatted to five decimal places. If <code>rate</code> is <code>0</code>, this value equals <code>fee</code>. Otherwise, it equals the transaction amount multiplied by <code>rate</code>.</td><td valign="top">All response types</td></tr></tbody></table>

{% hint style="info" %}
`Payload.data` is passed through from the Gateway response. Fields such as `billing` and `shipping` are included only when they were supplied in the original authorization request. Payloads can also include additional fields, such as AVS and CSC results. Treat unknown fields as forward compatible.
{% endhint %}

### When each response type is sent

The Gateway sends a webhook based on the card authorization result. The following table describes when each response type is sent with example.

<table data-search="true"><thead><tr><th>Response type</th><th>PayLoadType</th><th>When it is sent</th></tr></thead><tbody><tr><td>Approved</td><td><code>card.authorization.approved</code></td><td>The Gateway reports an approved or approval-like result, such as <code>APPROVED</code> or <code>APPROVED_FOR_PARTIAL_AMOUNT</code>.</td></tr><tr><td>Declined</td><td><code>card.authorization.declined</code></td><td>The Gateway reports a declined or decline-like result, such as <code>DECLINED</code>, <code>DECLINED_CARD_EXPIRED</code>, or <code>Declined by Issuer - Closed account</code>.</td></tr><tr><td>Failed</td><td><code>card.authorization.failed</code></td><td>The result is neither approved-like nor declined-like, such as <code>NOT_SUFFICIENT_FUNDS</code>, <code>CARD_EXPIRED</code>, system or retry errors, or an empty or unknown status.</td></tr></tbody></table>

{% hint style="info" %}
Only one response type is sent for each authorization result.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xplorpay.com/api-reference/webhooks/working-with-webhooks/card-authorization-result-webhooks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
