---
title: "Thanh toán (Checkout)"
description: "Tích hợp Checkout API của Fystack để tạo trải nghiệm thanh toán liền mạch cho người dùng của bạn."
url: https://docs.fystack.io/vi/checkout
last_updated: 2026-11-13
---

> ## Documentation index
> Fetch the complete documentation index at: https://docs.fystack.io/llms.txt
> Use it to discover all available pages before exploring further.

# Thanh toán (Checkout)

Checkout API cung cấp một cách mạnh mẽ để tạo phiên thanh toán, quản lý luồng thanh toán và xử lý giao dịch thông qua hạ tầng bảo mật của Fystack.

---

## Tạo checkout

**Endpoint:** `POST /checkouts`

Để tạo checkout mới, hãy gửi một request POST đến endpoint `/checkouts` với các tham số bắt buộc.

### Tham số

- `price` (string, required): Số tiền thanh toán dưới dạng chuỗi (ví dụ: "66").
- `currency` (string, required): Mã tiền tệ ISO gồm ba chữ cái (ví dụ: USD, EUR). Hiện chỉ hỗ trợ USD.
- `expiry_duration_seconds` (number, required): Số giây cho đến khi phiên checkout hết hạn. Phải nằm trong khoảng từ 0 đến 31536000.
- `destination_wallet_id` (string, required): ID ví sẽ nhận khoản thanh toán.

  _Image: Sao chép Wallet ID_

### Tham số tài sản

Cung cấp `supported_assets` hoặc `accepted_assets`.

- `supported_assets` (array): Danh sách tài sản tiền mã hóa được hỗ trợ. Mỗi mục có thể là UUID tài sản hoặc bí danh theo định dạng "SYMBOL:CHAIN_ID" (ví dụ: "SOL:1399811149").

  | Chuỗi | Chain ID | Ví dụ định dạng |
  | --- | --- | --- |
  | Solana | 1399811149 | `SOL:1399811149` |
  | Ethereum | 1 | `ETH:1`, `USDC:1` |
  | BNB Chain | 56 | `BNB:56` |
  | Base | 8453 | `ETH:8453` |
  | Polygon | 137 | `POL:137` |
- `accepted_assets` (array): Danh sách tài sản tiền mã hóa được hỗ trợ ở dạng dễ đọc. Mỗi mục gồm `asset` và `network`, ví dụ tài sản `USDC` trên mạng lưới `ETHEREUM_MAINNET`.
- `success_url` (string): URL để chuyển hướng khách hàng sau khi thanh toán thành công.
- `cancel_url` (string): URL để chuyển hướng khách hàng nếu họ hủy quá trình checkout.
- `description` (string): Mô tả sản phẩm hoặc dịch vụ khách hàng đang mua.
- `product_id` (string): Mã định danh duy nhất của sản phẩm đang được mua.
- `customer_id` (string): Liên kết checkout này với một khách hàng hiện có trong hệ thống của bạn.
- `order_id` (string): Mã định danh duy nhất của đơn hàng.
- `enable_localization` (boolean): Có bật bản địa hóa cho trang checkout hay không. Mặc định là false.
- `from_address` (string): Địa chỉ người trả tiền (tùy chọn). Nếu được cung cấp, Fystack sẽ dùng luồng thanh toán từ một ví duy nhất.
- `underpaid_cover_percent` (number): Tỷ lệ phần trăm cho phép thanh toán thiếu. Phải nằm trong khoảng từ 0 đến 100.

### Phản hồi

- `id` (string): Mã định danh duy nhất của phiên checkout.
- `checkout_url` (string): URL của trang checkout được lưu trữ sẵn. Hãy chuyển hướng khách hàng đến URL này.
- `status` (string): Trạng thái của phiên checkout. Có thể là `Pending`, `Confirming`, `Success`, `Expired`, `Unresolved`, `Resolved` hoặc `Cancelled`.
- `created_at` (timestamp): Thời điểm phiên checkout được tạo.
- `updated_at` (timestamp): Thời điểm phiên checkout được cập nhật gần nhất.
- `currency` (string): Mã tiền tệ ISO gồm ba chữ cái.
- `price` (string): Số tiền thanh toán dưới dạng chuỗi.
- `product_id` (string): Mã định danh duy nhất của sản phẩm đang được mua.
- `order_id` (string): Mã định danh duy nhất của đơn hàng.
- `workspace_id` (string): Mã định danh của workspace sở hữu checkout này.
- `description` (string): Mô tả sản phẩm hoặc dịch vụ khách hàng đang mua.
- `supported_assets` (array): Danh sách tài sản tiền mã hóa được hỗ trợ cho checkout này.
- `customer_id` (string): Mã định danh của khách hàng gắn với checkout này.
- `expiry_duration_seconds` (number): Số giây cho đến khi phiên checkout hết hạn.
- `enable_localization` (boolean): Trang checkout có bật bản địa hóa hay không.
- `success_url` (string): URL để chuyển hướng khách hàng sau khi thanh toán thành công.
- `cancel_url` (string): URL để chuyển hướng khách hàng nếu họ hủy quá trình checkout.
- `outcome` (object|null): Thông tin về kết quả thanh toán, nếu có.
- `from_address` (string|null): Địa chỉ đã thực hiện thanh toán, nếu có.

