POST
/​v1/​registration/​web/​init

This endpoint is for merchant to initialize website for customer registration for retail customer as a payer via SCB direct debit service.

Sandbox URL: https://api-sandbox.partners.scb/partners/sandbox/v1/registration/web/init

Note: This API merchant need to encrypt and decrypt a transaction data by public key.

Request Header

Name Type Required Description
content-type String Required Content type of request payload
Value:
- application/json
authorization String Required OAuth token obtained after the user has provided consent and the authorized partner calls the /v1/oauth/token endpoint to retrieve this token
resourceOwnerId String Required The system identifier, use the value of apikey
requestUId String Required A unique identifier the client can generate to track the current request call
accept-language String Optional The language of the content in the request payload
Values:
- EN (Default)
- TH

Request Body

Name Data Type Required Description
merchantId String(10) Required Merchant ID
Ex. 20200412000001
subAccountId String(12) Required Merchant Sub-account
Ex. 8943289551
encryptedValue String Required Registration info encrypted please refer
Example Code for Encryption and Decryption

Registration information (Format: Json) encrypted please refer to this following properties:

Name Type Required Description
regRef String (20) Required Registration reference (Generated by merchant)
citizenId String (13) Optional Customer’s citizen ID
ref1 String (20) Required Customer reference (Reference No.1)
ref2 String (20) Optional Other reference (Reference No.2)
remarks String (100) Optional Description/remarks
backUrl String (255) Required Return URL

Example Request

curl -X POST \
    https://api-sandbox.partners.scb/partners/sandbox/v1/registration/web/init \
    -H 'authorization: Bearer <Your Access Token> ' \
    -H 'requestUID: 85230887-e643-4fa4-84b2-4e56709c4ac4' \
    -H 'resourceOwnerID: <Your API Key>' \
    -H 'content-type: application/json' \
    -H 'accept-language: EN' \
    -d '{
    "merchantId": "2020000001",
    "subAccountId": "1293340504",
    "encryptedValue": "<Your Encrypt Data>"
}'

Response

Name Parameter Type Description
status
code Integer Partner API response code
description String Partner API response description
data
merchantId String Merchant ID
subAccountId String Merchant Sub-account
registrationResponse Object Registration information please see more detail below.
validationMessages Array[Object] Validation Messages please see more detail below.

Registration Infomation

Name Type Description
webURL String Unique web registration URL

Validation Messages

Name Type Description
message String Error message
description String Description of message

Example Response

{
    "status":{
        "code":1000,
        "description":"Success"
    },

    "data":{
        "merchantId":"2020000001",
        "subAccountId":"1293340504",
        "registrationResponse":{
        "webUrl":"https://www.pgw.scb.co.th/register?rqRef=fwfwfleerti4t5w3r2w2r"
        },
        "validationMessages":[]
    }
}

Response Code

See list of Generic Response Codes