> For the complete documentation index, see [llms.txt](https://docs.pagsmile.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagsmile.com/reference/payin/recurring-payment/vietnam/wallet.md).

# Wallet

This endpoint allows you to create a recurring Wallet payment in Vietnam.

After the recurring payment order is created successfully, Pagsmile returns a `web_url`. Redirect the user to the `web_url` to continue and complete the payment authorization.

{% hint style="info" %}
Vietnam recurring Wallet payment currently supports `Zalopay`.
{% endhint %}

{% hint style="info" %}
Vietnam recurring Wallet payment supports real-time payment processing.
{% endhint %}

{% hint style="info" %}
Vietnam recurring Wallet payment supports refund.
{% endhint %}

<mark style="color:green;">POST</mark> `https://gateway-test.pagsmile.com/trade/recurring`

#### Request Body

<table><thead><tr><th width="143.57421875">Parameter</th><th width="94.43359375">Type</th><th width="108.5859375">Required</th><th width="185.82421875">Constraints</th><th>Description</th></tr></thead><tbody><tr><td>app_id</td><td>string</td><td>Required</td><td>Max length: 32</td><td>The merchant application ID assigned by Pagsmile.</td></tr><tr><td>timestamp</td><td>string</td><td>Required</td><td>Format: <code>yyyy-MM-dd HH:mm:ss</code>; max length: 19</td><td>Request timestamp.</td></tr><tr><td>method</td><td>string</td><td>Required</td><td>Fixed value: <code>Wallet</code></td><td>Payment method.</td></tr><tr><td>channel</td><td>string</td><td>Required</td><td>Fixed value: <code>Zalopay</code></td><td>Wallet channel.</td></tr><tr><td>order_amount</td><td>string</td><td>Required</td><td>Min: <code>1</code>; max: <code>20,000,000</code></td><td>Recurring payment amount.</td></tr><tr><td>order_currency</td><td>string</td><td>Required</td><td>Fixed value: <code>VND</code></td><td>Payment currency.</td></tr><tr><td>trial_amount</td><td>string</td><td>Required</td><td>Min: <code>1</code>; max: <code>20,000,000</code></td><td>Trial payment amount.</td></tr><tr><td>trial_period</td><td>string</td><td>Required</td><td>Example: <code>1D</code></td><td>Trial period.</td></tr><tr><td>interval</td><td>string</td><td>Required</td><td>Example: <code>1D</code></td><td>Recurring payment interval.</td></tr><tr><td>quantity</td><td>integer</td><td>Required</td><td>Positive integer; example: <code>30</code></td><td>Number of recurring payment cycles.</td></tr><tr><td>trade_type</td><td>string</td><td>Required</td><td>Fixed value: <code>WEB</code></td><td>Trade type.</td></tr><tr><td>out_trade_no</td><td>string</td><td>Required</td><td>Max length: 64</td><td>Merchant order number. Must be unique.</td></tr><tr><td>subject</td><td>string</td><td>Required</td><td>Max length: 128</td><td>Payment subject or order title.</td></tr><tr><td>content</td><td>string</td><td>Optional</td><td>Max length: 255</td><td>Payment content or order description.</td></tr><tr><td>notify_url</td><td>string</td><td>Required</td><td>Valid URL</td><td>The URL to receive payment notifications.</td></tr><tr><td>return_url</td><td>string</td><td>Required</td><td>Valid URL</td><td>The URL to redirect the user after payment.</td></tr><tr><td>buyer_id</td><td>string</td><td>Required</td><td>Max length: 64</td><td>Merchant-side user ID.</td></tr></tbody></table>

#### Request Sample

```json
{
  "app_id": "166***280",
  "timestamp": "2021-08-04 18:50:42",
  "method": "Wallet",
  "channel": "Zalopay",
  "order_amount": "10",
  "order_currency": "VND",
  "trial_amount": "1000",
  "trial_period": "1D",
  "interval": "1D",
  "quantity": 30,
  "trade_type": "WEB",
  "out_trade_no": "out_trade_no_101***791",
  "subject": "trade pay test",
  "content": "trade pay test content",
  "notify_url": "http://merchant/callback/success",
  "return_url": "https://pagsmile.com/zh/",
  "buyer_id": "buyer123"
}
```

#### Response Sample

```json
{
  "code": "10000",
  "msg": "Success",
  "out_trade_no": "out_trade_no_10***791",
  "trade_no": "2026***153",
  "web_url": "https://checkout.pagsmile.com?prepay_id=TVR*******1212sasd",
  "prepay_id": "TVRo***F52F1"
}
```

{% hint style="info" %}
After receiving the `web_url`, redirect the user to the `web_url` to continue the payment authorization.
{% endhint %}