**Request** `POST /checkouts`

```typescript
import { PaymentService, Environment } from '@fystack/sdk'

const paymentService = new PaymentService({
  apiKey: apiCredentials.APIKey,
  environment: Environment.Production
})

await paymentService.createCheckout({
  price: '66',
  currency: 'USD',
  supported_assets: ['SOL:1399811149', 'USDC:1399811149', 'ETH:8453', 'ETH:1', 'USDC:1'],
  description: 'Access to premium features and exclusive content.',
  success_url: 'https://example.com/payment/success',
  cancel_url: 'https://example.com/payment/cancel',
  product_id: '4c57fae9-1a54-4a1b-9d94-00d5b4a3e1d2',
  customer_id: 'bc5bd50d-265e-4ea9-b312-bd8de5118683',
  order_id: 'bc5bd50d-265e-4ea9-b312-bd8de5118683',
  enable_localization: false,
  destination_wallet_id: 'ca6b5c4d-753f-4c2d-af18-520f66a42bd4',
  expiry_duration_seconds: 3600
})
```

```bash
curl -X POST https://api.fystack.io/api/v1/checkouts \
  -H "ACCESS-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "price": "66",
    "currency": "USD",
    "supported_assets": ["SOL:1399811149", "USDC:1399811149", "ETH:8453"],
    "description": "Access to premium features and exclusive content.",
    "success_url": "https://example.com/payment/success",
    "cancel_url": "https://example.com/payment/cancel",
    "product_id": "4c57fae9-1a54-4a1b-9d94-00d5b4a3e1d2",
    "customer_id": "bc5bd50d-265e-4ea9-b312-bd8de5118683",
    "order_id": "order_123",
    "enable_localization": false,
    "destination_wallet_id": "ca6b5c4d-753f-4c2d-af18-520f66a42bd4",
    "expiry_duration_seconds": 3600
  }'
```

```json
{
  "success": true,
  "message": "success",
  "code": 0,
  "data": {
    "id": "17976d0a-e4ff-44a6-a47e-c7e2bbab3db2",
    "created_at": "2025-05-17T12:39:27.308105515+07:00",
    "updated_at": "2025-05-17T12:39:27.308105515+07:00",
    "currency": "USD",
    "product_id": "4c57fae9-1a54-4a1b-9d94-00d5b4a3e1d2",
    "order_id": "bc5bd50d-265e-4ea9-b312-bd8de5118683",
    "workspace_id": "ffb8c9d1-0bd2-4c30-bf4f-2a8fe7710d51",
    "underpaid_cover_percent": 0,
    "description": "Access to premium features and exclusive content.",
    "price": "66",
    "supported_assets": [
      {
        "id": "6f4b5818-967f-4132-a475-20fe766c6c0e",
        "created_at": "0001-01-01T00:00:00Z",
        "updated_at": "0001-01-01T00:00:00Z",
        "is_native": false,
        "is_whitelisted": false
      },
      {
        "id": "c0b89aea-08b1-4a10-a754-17f3b133be24",
        "created_at": "0001-01-01T00:00:00Z",
        "updated_at": "0001-01-01T00:00:00Z",
        "is_native": false,
        "is_whitelisted": false
      }
    ],
    "customer_id": "bc5bd50d-265e-4ea9-b312-bd8de5118683",
    "expiry_duration_seconds": 3600,
    "enable_localization": false,
    "success_url": "https://example.com/payment/success",
    "cancel_url": "https://example.com/payment/cancel",
    "status": "Pending",
    "outcome": null,
    "from_address": null,
    "checkout_url": "https://app.fystack.io/checkout/17976d0a-e4ff-44a6-a47e-c7e2bbab3db2"
  }
}
```

