Skip to main content

Create a POS order

Use this API to create a payment order and push it to a linked POS terminal. The customer pays the order directly on the POS terminal by card or QR code.

POST
URLhttps://open-api.tingee.vn/v1/create-pos-bill

Create a payment order on a Payoo POS terminal. The returned billId is used for lookup, cancellation and Webhook reconciliation.

Header Request​

HeaderRequiredDescription
Content-Type✓application/json
x-client-id✓Partner identifier issued by TINGEE.
x-signature✓HMAC SHA512 authentication signature. See How to generate the signature.
x-request-timestamp✓Time the request is sent (format: yyyyMMddHHmmssSSS, UTC+7)

Body Parameter​

FieldTypeRequiredDescription
merchantIdnumber~ID of the Merchant that owns the POS terminal.
Required if you connect with a Master Merchant account.
bankBinstring✓Always pass PAYOO.
vaAccountNumberstring✓Device code of the linked Payoo POS terminal (up to 50 characters).
amountnumber✓Amount to pay (VND, positive integer).
paymentMethodstring✕Payment method shown on the POS terminal:
- card: Card payment
- qr: QR code payment
Leave empty (or any other value) to let the customer choose on the POS terminal.
purposestring✕Payment description, shown on the POS terminal.
expireInMinutenumber✕Order validity period (minutes), from 1 to 43200. Default 43200 (30 days).
extraInfostring✕Additional partner information (up to 200 characters), included in the payment Webhook.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/create-pos-bill' \
--header 'accept: application/json' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-request-timestamp: 20240509154004003' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"bankBin": "PAYOO",
"vaAccountNumber": "POS00012345",
"amount": 150000,
"paymentMethod": "card",
"purpose": "Thanh toan don hang DH001",
"expireInMinute": 30,
"extraInfo": "DH001"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": {
"billId": "9f1c2b7e4a5d4c3b8e2f1a0b9c8d7e6f",
"amount": 150000,
"expireInMinute": 30,
"purpose": "Thanh toan don hang DH001"
}
}
FieldTypeDescription
codestringResult code (00 = Success).
messagestringResponse message.
data.billIdstringOrder ID (32 characters). Used for lookup, cancellation and payment Webhook reconciliation.
data.amountnumberOrder amount.
data.expireInMinutenumberOrder validity period (minutes); 43200 if not passed at creation.
data.purposestringPayment description (not returned if not passed at creation).

Common error codes​

CodeDescriptionHow to handle
1024The virtual account number does not existThe POS terminal is not linked to the Merchant. Link it with Create/Link account number using bankBin = "PAYOO".
1096Merchant ID must not be emptyMaster Merchant accounts must pass merchantId.
1095The Merchant does not belong to the Master MerchantCheck that merchantId belongs to the Master Merchant calling the API.
400Error from Payoo or invalid datamessage contains the detailed error from Payoo or from data validation.
90, 91, 92, 97Request authentication error (timestamp, client-id, signature)See System error codes.
OthersOther errorsSee Error codes.