This is just a POC of the service that uses the SCB Open Banking API Document to
- Login and generate the token.
- Create a QR code for payment (C Scan B).
- Slip Verification.
- B Scan C payment.
We recommended using with Somjai Application.
The project structure was inspired by rails.
- Node v12.16.2
- Postman - for testing an endpoint.
- ngrok - for exposing the local service to a public URL.
- nvm - for switching between node versions.
To start the system, you need to create an account and the app in SCB Open Banking API Document, because we need several fields such as API_KEY
, API_SECRET
, BILLER_ID
, MERCHANT_ID
, MERCHANT_TERMINAL_ID
.
After we registered an account and created an application in https://developer.scb/. We'll need to config several fields that we mention above.
To start, just copy .env.example
to .env
and change the field that has the prefix <Your ...>
to yours.
# Application
SCB_API_KEY=<Your API KEY>
SCB_API_SECRET=<Your API SECRET>
SCB_API_BASE_URL=https://api-sandbox.partners.scb # No need to change
# Biller Information
SCB_BILLER_ID=<Your Biller ID>
# Merchant Information
SCB_MERCHANT_ID=<Your Merchant ID>
SCB_MERCHANT_TERMINAL_ID=<Your Terminal ID>
The development server is including the debug
log that we do not include in production mode.
$ yarn dev
# or
$ npm run dev
$ yarn start
# or
$ npm run start
In the demonstration, we are using the Heroku to deploy and do CI/CD.
To use a project in production, we have many concerns, for example, some request body validation, validation token, and database to store a transaction id or token. You'll need to put some effort to make it ready to use in production.
We recommended reading the Futher reading section.
Postman collection available here, docs/postman
- SCB Open Banking API Document
- สร้าง Payment Chatbot ด้วย SCB Open Banking API (Part 1 : มาส่อง API ของธนาคารไทยพาณิชย์ไปพร้อมกัน)
- สร้าง Payment Chatbot ด้วย SCB Open Banking API (Part 2 : เตรียม Chatbot ของเราให้พร้อม)
- สร้าง Payment Chatbot ด้วย SCB Open Banking API (Part 3 : เขียน Fulfillment เพื่อสร้าง Payment Deeplink)
- สร้าง Payment Chatbot ด้วย SCB Open Banking API (Part 4 : ส่ง Push Message จาก Payment Confirmation)
- Most response codes are copied from Generic Response Codes
Made with ❤️ by Ayuth Mangmesap.