---

## Lấy thông tin checkout

**Endpoint:** `GET /checkouts/:id`

Lấy thông tin chi tiết của một checkout theo ID.

### Phản hồi

- `id` (string): Mã định danh duy nhất của checkout.
- `status` (string): Trạng thái của checkout. Có thể là `Pending`, `Confirming`, `Success`, `Expired`, `Unresolved`, `Resolved` hoặc `Cancelled`.
- `price` (string): Số tiền thanh toán dưới dạng chuỗi.
- `currency` (string): Mã tiền tệ ISO gồm ba chữ cái.
- `created_at` (timestamp): Thời điểm checkout được tạo.
- `updated_at` (timestamp): Thời điểm checkout được cập nhật gần nhất.
- `product_id` (string): Mã định danh duy nhất của sản phẩm đang được mua.
- `order_id` (string): Mã định danh duy nhất của đơn hàng.
- `workspace_id` (string): Mã định danh của workspace sở hữu checkout này.
- `description` (string): Mô tả sản phẩm hoặc dịch vụ khách hàng đang mua.
- `supported_assets` (array): Danh sách tài sản tiền mã hóa được hỗ trợ cho checkout này.
- `customer_id` (string): Mã định danh của khách hàng gắn với checkout này.
- `expiry_duration_seconds` (number): Số giây cho đến khi checkout hết hạn.
- `success_url` (string): URL để chuyển hướng khách hàng sau khi thanh toán thành công.
- `cancel_url` (string): URL để chuyển hướng khách hàng nếu họ hủy quá trình checkout.
- `checkout_url` (string): URL của trang checkout được lưu trữ sẵn.
- `outcome` (object|null): Thông tin về kết quả thanh toán, nếu có.
- `from_address` (string|null): Địa chỉ đã thực hiện thanh toán, nếu có.

**Request** `GET /checkouts/:id`

```typescript
import { PaymentService, Environment } from '@fystack/sdk'

const paymentService = new PaymentService({
  apiKey: apiCredentials.APIKey,
  environment: Environment.Production
})

const checkout = await paymentService.getCheckout('17976d0a-e4ff-44a6-a47e-c7e2bbab3db2')
```

```bash
curl -X GET https://api.fystack.io/api/v1/checkouts/17976d0a-e4ff-44a6-a47e-c7e2bbab3db2
```

```json
{
  "success": true,
  "message": "success",
  "code": 0,
  "data": {
    "id": "2912168a-6bb6-4b5c-88bb-723706718e4a",
    "created_at": "2025-05-17T12:50:57.807741+07:00",
    "updated_at": "2025-05-17T12:50:57.807741+07:00",
    "currency": "USD",
    "product_id": "4c57fae9-1a54-4a1b-9d94-00d5b4a3e1d2",
    "order_id": "bc5bd50d-265e-4ea9-b312-bd8de5118683",
    "workspace_id": "ffb8c9d1-0bd2-4c30-bf4f-2a8fe7710d51",
    "underpaid_cover_percent": 0,
    "description": "Access to premium features and exclusive content.",
    "price": "66",
    "supported_assets": [
      {
        "id": "e9337429-a741-4e92-afbb-c1b1fc1ad8a4",
        "created_at": "2024-09-21T17:48:12.718886+07:00",
        "updated_at": "2024-09-21T17:48:12.718886+07:00",
        "name": "USD Coin",
        "symbol": "USDC",
        "decimals": 6,
        "logo_url": "https://assets-cdn.trustwallet.com/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
        "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
        "asset_type": "erc20",
        "is_native": false,
        "address_type": "evm",
        "is_whitelisted": true,
        "network_id": "dd21bfb5-f809-4070-a789-18ec8abbee1b"
      },
      {
        "id": "6f4b5818-967f-4132-a475-20fe766c6c0e",
        "created_at": "2024-12-05T20:32:42.14387+07:00",
        "updated_at": "2024-12-05T20:32:42.14387+07:00",
        "name": "Solana token",
        "symbol": "SOL",
        "decimals": 9,
        "logo_url": "https://upload.wikimedia.org/wikipedia/en/b/b9/Solana_logo.png",
        "is_native": true,
        "address_type": "sol",
        "is_whitelisted": true,
        "network_id": "8ae1f43f-d428-484d-8ad4-ee9ccc65a9ac"
      }
    ],
    "customer_id": "bc5bd50d-265e-4ea9-b312-bd8de5118683",
    "expiry_duration_seconds": 3600,
    "enable_localization": false,
    "success_url": "https://example.com/payment/success",
    "cancel_url": "https://example.com/payment/cancel",
    "status": "Pending",
    "outcome": null,
    "from_address": null,
    "checkout_url": "https://app.fystack.io/checkout/2912168a-6bb6-4b5c-88bb-723706718e4a"
  }
}
```

