Skip to content

Create Collection

WARNING

Important: name + phone + email + amount are used to identify distinct customers. Follow these notes to avoid incorrect risk-control decisions.

  1. Do not hard-code name, phone, and email together
  2. Use the same name + phone + email for the same customer

Endpoint

POST /cashin/vn/order/create

Request Headers

NameRequiredExampleDescription
Content-TypeYesapplication/json

Request Parameters

FieldTypeRequiredDescription
bankCodestring enumYesBank code — See the bankCode section — UPI
amountnumberYesOrder amount — Up to 2 decimal places (rounded). Trailing zeros after the decimal are omitted in the pre-sign string for float amounts
notifyUrlstringYesNotification callback URL — Sandbox supports automatic callbacks: odd last digit of phone → success; even → failure
namestringYesCustomer name — More realistic values improve success rate and reduce risk-control flags
phonestringYesCustomer phone — Vietnamese mobile format starting with 0, second digit 9, then 8–9 digits. More realistic numbers improve success rate and reduce risk flags
emailstringYesCustomer email — More realistic values improve success rate and reduce risk-control flags
signstringYesSignature
appIdstringYesMerchant appId — appId assigned by the platform
mchOrderNostringYesMerchant order number
mchIdintegerYesMerchant ID
timestampintegerYesSubmission time — Unix timestamp in seconds
txChannelstringYesTransaction channel — Fixed value
returnUrlstringNoCheckout redirect URL
productInfostringYesProduct information

Request Example

json
{
 "mchId": 399204155797661,
 "txChannel": "TX_VN_001",
 "appId": "DFN19SJXfxFCexeLIi",
 "timestamp": 16624500121,
 "mchOrderNo": "order_1672451031",
 "bankCode": "MOMO",
 "amount": 5000,
 "name": "Timothy Gonzalez",
 "phone": "18688984423",
 "email": "w.gssdyohqr@chvro.cy",
 "productInfo": "xxx-Rechange",
 "notifyUrl": "http://wxyiwtonif.sj/vpuu",
 "returnUrl": "https://www.baidu.com/",
 "sign": "xxxxxxxx"
}

Response Parameters

FieldTypeRequiredDescription
statusintegerYesStatus
msgstringYesMessage
dataobjectYesData
data.applyTimeintegerYesApplication time — Timestamp format
data.amountnumberYesActual paid amount
data.linkstringYesPayment link
data.expireTimeintegerYesExpiration time — Timestamp format
data.mchOrderNostringYesMerchant order number
data.platOrderNostringYesPlatform order number
data.referencestringYesReference code

Response Example

json
{
 "status": 200,
 "msg": null,
 "data": {
 "link": "https://s.xxxbxxxxxdpay.pw/pay/3661235101151a67b138e6a13049f782",
 "mchOrderNo": "php_1698144286763",
 "platOrderNo": "P_231024QiRN7KyNWTb0R7fWoVuN",
 "applyTime": 1698144286,
 "amount": 0,
 "reference": null,
 "expireTime": 1698144888
 }
}

Transafe Developer Documentation