Create Deposit Order
Create一個新的Deposit (Deposit)Order.
Request Information
| Item | Value |
|---|---|
| Method | POST |
| Path | /gateway/api/v1/payments |
| Content-Type | application/json |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
platform_id | string | ✅ | 平台Merchant ID |
service_id | string | ✅ | 服務Type, Refer to Service ID List |
merchant_order_id | string | ✅ | MerchantOrder號, 須唯一 |
amount | number | ✅ | OrderAmount |
notify_url | string | ✅ | Callback Notification URL |
return_url | string | ❌ | 支付完成後Redirect URL |
extra_info | string | ❌ | 額外資訊, 回調時原樣Return |
sign | string | ✅ | Signature, Refer to Signature規範 |
Request Example
{
"platform_id": "10001",
"service_id": "CN_BANK_DEPOSIT",
"merchant_order_id": "ORDER_20231218_001",
"amount": 100000,
"notify_url": "https://your-domain.com/api/callback",
"return_url": "https://your-domain.com/payment/result",
"sign": "a1b2c3d4e5f6..."
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
code | number | Status碼, 0 表示成功 |
message | string | Status訊息 |
data.order_id | string | SystemOrder号 |
data.payment_url | string | 支付頁面 URL |
data.expire_time | string | Order過期時間 |
Response Example
{
"code": 0,
"message": "success",
"data": {
"order_id": "DP20231218123456789",
"payment_url": "https://pay.your-domain.com/checkout/DP20231218123456789",
"expire_time": "2023-12-18T15:30:00+08:00"
}
}
Error Codes
| Error Codes | Description |
|---|---|
1001 | 參數錯誤 |
1002 | Signature驗證失敗 |
1003 | Merchant不存在 |
1004 | 服務未開通 |
1005 | Order號重複 |