---

## Tạo thanh toán cho checkout

**Endpoint:** `POST /checkouts/:id/payment`

Tạo một khoản thanh toán cho phiên checkout hiện có bằng cách chỉ định tài sản được hỗ trợ dùng để thanh toán.

### Tham số

- `pay_asset_id` (string, required): ID của tài sản dùng để thanh toán. Phải là một trong các tài sản được hỗ trợ trong phiên checkout.
- `customer_email` (string): Địa chỉ email của khách hàng thực hiện thanh toán.

### Phản hồi

- `id` (string): Mã định danh duy nhất của khoản thanh toán.
- `checkout_id` (string): ID của phiên checkout liên quan.
- `customer_email` (string|null): Email của khách hàng, nếu được cung cấp.
- `pay_asset_id` (string): ID của tài sản đang được dùng để thanh toán.
- `network_id` (string): ID của mạng blockchain cho giao dịch.
- `expired_at` (timestamp): Thời điểm khoản thanh toán hết hạn.
- `payer_address` (string|null): Địa chỉ đã gửi khoản thanh toán, nếu có.
- `tx_hash` (string|null): Mã băm giao dịch, nếu có.
- `converted_crypto_price` (string): Số tiền thanh toán đã được quy đổi sang loại tiền mã hóa được chọn.
- `deposit_address` (string): Địa chỉ cần gửi khoản thanh toán đến.
- `deposit_qr` (string): URL đến mã QR chứa địa chỉ nạp tiền.
- `created_at` (timestamp): Thời điểm khoản thanh toán được tạo.
- `updated_at` (timestamp): Thời điểm khoản thanh toán được cập nhật gần nhất.

**Request** `POST /checkouts/:id/payment`

```typescript
import { PaymentService, Environment } from '@fystack/sdk'

const paymentService = new PaymentService({
  apiKey: apiCredentials.APIKey,
  environment: Environment.Production
})

// First get the checkout to see available assets
const checkout = await paymentService.getCheckout('2912168a-6bb6-4b5c-88bb-723706718e4a')

// Then create a payment using one of the supported assets
const payment = await paymentService.createCheckoutPayment(checkout.id, {
  pay_asset_id: checkout.supported_assets[0].id
})
```

```bash
curl -X POST https://api.fystack.io/api/v1/checkouts/2912168a-6bb6-4b5c-88bb-723706718e4a/payment \
  -H "Content-Type: application/json" \
  -d '{
    "pay_asset_id": "e9337429-a741-4e92-afbb-c1b1fc1ad8a4"
  }'
```

```json
{
  "success": true,
  "message": "success",
  "code": 0,
  "data": {
    "id": "06d92c50-e6f1-4637-8c20-72cf7e7d7b8a",
    "created_at": "2025-05-17T12:50:57.925269212+07:00",
    "updated_at": "2025-05-17T12:50:57.925269212+07:00",
    "checkout_id": "2912168a-6bb6-4b5c-88bb-723706718e4a",
    "checkout": null,
    "customer_email": null,
    "pay_asset_id": "e9337429-a741-4e92-afbb-c1b1fc1ad8a4",
    "network_id": "dd21bfb5-f809-4070-a789-18ec8abbee1b",
    "network": null,
    "expired_at": "2025-05-17T13:50:57.853990519+07:00",
    "payer_address": null,
    "tx_hash": null,
    "converted_crypto_price": "66",
    "deposit_address": "0xAbE72E79729e7463cd0822700255eD03bc6BD37C",
    "deposit_qr": "https://quickchart.io/qr?size=300&margin=2&text=0xAbE72E79729e7463cd0822700255eD03bc6BD37C"
  }
}
```

---

## Lấy thông tin thanh toán checkout

**Endpoint:** `GET /checkouts/payment/:id`

Lấy thông tin chi tiết về một khoản thanh toán checkout theo ID.

### Phản hồi

