POST
/​v1/​maemanee/​payment/​paymentlink

This endpoint provides a generated payment link.

Sandbox URL : https://api-sandbox.partners.scb/partners/sandbox/v1/maemanee/payment/paymentlink

Request Header

Name Required Description
authorization Required Oauth token of the user performing the function
content-type Required The content type of request payload
Required: application/json
accept-language Optional The language of the content in the request payload
List of value:
- 'th'
Remark:

If value is null, default as 'th'
resourceOwnerId Required The hash value of the userid (resourceOwnerId from token API), or related user identification value
requestUId Required A unique identifier the client can generate to track the current request call

Request Body

Name Required Datatype Description
partnerReferenceNo Required String (100) Order id generated by partner
Remark:
walletId Required String (15) Merchant wallet id
paymentType Optional Array of Enum
List of value:
- PML_T30
- PML_CCFA
- PML_CCIPP
- PML_PGW
- PML_QRCS
Requested payment channel
Remark:
- If value is null, will be default as PML_T30
amount Required Decimal(9, 2) Payment link Amount
partnerOrderDate Required DateTime Order created date
Remark:
- Format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX
- Example: 2021-06-08T14:51:34.311+07:00
orderDetail Optional String (200) Order details
Remark:
cancelPolicy Required String (200) Remark for cancel order
Remark:
partnerMetaData Optional JSON Object JSON object that allow partner to send any fields
Sample fields:
 "partnerMetaData": {
  "product ": [{
  "customField1": " 030000",
  "customField2": "Lays 35 g",
  "customField3": "Snacks",
  "customField4": "1",
  "customField5": "20.50"
  },{
  "customField1": "040000",
  "customField2": "Pepsi 500 ml",
  "customField3": "Canned Soda",
  "customField4": "10",
  "customField5": "100.00"
  }]
 }
Remark:
- Each product[].customField - String(255)
- partnerMetaData.product[] - Array - Max 20 records
- Reference: partnerMetadata_guidelines.docx
Example Request
curl -X POST \
  https://api-sandbox.partners.scb/partners/sandbox/v1/maemanee/payment/paymentlink  \
  -H 'authorization: bearer <Your Access Token>' \
  -H 'content-types: application/json' \
  -H 'accept-language: th' \
  -H 'resourceOwnerId: <The value of resourceOwnerId from the response header of /v1/oauth/token>' \
  -H 'requestUId: e798ae11-4ae9-452f-9949-c121daf13895' \

  {
     "partnerReferenceNo": "100000100",
      "walletId": "014000000000012",
      "orderDetail": "รองเท้า NIKE รุ่น Air Max 2021 สีขาว",
      "paymentType": ["PML_CCFA"],
      "cancelPolicy": "บริษัทขอสงวนสิทธิ์ในการยกเลิกรายการสั่งซื้อสินค้าของลูกค้า ถ้าตรวจสอบพบว่าไม่ตรงตามเงื่อนไขในการสั่งซื้อหรือมีความผิดพลาดด้านราคาแลข้อมูลผลิตภัณฑ์นั้น",
      "amount": 1000.00,
      "partnerOrderDate": "2020-07-16T19:20:30.45+01:00",
      "partnerMetaData": {
          "product": [{
              "customField1": "030000",
              "customField2": "Lays 35 g",
              "customField3": "Snacks",
              "customField4": "1",
              "customField5": "20.50"
          },
          {
              "customField1": "040000",
              "customField2": "Pepsi 500 ml",
              "customField3": "Canned Soda",
              "customField4": "10",
              "customField5": "100.00"
          }]
    }
  }

Response

Name Datatype Description
status Object An object to contain status from Partner gateway
status.code String Partner API response code
status.description String Partner API response description
status.details Object An object to contain details of response status
status.details.validationMessages Object An object to contain response message from downstream
status.details.validationMessages.code String Downstream response code
status.details.validationMessages.description String Downstream response description
data Object An object to contain response information from downstream
data.paymentOrderId String Transaction reference id generated from Maemanee
data.partnerReferenceNo String Order id generated from partner
data.walletId String Merchant wallet id
data.paymentType Array Requested payment channel
data.orderDetail String Order details
data.orderDate DateTime Order created date
data.orderExpiredDate DateTime Payment link expiry date
data.cancelPolicy String Remark for cancel order
data.amount Decimal Payment link amount
data.webPayLink String Payment link url
Remark:
For Sandbox API
- Value will be returned as per below to provide overview of payment link user journey
 - https://www.scb.co.th/th/personal-banking/payment/for-merchant/mae-manee-app/howto-payment-link.html
For Production API
- Value will be returned as per below which will navigate user to payment details page
 - https://pay.scb.co.th/{Uuid}
Example Response
{
    "status": {
        "code": 1000,
        "description": "Success"
    },
    "data": {
        "orderId": "PLAAA00001",
        "partnerReferenceNo": "100000100",
        "walletId": "014000000000012",
        "paymentType": ["PML_CCFA", "PML_CCIPP", "PML_PGW", "PML_QRCS"],
        "paymentOrderDetail": "รองเท้า NIKE รุ่น Air Max 2021 สีขาวคาดดำ",
        "orderDate": "2021-03-03T19:20:30+07:00",
        "orderExpiredDate": "2021-03-04T19:20:30+07:00",
        "cancelPolicy": "บริษัทขอสงวนสิทธิ์ในการยกเลิกรายการสั่งซื้อสินค้าของลูกค้า ถ้าตรวจสอบพบว่าไม่ตรงตามเงื่อนไขในการสั่งซื้อหรือมีความผิดพลาดด้านราคาแลข้อมูลผลิตภัณฑ์นั้น",
        "amount": 12000.00,
        "webPayLink": "https://www.scb.co.th/th/personal-banking/payment/for-merchant/mae-manee-app/howto-payment-link.html"
    }
}

Response Codes

See list of Generic Response Codes.