Skip to content

Create pay-in

API TEST CONSOLE

Test request

TEST ONLY

Configure parameters and send a request to the test environment

POST/trade/payment/create

Authentication

Not configured

The private key is used only in your browser to generate authorization. It is never sent or stored.

Request headers

Request body application/json

Response

Response
After you send the request, the status, duration, and JSON response appear here.

Authentication details remain only in this page's memory and are not written to local storage.

Copying cURL does not send a request

POST/trade/payment/create

Request headers

Common request headers.

Payment method values

paymentType
QR
VA

Request parameters

FieldTypeRequiredMaximum lengthDescription
merchantOrderNoStringYes32Merchant order number
transactionAmountStringYes20Pay-in amount in VND, integers only
paymentTypeStringYes24Payment method
idTypeStringNo32Optional ID type. This endpoint has no fixed enum; omit this field unless required by your business or payment channel.
userIdCardStringNo50ID number. No fixed format; omit this field unless required by your business or payment channel.
userNameStringYes64Payer name
userPhoneStringYes50Phone number: 10 digits starting with 0
userEmailStringYes50Payer email; must match a valid email address format
bankCodeStringConditional50Bank code; see the bank list; required when paymentType is VA
bankAccountNoStringNo64Bank account number
merchantNameStringNo64Payee name
descriptionStringNo100Description
expireTimeStringNo-Order expiration time (local time, format yyyy-MM-dd HH:mm:ss)
paymentCallbackUrlStringNo200Pay-in callback URL

Request example

The following example shows the field structure. Before submitting, replace paymentType with the value confirmed by your VellPay representative.

{
"merchantOrderNo": "ORDER202609170001",
"transactionAmount": "100000",
"paymentType": "QR",
"idType": "NATIONAL_ID",
"userIdCard": "012345678901",
"userName": "TEST USER",
"userPhone": "0912345678",
"userEmail": "user@example.com",
"bankCode": "1001",
"bankAccountNo": "1234567890",
"merchantName": "TEST MERCHANT",
"description": "Payment order",
"expireTime": "2026-09-21 18:00:00",
"paymentCallbackUrl": "https://merchant.example/callback"
}

VA request example (bankCode is required):

{
"merchantOrderNo": "ORDER202609170002",
"transactionAmount": "100000",
"paymentType": "VA",
"userName": "TEST USER",
"userPhone": "0912345678",
"userEmail": "user@example.com",
"bankCode": "1001",
"paymentCallbackUrl": "https://merchant.example/callback"
}

Response parameters

FieldTypeRequiredMaximum lengthDescription
codeintYes-Status code; a value other than 200 indicates an error
dataObjectYes-Response body
data.merchantOrderNoStringYes32Merchant order number
data.tradeNoStringYes32Platform order number
data.transactionAmountStringYes-Pay-in amount in VND, integers only
data.statusStringYes24Order status: PAYING (paying) or FAIL (failed) when created
data.paymentTypeStringYes24Payment method
data.failMsgStringNo200Order failure reason; returned on failure
data.paymentInfoStringYes200Primary payment information: QR returns the QR code string; VA returns the VA account number
data.additionalObjectNo-Additional payment information: paymentLink (String, required) is the payment link; qrString (String, required) is the QR code string for QR; va (String, required) is the VA account number for VA
msgStringNo-Error message
tidStringYes-Trace ID

Response example

{
"code": 200,
"data": {
"merchantOrderNo": "ORDER202609170001",
"tradeNo": "VS2608270002VN0000000000040059",
"transactionAmount": "100000",
"status": "PAYING",
"paymentType": "QR",
"paymentInfo": "QR_CODE_STRING_EXAMPLE",
"additional": {
"paymentLink": "https://example.com/pay",
"qrString": "QR_CODE_STRING_EXAMPLE",
"va": "1234567890123"
}
},
"msg": "success",
"tid": "747bbf80261844ed85b809212aab0d81"
}