- `id` (string): Mã định danh duy nhất của khoản thanh toán.
- `checkout_id` (string): ID của phiên checkout liên quan.
- `checkout` (object): Toàn bộ đối tượng phiên checkout.
- `customer_email` (string|null): Email của khách hàng, nếu được cung cấp.
- `pay_asset_id` (string): ID của tài sản đang được dùng để thanh toán.
- `pay_asset` (object): Thông tin chi tiết của tài sản đang được dùng để thanh toán.
- `network_id` (string): ID của mạng blockchain cho giao dịch.
- `network` (object): Thông tin chi tiết của mạng blockchain.
- `expired_at` (timestamp): Thời điểm khoản thanh toán hết hạn.
- `payer_address` (string|null): Địa chỉ đã gửi khoản thanh toán, nếu có.
- `tx_hash` (string|null): Mã băm giao dịch, nếu có.
- `converted_crypto_price` (string): Số tiền thanh toán đã được quy đổi sang loại tiền mã hóa được chọn.
- `deposit_address` (string): Địa chỉ cần gửi khoản thanh toán đến.
- `deposit_qr` (string): URL đến mã QR chứa địa chỉ nạp tiền.
- `created_at` (timestamp): Thời điểm khoản thanh toán được tạo.
- `updated_at` (timestamp): Thời điểm khoản thanh toán được cập nhật gần nhất.

**Request** `GET /checkouts/payment/:id`

```typescript
import { PaymentService, Environment } from '@fystack/sdk'

const paymentService = new PaymentService({
  apiKey: apiCredentials.APIKey,
  environment: Environment.Production
})

const checkoutPayment = await paymentService.getCheckoutPayment('06d92c50-e6f1-4637-8c20-72cf7e7d7b8a')
console.log('checkout payment', checkoutPayment)
```

```bash
curl -X GET https://api.fystack.io/api/v1/checkouts/payment/06d92c50-e6f1-4637-8c20-72cf7e7d7b8a
```

```json
{
  "success": true,
  "message": "success",
  "code": 0,
  "data": {
    "id": "06d92c50-e6f1-4637-8c20-72cf7e7d7b8a",
    "created_at": "2025-05-17T12:50:57.925269+07:00",
    "updated_at": "2025-05-17T12:50:57.925269+07:00",
    "checkout_id": "2912168a-6bb6-4b5c-88bb-723706718e4a",
    "checkout": {
      "id": "2912168a-6bb6-4b5c-88bb-723706718e4a",
      "created_at": "2025-05-17T12:50:57.807741+07:00",
      "updated_at": "2025-05-17T12:50:57.807741+07:00",
      "currency": "USD",
      "product_id": "4c57fae9-1a54-4a1b-9d94-00d5b4a3e1d2",
      "order_id": "bc5bd50d-265e-4ea9-b312-bd8de5118683",
      "workspace_id": "ffb8c9d1-0bd2-4c30-bf4f-2a8fe7710d51",
      "underpaid_cover_percent": 0,
      "description": "Access to premium features and exclusive content.",
      "price": "66",
      "supported_assets": [],
      "customer_id": "bc5bd50d-265e-4ea9-b312-bd8de5118683",
      "expiry_duration_seconds": 3600,
      "enable_localization": false,
      "success_url": "https://example.com/payment/success",
      "cancel_url": "https://example.com/payment/cancel",
      "status": "Pending",
      "outcome": null,
      "from_address": null
    },
    "customer_email": null,
    "pay_asset_id": "e9337429-a741-4e92-afbb-c1b1fc1ad8a4",
    "pay_asset": {
      "id": "e9337429-a741-4e92-afbb-c1b1fc1ad8a4",
      "symbol": "USDC",
      "name": "USD Coin",
      "logo_url": "https://assets-cdn.trustwallet.com/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png"
    },
    "network_id": "dd21bfb5-f809-4070-a789-18ec8abbee1b",
    "network": {
      "id": "dd21bfb5-f809-4070-a789-18ec8abbee1b",
      "name": "Ethereum",
      "logo_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRyVyCtMa_rKwrl1y0hyWcqPda3eG0vssJBAX5xQznEPw&s"
    },
    "expired_at": "2025-05-17T13:50:57.85399+07:00",
    "payer_address": null,
    "tx_hash": null,
    "converted_crypto_price": "66",
    "deposit_address": "0xAbE72E79729e7463cd0822700255eD03bc6BD37C",
    "deposit_qr": "https://quickchart.io/qr?size=300&margin=2&text=0xAbE72E79729e7463cd0822700255eD03bc6BD37C"
  }
}
```

## Webhook của Checkout

