Create Payin Order
Request URL
| method | url |
|---|---|
| POST | /api/pay/payment/create/v1 |
Headers
| Header Parameter | Description |
|---|---|
| timestamp | Request timestamp |
| nonce | Random value |
| country | Country code (VN) |
| appCode | Application ID |
Supported Payment Types (paymentType)
| PaymentType | Payment Method Name |
|---|---|
| 2101 | QR |
| 2102 | VA |
Request Parameters
| Field | Type | Required | Length | Description |
|---|---|---|---|---|
| merchantOrderNo | String | yes | 32 | Merchant order number |
| paymentType | Int | yes | Payment type, see the payment type list | |
| amount | String | yes | 20 | Payin amount in VND, integer only |
| realName | String | yes | 64 | Payer name |
| String | yes | 50 | Payer email (must match a valid regex format) | |
| phone | String | yes | 50 | Phone number: 10 digits starting with 0 |
| bankCode | String | no | 50 | Bank code; see the Bank List. Required when paymentType is 2102 (VA) |
| sign | String | yes | Signature | |
| callbackUrl | String | no | 200 | Callback URL |
{ "merchantOrderNo": "OrderNoExample", "realName": "TeemoPay", "amount": "30000", "callbackUrl": "https://www.callbackexample.com", "paymentType": 2101, "email": "TeemoPay@example.com", "phone": "0900000000", "sign": "YOUR_SIGN"}{ "merchantOrderNo": "OrderNoExampleVA", "realName": "TeemoPay", "amount": "30000", "callbackUrl": "https://www.callbackexample.com", "paymentType": 2102, "bankCode": "1001", "email": "TeemoPay@example.com", "phone": "0900000000", "sign": "YOUR_SIGN"}Response Parameters
| Field | Type | Required | Length | Description |
|---|---|---|---|---|
| merchantOrderNo | String | yes | 32 | Merchant order number |
| tradeNo | String | yes | Platform order number | |
| amount | String | yes | Transaction amount | |
| paymentType | Int | yes | Payment type | |
| paymentInfo | String | yes | Primary payment information For example: 2101 returns the QR code string for QR payment 2102 returns the VA account number | |
| additionalInfo | JSONObject | no | Additional payment information; see the fields below | |
| status | Int | yes | Payin status: 1 = Paying, 3 = Failed | |
| errorMsg | String | no | Error message (returned only in case of failure) |
additionalInfo Object
| Field | Type | Required | Description |
|---|---|---|---|
| paymentLink | String | yes | Payment link |
| qrString | String | yes | QR code string for QR payment, applicable to 2101 (QR) |
| va | String | yes | VA account number, applicable to 2102 (VA) |
{ "code": 200, "data": { "merchantOrderNo": "OrderNoExample", "amount": "30000", "tradeNo": "TS2501010001VN0000000000000000", "paymentType": 2101, "paymentInfo": "QR_CODE_STRING_EXAMPLE", "additionalInfo": { "paymentLink": "https://Example", "qrString": "QR_CODE_Example", "va": "VA_Example" }, "status": 1, "errorMsg": null }, "msg": "success", "traceId": "30c38418a758434dba4da32fe73b5fd2.106.17833191761712117"}{ "code": 200, "data": { "merchantOrderNo": "OrderNoExampleVA", "amount": "30000", "tradeNo": "TS2501010001VN0000000000000001", "paymentType": 2102, "paymentInfo": "1234567890123", "additionalInfo": { "paymentLink": "https://Example", "qrString": "QR_CODE_Example", "va": "VA_Example" }, "status": 1, "errorMsg": null }, "msg": "success", "traceId": "30c38418a758434dba4da32fe73b5fd2.106.17833191761712117"}