> For the complete documentation index, see [llms.txt](https://aliniex.gitbook.io/alix-pay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aliniex.gitbook.io/alix-pay/api-reference/card-api/notifications-webhook.md).

# Notifications (webhook)

The webhook's configuration should be done [here](/alix-pay/resources/partner-dashboard/integration/webhooks-ipn_url.md).&#x20;

Data will notifiy to partner's webhook url in 2 api end-point below:

* [CreateCard](#createcard)
* [TopupCard](#topupcard)
* [CardTransaction](#card-transaction)
* [ProfileApplication.Updated](#profileapplication.updated-kyc)

### Response data structure

#### CreateCard

Response schema:

```json5
{
    success: boolean,
    webhookType: string,
    data: {
        id: string,
        firstName: string,
        lastName: string,
        cardNumber: string,
        status: string,
        createdAt: number,
        signature: string
    }
}
```

Example response:

```json
{
    "success": true,
    "webhookType": "CreateCard",
    "data": {
        "id": "a7916a34-c974-4001-9bfb-3df72205c291",
        "firstName": "Joe",
        "lastName": "San",
        "cardNumber": "**** **** **** 0876",
        "status": "Init",
        "createdAt": 1765882359,
        "signature": "RiKkFrCf04hK5EvGhQAEbp95eQ/VAksEjS2M..."
    }
}
```

{% hint style="info" %}
Card's statuses

* Init
* InitFailed
  {% endhint %}

#### ProfileApplication.Updated (KYC)

Response schema:

```json5
{
    success: boolean,
    webhookType: string,
    data: {
        accountId: string,
        rejectReason: string,
        status: string,
        createdAt: number
    },
    signature: string
}
```

Example response:

```json
{
    "success":false,
    "webhookType":"ProfileApplication.Updated",
    "data":{
        "accountId":"a7916a34-c974-4001-9bfb-3df72205c291",
        "kycStatus":"REJECTED",
        "kycRejectReason":"IMG_SELFIE_INVALID | Ảnh selfie không hợp lệ | Invalid selfie photo.",
        "createdAt": 1765882359
    },
    "signature":"RiKkFrCf04hK5EvGhQAEbp95eQ/VAksEjS2M..." // Signature for "data"
}
```

{% hint style="info" %}
Profile's status

* NONE
* UNDER\_REVIEW
* CONFIRMED
* SUBMITTED
* VERIFIED
* REJECTED
  {% endhint %}

#### TopupCard

Response schema:

```json5
{
    success: boolean,
    webhookType: string,
    data: {
        id: string,
        amount: number,
        cardId: string,
        fee: number,
        status: string,
        createdAt: number,
        signature: string
    }
}
```

Example response:

```json
{
    "success": true,
    "webhookType": "TopupCard",
    "data": {
        "id": "67909705-3d46-4075-b7c2-2669255d44c7",
        "amount": 45,
        "cardId": "ee1a3d71-5408-4b83-9681-d982a61b776e",
        "fee": 1.3,
        "status": "Completed",
        "createdAt": 1765882359,
        "signature": "RiKkFrCf04hK5EvGhQAEbp95eQ/VAksEjS2M..."
    }
}
```

{% hint style="info" %}
Topup status

* Pending
* Completed
* Rejected
  {% endhint %}

#### CardTransaction

Response schema:

```json5
{
    success: boolean,
    webhookType: string,
    data: {
        id: string,
        amount: number,
        description: string,
        cardId: string,
        fee: number,
        feeDetails: {
            amount: number,
            currency: string,
            feeType: string
        }[],
        status: string,
        type: string,
        createdAt: number,
        signature: string
    }
}
```

Example response:

```json
{
    "success": true,
    "webhookType": "CardTransaction",
    "data": {
        "id": "67909705-3d46-4075-b7c2-2669255d44c7",
        "amount": "45",
        "fee": "1.3",
        "description": "GOOGLE*RECOVERY YOUR   MOUNTAIN VIEWCAUS",
        "cardId": "ff53f10f-184a-483e-8f8f-02e309d3ef04",
        "feeDetails": [
          {
            "amount": 0,
            "currency": "USD",
            "feeType": "Settlement Fee"
          },
          {
            "amount": 0.01,
            "currency": "USD",
            "feeType": "Apple Pay Authorization Fee"
          },
          {
            "amount": 0,
            "currency": "USD",
            "feeType": "ATM Withdrawal Fee"
          }
        ],
        "status": "Completed",
        "type": "Consumption",
        "createdAt": 1765882359,
        "signature": "RiKkFrCf04hK5EvGhQAEbp95eQ/VAksEjS2M..."
    }
 }
```

{% hint style="info" %}
**Transaction Type**

* Consumption
* ConsumptionFee
* Refund

**Transaction Status**

* Pending
* Completed
* Rejected
  {% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aliniex.gitbook.io/alix-pay/api-reference/card-api/notifications-webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