Checkout API của Fystack sử dụng webhook để thông báo cho ứng dụng của bạn khi có sự kiện quan trọng xảy ra, chẳng hạn khi một phiên checkout hoàn tất hoặc một khoản thanh toán thành công hay thất bại.

### Các sự kiện webhook phổ biến

- `payment.received`: Được kích hoạt khi nhận được khoản thanh toán.
- `payment.success`: Được kích hoạt khi thanh toán thành công.

### Xác minh sự kiện webhook

Vì lý do bảo mật, bạn nên luôn xác minh các sự kiện webhook để đảm bảo chúng thực sự được gửi từ Fystack. Mỗi request webhook đều có chữ ký trong header `X-Webhook-Signature` mà bạn có thể dùng để xác minh tính xác thực của payload webhook. Loại sự kiện cũng được gửi kèm trong header `X-Webhook-Event`.

Để xác minh một sự kiện webhook, bạn cần:

1. Payload của sự kiện webhook
2. Chữ ký từ header `X-Webhook-Signature`

Với phương thức `verifyEvent` của SDK, bạn có thể dễ dàng kiểm tra webhook có hợp lệ hay không trước khi xử lý.

### Cấu trúc payload sự kiện

- `webhook_id` (string): Mã định danh duy nhất của cấu hình webhook.
- `resource_id` (string): Mã định danh của tài nguyên gắn với sự kiện.
- `url` (string): URL mà webhook đã được gửi đến.
- `payload` (object): Dữ liệu sự kiện thực tế, chứa thông tin chi tiết về checkout hoặc khoản thanh toán.
- `event` (string): Loại sự kiện (ví dụ: "payment.received", "payment.success").

**Xác minh sự kiện webhook**

```typescript
import { APIService, Environment } from '@fystack/sdk'

// Express.js example
app.post('/webhook', express.raw({type: 'application/json'}), async (req, res) => {
  const signature = req.headers['x-webhook-signature'] as string;
  const eventType = req.headers['x-webhook-event'] as string;
  const event = req.body;

  const apiService = new APIService(apiCredentials, Environment.Production);

  try {
    const isValid = await apiService.Webhook.verifyEvent(event, signature);

    if (isValid) {
      // Process the webhook event
      if (eventType === 'payment.received') {
        const { checkout_id, tx_hash, status } = event.payload;
        console.log(`Payment received for checkout ${checkout_id}: ${tx_hash}`);
        // Update your database, notify your user, etc.
      }

      res.status(200).send('Webhook received and verified');
    } else {
      console.warn('Invalid webhook signature');
      res.status(400).send('Invalid signature');
    }
  } catch (error) {
    console.error('Webhook verification failed', error);
    res.status(400).send('Webhook verification failed');
  }
});
```

```javascript
import { APIService, Environment } from '@fystack/sdk'

// Example of manually verifying a webhook
const apiService = new APIService(apiCredentials, Environment.Production)
const event = {
  webhook_id: 'add3a1be-fc91-413c-9b4a-028f0011954a',
  resource_id: 'checkout:b065623b-dc9c-4399-964a-99850d78d289:Pending',
  url: 'https://webhook.site/3a782a92-0d1b-4848-8c57-cc0837cba513',
  payload: {
    amount: '10',
    chain_id: 11155111,
    checkout_id: '664f5839-2b5a-4b8b-8507-3b9b4815b9c1',
    checkout_payment_id: 'b2f7d8b6-4e90-43b4-be6d-a5910ef53fdd',
    deposit_address: '0x06A388F07F0EB0605D57947A7F1856a5e091940b',
    from_address: 'ACCLHbGJYGy1vSL6RjHvaraT3XZn1bXMxz5fPVRA112G',
    network_code: 'ETHER_SEPOLIA_TESTNET',
    network_id: '23d13c03-1f3c-4e2a-9aef-1771a244b7f6',
    status: 'Pending',
    timestamp: '2025-02-09T23:42:24.83521+07:00',
    tx_hash: '0x928af7fee293a501fbbe847025a19d2f42ceaf4cd000112fbba63e053c6d02ea'
  },
  event: 'payment.received'
}
const signature = '735d2bdca20d3414eb2dba1e2de54a262ca11e9fc80f6c0a05b5196fec18cce3'

const isValid = await apiService.Webhook.verifyEvent(event, signature)

if (isValid) {
  console.log('Webhook verified successfully')
  // Process the webhook
} else {
  console.warn('Invalid webhook signature')
}
```

### Ví dụ payload webhook
