🔌Transaction API

This API Endpoint receive your order transaction.

Environment

Host

  • Test: https://normalize-txns-service.stag.tekoapis.net

  • Production: https://normalize-txns-service.tekoapis.com

Security

Header

  • X-API-KEY: API owner will provide for each service an API key

  • TRACE-ID: TraceId is used to block spam requests in the current 5 seconds per traceId. Recommend value format: {order_id}_{order_status}

Normalize transaction from Omni transactions.

post

Receive Omni transactions.

Authorizations
Body
merchantIdstringOptional

Company ID on CDP (CDP provide)

Example: soibien
merchantNamestringOptional

Company name on CDP (CDP provide)

Example: Sói Biển
senderEmailstringOptional

Customer's email

Example: nguyenvan.a@gmail.com
senderPhoneNumberstringOptional

Customer's phone

Example: 943999999
senderFullNamestringOptional

Customer's fullname

Example: Nguyễn Văn A
senderAccountIdstringOptional

Customer's id

Example: SB241408
shopIdstringOptional

ID of shop/store where the order was created

Example: SB01
shopNamestringOptional

Name of shop/store where the order was created

Example: SoiBien Hoang Cau
shopLocationIdstringOptional

The location ward id of the store where the order was created

Example: 10114
shopLocationNamestringOptional

The location address of the store where the order was created

Example: Phường Thành Công - Quận Ba Đình - Thành phố Hà Nội
terminalIdstringOptional

ID of terminal where the order was created

Example: Soibien_North
terminalNamestringOptional

Name of terminal where the order was created

Example: Sói Biển Miền Bắc
paymentDateintegerOptional

The order created at this timestamp

Example: 1628490676000
paymentTotalAmountintegerOptional

total amount of order, not included the discount amount

Example: 150000
paymentRealAmountintegerOptional

total amount of order, included the discount amount. So paymentRealAmount =< paymentTotalAmount

Example: 140000
paymentDiscountAmountintegerOptional

discount amount of order

Example: 10000
paymentChannelMethodstringOptional

The method of payment for the order. E.g. CASH, BANK_TRANSFER, COD, MOMO, COD, CARD...

Example: CASH
txnRefstringOptional

Id of the order

Example: TD000034
orderCouponCodesstring[]Optional

List coupon codes that applied for the order

Example: ["PROMO20","FREESHIP"]
statusstringOptional

Order Status. E.g. PENDING, CANCELLED, DELIVERED, RETURNED...

Example: DELIVERED
createdAtintegerOptionalExample: 1628490676000
updatedAtintegerOptionalExample: 1628490676000
Responses
200
OK
application/json
post
POST /v1/transaction/normalize HTTP/1.1
Host: normalize-txns-service.dev.tekoapis.net
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1317

{
  "merchantId": "soibien",
  "merchantName": "Sói Biển",
  "senderEmail": "nguyenvan.a@gmail.com",
  "senderPhoneNumber": "0948999999",
  "senderFullName": "Nguyễn Văn A",
  "senderAccountId": "SB241408",
  "shopId": "SB01",
  "shopName": "SoiBien Hoang Cau",
  "shopLocationId": 10114,
  "shopLocationName": "Phường Thành Công - Quận Ba Đình - Thành phố Hà Nội",
  "terminalId": "Soibien_North",
  "terminalName": "Sói Biển Miền Bắc",
  "paymentDate": 1628490676000,
  "paymentTotalAmount": 299000,
  "paymentRealAmount": 259000,
  "paymentDiscountAmount": 40000,
  "paymentChannelMethod": "CASH",
  "txnRef": "TD000034",
  "orderCouponCodes": [
    "PROMO20",
    "FREESHIP"
  ],
  "orderLineItems": [
    {
      "skuId": "SKU12384192",
      "skuName": "Cải bắp Vietgap Đà Lạt 500g",
      "quantity": "0.66",
      "categoryId": "tuoisong01",
      "categoryName": "Tươi sống 01",
      "brandId": "112",
      "brandName": "dalatfarm",
      "itemPrice": 22000,
      "itemTotalAmount": 14520,
      "SellerId": 2
    },
    {
      "skuId": "SKU12331279",
      "skuName": "Sườn Thăn lợn Hòa Bình",
      "quantity": "0.55",
      "categoryId": "tuoisong03",
      "categoryName": "Tươi sống 03",
      "brandId": "144",
      "brandName": "CP",
      "itemPrice": 239000,
      "itemTotalAmount": 131450,
      "SellerId": 40
    }
  ],
  "paymentTransactions": [
    {
      "paymentMethod": "CASH",
      "paymentAmount": 125970
    },
    {
      "paymentMethod": "LOYALTY",
      "paymentAmount": 20000
    }
  ],
  "status": "DELIVERED",
  "createdAt": 1628490676000,
  "updatedAt": 1628490676000
}
200

OK

{
  "code": 0,
  "message": "Success!",
  "data": "text"
}

Location code

Last updated

Was this helpful?