Kas-001-API-kaspro Snap API Document v.0.6

Download as pdf or txt
Download as pdf or txt
You are on page 1of 91

KasPro

Standard SNAP API Document


Version 0.6
API DOCUMENTATION

DOCUMENT CONTROL
Copyright © 2022 DigiAsia Bios. All right reserved

This document contains proprietary and confidential information of DigiAsia Bios

Document Release Information


Date Author Change Description Version
Fajar Asri,
5 Oct 2022 Sukmaindra, & • Initial New SNAP API Documentation V.0.1
Stephanie
Sukmaindra &
9 Nov 2022 • Add Data type, attribute, length, and description information V.0.2
Stephanie
14 Nov 2022 Sukmaindra • Update QRIS Transaction Status endpoint & response parameter V.0.2.1

25 Nov 2022 Sukmaindra • Update URL Endpoints V.0.2.2


• Adding Bank Transfer Inquiry
• Adding Bank Transfer Payment
23 Dec 2022 Galih • Adding Bank List v.0.3
• Adding P2P Inquiry
• Adding Confirm P2P Payment
• Update error code & message
28 Apr 2023 Galih v.0.4
• Change url upgrade premium
• Change Path URL
• Change format accessTokenExpiryTime
15 May 2023 Galih • Change format refreshTokenExpiryTime v.0.5
• API Business Type B2B2C in Header add Authorization (token B2B) &
Authorization-Customer (token B2B2C)
• Adding customer re-registration
• Adding Reversal Payment
22 Jun 2023 Stephanie v.0.6
• Adding delete/create virtual account
• Add New Response Code EKYC

©2023 | Digi Asia Bios Page 1 of 91


API DOCUMENTATION

TABLE OF CONTENTS

DOCUMENT CONTROL ............................................................................................................................................. 1


TABLE OF CONTENTS ................................................................................................................................................ 2
TABLE OF FIGURE ..................................................................................................................................................... 6
1 Introduction........................................................................................................................................................... 7
1.2 Goals ............................................................................................................................................................ 7
2 Standard Security ................................................................................................................................................ 8
2.1 Encryption Method ..................................................................................................................................... 8
2.2 Private dan Public Key Delivery Method .................................................................................................... 8
2.3 Signature Creation and Validation.............................................................................................................. 8
2.3.1 Header Structure Request ............................................................................................................... 8
2.3.1.1 Access Token B2B ......................................................................................................................... 8
2.3.1.1.1 General Information .............................................................................................................. 8
2.3.1.1.2 Request Specification ............................................................................................................ 9
2.3.1.1.3 Response Specification .......................................................................................................... 9
2.3.1.1.4 Sample Request ................................................................................................................... 10
2.3.1.1.5 Sample Response ................................................................................................................. 10
2.3.1.2 Access Token B2B2C ................................................................................................................... 11
2.3.1.2.1 General Information ............................................................................................................ 11
2.3.1.2.2 Request Specification .......................................................................................................... 11
2.3.1.2.3 Response Specification ........................................................................................................ 12
2.3.1.2.4 Sample Request ................................................................................................................... 12
2.3.1.2.5 Sample Response ................................................................................................................. 13
2.3.2 Transaction Request B2B ............................................................................................................... 14
2.3.2.1 Structure Field Format Header................................................................................................... 14
2.3.2.2 Sample B2B Header .................................................................................................................... 15
2.3.3 Transaction Request B2B2C ........................................................................................................... 16
2.3.3.1 Structure Field Format Header................................................................................................... 16
2.3.3.2 Sample B2B2C Header ................................................................................................................ 17
3 List Response Code ............................................................................................................................................ 18
4 Customer Registration ...................................................................................................................................... 21
4.1 Customer Registration .............................................................................................................................. 21
4.1.1 Sequence Diagram ......................................................................................................................... 21

©2023 | Digi Asia Bios Page 2 of 91


API DOCUMENTATION

4.1.2 Reference API (Customer Get Profile) ........................................................................................... 22


4.1.3 Reference API (Customer Registration) ........................................................................................ 23
4.2 Customer Re-Registration ......................................................................................................................... 26
4.2.1 Reference API (Customer Re-Registration) ................................................................................... 26
5 Customer Balance Inquiry ................................................................................................................................. 28
5.1 Customer Balance Inquiry ......................................................................................................................... 28
5.1.1 Sequence Diagram ......................................................................................................................... 28
5.1.2 Reference API ................................................................................................................................. 28
6 2 Factor Authentication Token ......................................................................................................................... 31
6.1 2 Factor Authentication Token ................................................................................................................. 31
6.1.1 Sequence Diagram ......................................................................................................................... 31
6.1.2 Reference API ................................................................................................................................. 31
7 Transaction ........................................................................................................................................................ 33
7.1 Merchant Payment Inquiry ....................................................................................................................... 33
7.1.1 Reference API ................................................................................................................................. 33
7.2 Confirm Merchant Payment ..................................................................................................................... 35
7.2.1 Sequence Diagram ......................................................................................................................... 35
7.2.2 Confirm Merchant Payment .......................................................................................................... 36
7.3 Biller Inquiry .............................................................................................................................................. 39
7.3.1 Reference API ................................................................................................................................. 39
7.4 Biller Payment ........................................................................................................................................... 41
7.4.1 Reference API ................................................................................................................................. 41
7.5 Transaction Check Status .......................................................................................................................... 43
7.5.1 Sequence Diagram ......................................................................................................................... 43
7.5.2 Reference API ................................................................................................................................. 43
7.6 P2P Transaction Inquiry ............................................................................................................................ 45
7.6.1 Reference API ................................................................................................................................. 45
7.7 Confirm P2P Payment ............................................................................................................................... 48
7.7.1 Sequence Diagram ......................................................................................................................... 48
7.7.2 Reference API ................................................................................................................................. 49
7.8 Transfer to Bank ........................................................................................................................................ 52
7.8.1 Transfer to Bank-Account Inquiry ................................................................................................. 52
7.8.2 Transfer to Bank-Payment Transaction......................................................................................... 55

©2023 | Digi Asia Bios Page 3 of 91


API DOCUMENTATION

7.8.2.1 Sequence Diagram ...................................................................................................................... 55


7.8.2.2 Reference API ............................................................................................................................. 57
7.8.3 Bank List ......................................................................................................................................... 59
7.8.4 API Callback Transfer Async Parameters....................................................................................... 60
7.8.4.1 Authorization .............................................................................................................................. 61
7.9 Reversal Payment...................................................................................................................................... 61
7.9.1 Sequence Diagram ......................................................................................................................... 61
7.9.2 Reference API ................................................................................................................................. 62
7.10 Generate Payment Token .................................................................................................................. 64
7.10.1 Sequence Diagram .................................................................................................................. 64
7.10.2 Reference API ......................................................................................................................... 64
7.10.3 List of Errors / Response Codes .............................................................................................. 65
7.11 Create Virtual Account Bill Payment ................................................................................................. 65
7.11.1 Reference API ......................................................................................................................... 65
7.11.2 List of Errors / Response Codes .............................................................................................. 66
7.12 Delete Virtual Account Bill Payment ................................................................................................. 67
7.12.1 Reference API ......................................................................................................................... 67
7.12.2 List of Errors / Response Codes .............................................................................................. 67
8 QRIS ................................................................................................................................................................... 68
8.1 Decode QR MPM ....................................................................................................................................... 68
8.1.1 Sequence Diagram ......................................................................................................................... 68
8.1.2 Reference API ................................................................................................................................. 68
8.2 QRIS MPM Payment .................................................................................................................................. 70
8.2.1 Sequence Diagram ......................................................................................................................... 70
8.2.2 Reference API ................................................................................................................................. 71
8.3 QRIS Transaction Status ............................................................................................................................ 74
8.3.1 Sequence Diagram ......................................................................................................................... 74
8.3.2 Reference API ................................................................................................................................. 74
9 Upgrade Customer Account .............................................................................................................................. 78
9.1 Upgrade Customer Account with OCR...................................................................................................... 78
9.1.1 Sequence Diagram ......................................................................................................................... 78
9.1.2 Reference API Upgrade Premium with OCR Inquiry ..................................................................... 79

©2023 | Digi Asia Bios Page 4 of 91


API DOCUMENTATION

9.1.3 List of Errors / Response Codes ..................................................................................................... 80


9.1.4 Reference API Upgrade Premium with OCR Confirmation ........................................................... 80
9.1.5 List of Errors / Response Codes ..................................................................................................... 81
9.1.6 OCR Guideline ................................................................................................................................ 83
9.2 Upgrade Customer Account with Passport and SIM ................................................................................ 84
9.2.1 Sequence Diagram ......................................................................................................................... 84
9.2.2 Reference API Upgrade Premium with Passport and SIM ............................................................ 84
9.2.3 List of Errors / Response Codes ..................................................................................................... 86
9.3 Mandatory Field ........................................................................................................................................ 86
9.4 API Callback – Request Upgrade to Premium .......................................................................................... 87
9.4.1 Sequence Diagram ......................................................................................................................... 87
9.4.2 API Parameters .............................................................................................................................. 87
10 AML .................................................................................................................................................................... 88
10.1 Reference API ..................................................................................................................................... 88
10.2 List of Errors / Response Codes.......................................................................................................... 88
10.3 Parameter Description ....................................................................................................................... 89

©2023 | Digi Asia Bios Page 5 of 91


API DOCUMENTATION

TABLE OF FIGURE
Figure 4.1.1-1 Customer Registration for New Partner Sequence Diagram (Ref: KAS-API-SEQ-SNAP-001) ........... 21
Figure 5.1.1-1 Customer Balance Inquiry Sequence Diagram (Ref: KAS-API-SEQ-SNAP-002) ................................ 28
Figure 6.1.1-1 Two Factor Authentication Token Sequence Diagram (Ref: KAS-API-SEQ-SNAP-003) .................... 31
Figure 7.2.1-1 Payment to Merchant Using Barcode Sequence Diagram (Ref: KAS-API-SEQ-SNAP-004) .............. 35
Figure 7.5.1-1 Transaction Check Status Sequence Diagram (Ref: KAS-API-SEQ-017) ........................................... 43
Figure 7.7.1-1 P2P Sequence Diagram (Ref: KAS-API-SEQ-SNAP-004).................................................................... 48
Figure 7.8.1-1 Transfer to Bank (Sync) Sequence Diagram (Ref: KAS-API-SEQ-SNAP-004) .................................... 55
Figure 7.8.1-2 Transfer to Bank (Async) Sequence Diagram (Ref: KAS-API-SEQ-SNAP-004) .................................. 56
Figure 9.5-1 Full Payment Reversal Sequence Diagram (Ref: KAS-API-SEQ-013) ................................................... 61
Figure 9.4-1 Get Token Sequence Diagram ............................................................................................................ 64
Figure 8.1.1-1 Decode QR MPM Sequence Diagram (Ref: KAS-API-SEQ-SNAP-006) .............................................. 68
Figure 8.2.1-1 QRIS MPM Payment Sequence Diagram (Ref: KAS-API-SEQ-SNAP-007) ......................................... 70
Figure 8.3.1-1 QRIS Transaction Status Diagram (Ref: KAS-API-SEQ-017) .............................................................. 74
Figure 9.1-1 Upgrade Customer with OCR Sequence Diagram (Ref: KAS-API-SEQ-003) ........................................ 78
Figure 9.2-1 Upgrade Customer Account with Passport and SIM Sequence Diagram (Ref: KAS-API-SEQ-002) ..... 84

©2023 | Digi Asia Bios Page 6 of 91


API DOCUMENTATION

1 Introduction

1.2 Goals
This document is intended to be used by institutions who wish to integrate with KasPro. It will explain
features of the system, what the system will do, the constraints under which it must operate and how the
system will react to user behavior.

©2023 | Digi Asia Bios Page 7 of 91


API DOCUMENTATION

2 Standard Security

2.1 Encryption Method

The encryption method used is the encryption method that has been standardized by SNAP BI,
for the encryption methods used are as follows:

- SHA256withRSA with private key and public key.


- HMAC_512
- Base64

2.2 Private dan Public Key Delivery Method

In the use of private and public keys, private and public keys will be generated with the
specified delivery method:

- 1st Email: contains archived file (zip with password) that will be send to eligible partner/
appointed by partner in PKS
- 2nd Email: contains password from zip file to eligible partner/ appointed by partner in PKS

2.3 Signature Creation and Validation

In accessing the API, partner is required to request an access token. Access tokens are
provided for B2B and B2B2C transactions.

2.3.1 Header Structure Request


2.3.1.1 Access Token B2B
2.3.1.1.1 General Information
Service Code 73
Name API Get Token B2B
HTTP Method POST
Version 1.0
URL [POST] {{SNAPGW_BASE_URL}}/v1.0/access-token/b2b

©2023 | Digi Asia Bios Page 8 of 91


API DOCUMENTATION

2.3.1.1.2 Request Specification


Area Field Attribute Type Description
Header Content-Type Mandatory String Represent media type of request
e.g application/json
X-TIMESTAMP Mandatory String Client's current local time in yyyy-
MM- ddTHH:mm:ss.SSSTZD format
X-CLIENT- KEY Mandatory String Client Identification
X-SIGNATURE Mandatory String Asymmetric signature
SHA256withRSA
(Private_Key, stringToSign).
stringToSign = client_ID + “|” + X-
TIMESTAMP
Body grantType Mandatory String Client request token
“client_credential”

2.3.1.1.3 Response Specification


Area Field Attribute Type Description
Header X-TIMESTAMP Mandatory String Client’s current l o c a l t i m e
i n yyyy-MM-
ddTHH:mm:ss.SSSTZD format
X-CLIENT- KEY Mandatory String Client Identification
Body responseCode Conditional String Conditional when request is
rejected
responseMessage Conditional String Conditional when request is
rejected
tokenType Mandatory String “Bearer”: includes the access
token string in the request

accessToken Mandatory String A string representing an


authorization issued to the
client that used to access
protected resources
expiresIn Mandatory String Session expiry in seconds: 900
(15 menit)

©2023 | Digi Asia Bios Page 9 of 91


API DOCUMENTATION

2.3.1.1.4 Sample Request


Request Content-Type: application/json
Message X-TIMESTAMP: 2022-07-29T15: 36: 54+07: 00
X-CLIENT-KEY: f2fe42d8098cc988bd2c02f85fcaa1bb
X-SIGNATURE:
ujQm/rbCW10hhZop2pgPYqc8gftT5xMrF1/WyR7dQ3p6fPQwH5elriVG9/c8D+JZ8cPAjC50Fw
EhBIcaDa4224PDOcWwJLgNHRMxSTXVMHJpRfc34xOC35YKX+JpzRMZt8XL+IVppLDoCOn
59f+BX6qp6jJF3U9RXJB1+Tl7sn47/Q51Y575o4RN0UvDi3DTYkV/ko0d5RxpyIVQeNXPSafVv
3eWd3r
Ntk6ao9xF7g8ee38pLutRYYRJ/fDQ9D79zSZN75/rgaaZbyQfpbIczM0He+L4aFrMwtzRQZO3J
soJaqu
e8fDkLU9J70PLWhTtVwEQ2+yXP69z48894lytYS6UkQ09ieKeH4rebDA1XD5uIHXsVzc+ozMDU
rn7rrp
mktkKDKQKc0yXa52+QxL+1RciMuEsWu3GvHY1ImE5QkfMl8I6rHglF8+3uwzTieU/mMFIT+x6B
qbihfc
Pxc/c+rf85+Yv8Dlx11RFOIRtUgZK3jAWwODJdccNkW0E4fIrZfwcBsV1QmwvzAi5F0U5L7N40
ulkxgT
c77BMkXjjcJdgjeAXOWQ4RsEWrg1I6mLDQHqjsGj5qeTYBKZb+NSZuYaqMWD5YO6quOmAQegyp
W1sMlS
W1FLkc4SgN4EWc+hpdBvd0nwC9QbPLDPdhvIrtIJaSzUqxVSOIYyIY=
7iD6TN
{
"grantType": "client_credentials"
}

2.3.1.1.5 Sample Response


Response X-TIMESTAMP: 2022-07-29T15: 36: 54+07: 00
Message X-CLIENT-KEY: f2fe42d8098cc988bd2c02f85fcaa1bb
{
"tokenType": "Bearer",
"accessToken":
_UgeVJypxKgQT1S_7tyCUGLHTL_o3FjagS2qTrocdKur1Q0Okd4xv9-
"AAIgZjJmZTQyZDgwOThjYzk4OGJkMmMwMmY4NWZjYWExYmI7nahHJdjH1SUH
nCBrsCC9xkukzZQPu24SWo9XAIRwDLNLbI661yCNE267xTaXprW-PI33uHto",
"expiresIn": 900
}

©2023 | Digi Asia Bios Page 10 of 91


API DOCUMENTATION

2.3.1.2 Access Token B2B2C


2.3.1.2.1 General Information
Service Code 74
Name API Get Token B2B2C
HTTP Method POST
Version 1.0
URL [POST] {{SNAPGW_BASE_URL}}/v1.0/access-token/b2b2c

2.3.1.2.2 Request Specification


Area Field Attribute Type Description
Header Content-Type Mandatory String Represent media type of request
e.g application/json

X-TIMESTAMP Mandatory String Client's current local time in yyyy-


MM- ddTHH:mm:ss.SSSTZD format
X-CLIENT- KEY Mandatory String Client Identification
X-SIGNATURE Mandatory String Asymmetric signature
SHA256withRSA
(Private_Key, stringToSign).
stringToSign = client_ID + “|” + X-
TIMESTAMP

Body grantType Mandatory String Apply token request key type, can be
AUTHORIZATION_CODE or
REFRESH_TOKEN.

authCode Conditional String Mandatory if grant_type =


AUTHORIZATION_CODE
refreshToken Conditional String Mandatory if grant_type =
REFRESH_TOKEN

©2023 | Digi Asia Bios Page 11 of 91


API DOCUMENTATION

2.3.1.2.3 Response Specification


Area Field Attribute Type Description
Header X-TIMESTAMP Mandatory String Client’s current l o c a l t i m e in
yyyy-MM-
ddTHH:mm:ss.SSSTZD format
X-CLIENT- KEY Mandatory String Client Identification
Body responseCode Conditional String Conditional when request is
rejected
responseMessage Conditional String Conditional when request is
rejected
tokenType Mandatory String “Bearer”: includes the access
token string in the request

accessToken Mandatory String A string representing an


authorization issued to the
client that used to access
protected resources

2.3.1.2.4 Sample Request


Request Content-Type: application/json
Message
X-TIMESTAMP: 2022-07-29T15: 56: 23+07: 00
X-CLIENT-KEY:f2fe42d8098cc988bd2c02f85fcaa1bb
X-SIGNATURE:
ric0y3RrPVz7h4RIQ95m7yw0TNQCaMw4c24C3rux4pgBDD9gs69k7zQdmobCT9gXjehGz
Z+YqFKC2gQjybafPFS+GteTmjSnJN6Wd58veHakQgvesqo9jj1exSGlnhsEZTEnBD9qObfed1AJg5INt
wfrsrOmgvdO/EatdbJ0AI3Tlnw6+Y8BXY5+cBxdv/IeOoRvEBqUj4I7EY/T3NAcQvkQnUNjHUYVRE8xr
SHAPIJk+QelpYGn79hm6IDVZ9L3RrABsrY2ak86nKgJ3RtELKyeKVItMzrHdp9Akrh1eL3J9+UcEGNgR
9E86oNjMt/W/HgJuFVwPhbWgoJOhUOCddDmJ33iouHsJO1Dql0UBtNGh9TqgDPFNQVkqG5j9/K+NFLY6
2hzEgajy/RkISqbnh8Wauc7kS/wZd9W4frPHgxRnTulqn5t81vmKhxUR7yWGj9AB6UXQMZ0SF+YbeifH
IP/nkzOBT7jVQ49r6Z232tCRNrE0ru16YdxK2FdjLj0/bDZ4yiq92JGXyUXrn0RdcuecOPPkJRRxkaAW
cERAUR/HynKRQ7+2kkzY9ZHMUNZVZaaNSfvlT1lfRLd2CtPkzFBLC40TCHiGd/lNmGtNL7dt4GL7GeLu
c/QMAbyeS71z6j4WW1P+AHE8LpHnPNb5dt5EbLeBTAX3YDUJBV6S/g=
{
"grantType":"authorization_code",
"authCode":"ce26e840019711eda6070a1988f00000"
}

©2023 | Digi Asia Bios Page 12 of 91


API DOCUMENTATION

2.3.1.2.5 Sample Response


Response X-TIMESTAMP: 2022-07-29T15: 56: 23+07: 00
Message X-CLIENT-KEY: f2fe42d8098cc988bd2c02f85fcaa1bb
{
"tokenType": "Bearer",
"accessToken":"AAIgZjJmZTQyZDgwOThjYzk4OGJkMmMwMmY4NWZjYWExYmL79Umxb7uy3_uc
MnS3WI9IEy2oJF9pEXpk3QP3bRwzxq7EUnF0-
fXFjyV8b6v2FmMquKMefK9SBUpRkAkRryhoMbvgoVPhex1VuR4MBY66RmgOlrKm58j2I_QaIcW6Ufs",
"accessTokenExpiryTime":“2023-05-12T21:36:01.340Z”,
" refreshToken": "AAKOPoWM6lYtbQ0az7nhuDwlgpBDd1XZ9zAn2BcAIRPoKXOnjIk4GVUNAF
TFXfEwIaS1m619uN2mzsClUEi0Hg6ma94eNxsFFw9g73ZUlZBPwy0lLWno9q89FnWoC6O-
Zk_mUKmYTNcG5IgvJV620--r",
"refreshTokenExpiryTime":"2023-05-12T21:36:01.340Z"
}

©2023 | Digi Asia Bios Page 13 of 91


API DOCUMENTATION

2.3.2 Transaction Request B2B


2.3.2.1 Structure Field Format Header
Area Field Attribute Type Description
Header Content-Type Mandatory String Represent media type of request
e.g application/json
Authorization Mandatory String Represent access token and followed
by Bearer
X-TIMESTAMP Mandatory String Client’s current local time in yyyy-
MM- ddTHH:mm:ss.SSSTZD format
X-SIGNATURE Mandatory String Represent signature within value as
below:

Base64(HMAC_SHA512
(clientSecret, stringToSign))

dengan formula stringToSign =


HTTPMethod +”:“+ EndpointUrl
+":"+ AccessToken+":“+
Lowercase (HexEncode(SHA-
256(minify(RequestBody))))+ ":“ +
TimeStamp

Notes:
1. endpointUrl : disi dengan
full url tujuan transaksi.
2. Untuk method Get dimana
body kosong maka wajib di
isi dengan string kosong.

X-PARTNER-ID Mandatory String(36) Represent Partner Identification


X-EXTERNAL-ID Mandatory String(36) Represent Reference No from
Partner which should be unique in a
day.
CHANNEL-ID Mandatory String(5) Represent Channel Id being used
from user.

©2023 | Digi Asia Bios Page 14 of 91


API DOCUMENTATION

2.3.2.2 Sample B2B Header


Sample Content-Type: application/json
Message Authorization: Bearer
AAIgZjJmZTQyZDgwOThjYzk4OGJkMmMwMmY4NWZjYWExYmKh3gmAvTKgWN
bHVEwfx56BJ8ntqfHVdr9exKUd87A_zlhuwO1y3ZuqphUvgMX64JN2i-
ASkl2ot7j0Dj_ag9i4cWt046UrQaWtRy09jCXZsAhNVZ357MmLD3TMrwvJ55o
X-TIMESTAMP:
20220729T17:45:32+07: 00
X-SIGNATURE:
T2BjetXWnJThoUVIJcJti7xarjQbWh21+gK
TJ3sskKuJ5H8333mTmlUjVWpBD5gSM5Oz4
DyFEzI3Lu2R7kCGLw==
X-PARTNER-ID:
f2fe42d8098cc988bd2c02f85fcaa1b
X-EXTERNAL-ID: KOU0MLKSFFHP
CHANNEL-ID: 95211

©2023 | Digi Asia Bios Page 15 of 91


API DOCUMENTATION

2.3.3 Transaction Request B2B2C


2.3.3.1 Structure Field Format Header
Area Field Attribute Type Description
Header Content-Type Mandatory String Represent media type of request
e.g application/json
Authorization Mandatory String Represent access token B2B and
followed by Bearer
Authorization Mandatory String Represent access token B2B2C and
- Customer followed by Bearer
X-TIMESTAMP Mandatory String Client's current local time in
yyyy- MM- ddTHH:mm:ss.SSSTZD
format
X-SIGNATURE Mandatory String Represent signature within value as
below :

Base64(HMAC_SHA512
(clientSecret, stringToSign))

dengan formula stringToSign =


HTTPMethod + ”:“ + EndpointUrl + ":"
+ AccessToken + “:“ +
Lowercase(HexEncode(SHA-
256(minify(RequestBody))))+ “:“ +
TimeStamp

Notes :
1. endpointUrl : disi dengan
full url tujuan transaksi.
2. Untuk method Get dimana
body kosong maka wajib di
isi dengan string kosong.
X-PARTNER-ID Mandatory String(36) Represent Partner Identification
X-EXTERNAL- ID Mandatory String(36) Represent Reference No from
Partner which should be unique in
a day.
CHANNEL-ID Optional String(5) Represent Channel Id
being used from user.

©2023 | Digi Asia Bios Page 16 of 91


API DOCUMENTATION

2.3.3.2 Sample B2B2C Header


Sample Content-Type: application/json
Message Authorization: Bearer AAIgZjJmZTQyZDgwOThjYzk4OGJkMmMwMmY4NWZjYWExYmKh3gmAvTKgWN
bHVEwfx56BJ8ntqfHVdr9exKUd87A_zlhuwO1y3ZuqphUvgMX64JN2i-
ASkl2ot7j0Dj_ag9i4cWt046UrQaWtRy09jCXZsAhNVZ357MmLD3TMrwvJ55o
Authorization-Customer: Bearer
AAIgZjJmZTQyZDgwOThjYzk4OGJkMmMwMmY4NWZjYWExYmIngt5IdHOMSgUWjX-
-gRiRHyNcUYwxmprSQhseaMt_np_gw2vt1_KamSKUcM3luGuhL1J95UG8_52Hve6MIJUXW5H_Ya88r-
Op1TfmR3D3Wx3sqcGYVx9ll1WFjBguzb8
X-TIMESTAMP: 2022-07-29T17: 49: 38+07: 00
X-SIGNATURE:
e/w59tsE5zz7hYCyCU6i3diuIPbwmqezUP3w5bGFsOR1
JyePtkgVAYRp+exYZmrOk/tJu
bDfR2d8BDN86Yv2PA==
X-PARTNER-ID: f2fe42d8098cc988bd2c02f85fcaa1bb
X-EXTERNAL-ID: SGJLVQQEBLAN
CHANNEL-ID: 95211

©2023 | Digi Asia Bios Page 17 of 91


API DOCUMENTATION

3 List Response Code


Description Type Length Description
responseCode String 7 response code = HTTP status code + service code + case code
responseMessage String 150

HTTP Service Case


Category Response Message Description
Code Code Code
Success 200 any 00 Successful Successful
Success 202 any 00 Request in Progress Transaction still on process
System 400 any 00 Bad Request General request failed error, including message parsing failed.
Message 400 any 01 Invalid Field Format {field name} Invalid format
Message 400 any 02 Invalid Mandatory Field {field Missing or invalid format on mandatory field
name}
Message 400 any 03 Customer Already Registered Customer already registered
System 401 any 00 Unauthorized. [reason] General unauthorized error (No Interface Def, API is Invalid, Oauth
Failed, Verify Client Secret Fail, Client Forbidden Access API, Unknown
Client, Key not Found)
System 401 any 01 Invalid Token (B2B) Token found in request is invalid (Access Token Not Exist, Access
Token Expiry)
System 401 any 02 Invalid Customer Token Token found in request is invalid (Access Token Not Exist, Access
Token Expiry)
System 401 any 03 Token Not Found (B2B) Token not found in the system. This occurs on any API that requires
token as input parameter
System 401 any 04 Customer Token Not Found Token not found in the system. This occurs on any API that requires
token as input parameter
Business 403 any 00 Transaction Expired Transaction expired
System 403 any 01 Feature Not Allowed [Reason] This merchant is not allowed to call Direct Debit APIs
Business 403 any 02 Exceeds Transaction Amount Limit Exceeds Transaction Amount Limit
Business 403 any 03 Suspected Fraud Suspected Fraud
Business 403 any 04 Activity Count Limit Exceeded Too many request, Exceeds Transaction Frequency Limit
Business 403 any 05 Do Not Honor Account or User status is abnormal
System 403 any 06 Feature Not Allowed At This Time. Cut off In Progress
[reason]
Business 403 any 07 Card Blocked The payment card is blocked
Business 403 any 08 Card Expired The payment card is expired
Business 403 any 09 Dormant Account The account is dormant
Business 403 any 10 Need to Set Token Limit Need to set token limit
System 403 any 11 OTP Blocked OTP has been blocked
System 403 any 12 OTP Lifetime Expired OTP has been expired
System 403 any 13 OTP Sent to Cardholer initiates request OTP to the issuer
Business 403 any 14 Insufficient Funds Insufficient Funds
Business 403 any 15 Transaction Not Permitted. [reason] Transaction Not Permitted
Business 403 any 16 Suspend Transaction Suspend Transaction
Business 403 any 17 Token Limit Exceeded Purchase amount exceeds the token limit set prior
Business 403 any 18 Inactive Card/Account/Customer Indicates inactive account
Business 403 any 19 Merchant Blacklisted Merchant is suspended from calling any APIs
Business 403 any 20 Merchant Limit Exceed Merchant aggregated purchase amount on that day exceeds the
agreed limit
Business 403 any 21 Set Limit Not Allowed Set limit not allowed on particular token
Business 403 any 22 Token Limit Invalid The token limit desired by the merchant is not within the agreed range
between the merchant and the Issuer

©2023 | Digi Asia Bios Page 18 of 91


API DOCUMENTATION

HTTP Service Case


Category Response Message Description
Code Code Code
Business 403 any 23 Account Limit Exceed Account aggregated purchase amount on that day exceeds the agreed
limit
Business 403 any 24 This transaction requires premium
account This transaction requires premium account
Business 404 any 00 Invalid Transaction Status Invalid transaction status
Business 404 any 01 Transaction Not Found Transaction not found
System 404 any 02 Invalid Routing Invalid Routing
System 404 any 03 Bank Not Supported By Switch Bank not supported by switch
Business 404 any 04 Transaction Cancelled Transaction is cancelled by customer
Business 404 any 05 Merchant Is Not Registered For Merchant is not registered for Card Registration services
Card Registration Services
System 404 any 06 Need To Request OTP Need to request OTP
System 404 any 07 Journey Not Found The journeyID cannot be found in the system
Business 404 any 08 Invalid Merchant Merchant does not exist or status abnormal
Business 404 any 09 No Issuer No issuer
System 404 any 10 Invalid API Transition Invalid API transition within a journey
Business 404 any 11 Invalid Card/Account/Customer Card information may be invalid, or the card account may be
[info]/Virtual Account blacklisted, or Virtual Account number maybe invalid.
Business 404 any 12 Invalid Bill/Virtual Account [Reason] The bill is blocked/ suspended/not found.
Virtual account is suspend/not found.
Business 404 any 13 Invalid Amount The amount doesn't match with what supposed to
Business 404 any 14 Paid Bill The bill has been paid
System 404 any 15 Invalid OTP OTP is incorrect
Business 404 any 16 Partner Not Found Partner number can't be found
Business 404 any 17 Invalid Terminal Terminal does not exist in the system
Business 404 any 18 Inconsistent Request Inconsistent request parameter found for the same partner reference
number/transaction id
It can be considered as failed in transfer debit, but it should be
considered as success in transfer credit.
Considered as success:
- Transfer credit = (i) Intrabank transfer; (ii) Interbank transfer; (iii)
RTGS transfer; (iv) SKNBI transfer;
- Virtual account = (i) Payment VA; (ii) Payment to VA;
- Transfer debit = (i) Refund payment; (ii) Void;
Considered as failed:
- Transfer credit = (i) Transfer to OTC;
- Transfer debit = (i) Direct debit payment; (ii) QR CPM payment; (iii)
Auth payment; (iv) Capture;
Business 404 any 19 Invalid Bill/Virtual Account The bill is expired.
Virtual account is expired.
Business 404 any 20 Invalid PAN Number Invalid PAN Number
Business 404 any 21 QR Expires QR Expires
Business 404 any 22 Restricted Card Restricted Card
Business 404 any 23 Duplicate Transmission Failed Duplicate Transmission Failed
System 405 any 00 Requested Function Is Not Requested function is not supported
Supported
Business 405 any 01 Requested Opearation Is Not Requested operation to cancel/refund transaction Is not allowed at
Allowed this time.
System 409 any 01 Conflict Cannot use same X-EXTERNAL-ID in same day
System 409 any 01 Duplicate partnerReferenceNo Transaction has previously been processed indicates the same
partnerReferenceNo already success
System 429 any 00 Too Many Requests Maximum transaction limit exceeded

©2023 | Digi Asia Bios Page 19 of 91


API DOCUMENTATION

HTTP Service Case


Category Response Message Description
Code Code Code
System 500 any 00 General Error General Error
System 500 Any 01 Internal Server Error Unknown Internal Server Failure, Please retry the process again
System 500 Any 02 External Server Error Backend system failure, etc
System 504 any 00 Timeout timeout from the issuer
System 504 any 01 Link Down Link Down

©2023 | Digi Asia Bios Page 20 of 91


API DOCUMENTATION

4 Customer Registration

4.1 Customer Registration


4.1.1 Sequence Diagram

Figure 4.1.1-1 Customer Registration for New Partner Sequence Diagram (Ref: KAS-API-SEQ-SNAP-001)

©2023 | Digi Asia Bios Page 21 of 91


API DOCUMENTATION

4.1.2 Reference API (Customer Get Profile)


Endpoint [GET] {{SNAPGW_BASE_URL}}/snap/v1.0/customer-account-
inquiry/?mobileNumber=
URL Segment
mobileNumber The mobile number of the customer Numeric
Request
Content-Type: application/json
Authorization: Bearer [token]
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Response (Success) Response (Fail)


Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"code": 0, "code": 110005
"message": "Success", "message": "Account not found"
"data": { }
"firstName": "Galih",
"middleName": "Prihatmadi",
"lastName": "Satya",
"fullName": "Galih Satya",
"accountType": "subscriber",
"accountStatus": "ACTIVE",
"customerType": "",
"email": "[email protected]",
"mobileNumber": "081218888888",
"kycStatus": "ACTIVE"
}
}

©2023 | Digi Asia Bios Page 22 of 91


API DOCUMENTATION

Request
Parameter Data Type Mandatory Length Description
mobileNumber Numeric M 16 User’s phone number.

Response
Parameter Data Type Mandatory Length Description
Code Int M 6 Response code
Message String M 150 Response description
Data Object M Response data
firstName String M 50 First name of the customer
middleName String O 50 Middle name of the customer
lastName String M 50 Last name of the customer
fullName String M 150 Full name of the customer
accountType String M 20 Type of the customer:
subscriber/premium/corporate
/Merchant
accountStatus String M 10 Status of the customer:
ACTIVE/INACTIVE
customerType String M 20 NULL
Email String O 254 Email of the customer
mobileNumber Numeric M 16 User’s phone number.
kycStatus String M 10 KYC status of the customer:
NULL/PENDING/ACTIVE

List of Errors / Response Code


No Response Code Response Message Status
1 0 Success Success
2 110005 Customer not Found Failed
3 110012 Customer Account Deactivated Failed
4 110013 Customer Account is not Active Failed
5 888888 Timeout Failed
6 999999 General error Failed
7 4090001 Conflict Failed

4.1.3 Reference API (Customer Registration)


Endpoint [POST] {{SNAPGW_BASE_URL}}/v1.0/registration-account-creation
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]

©2023 | Digi Asia Bios Page 23 of 91


API DOCUMENTATION

X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo": "2020102900000000000001",
"countryCode": "ID",
"customerId": "00-abcdefghijklmnopqrstuvwxyz0123456789-11",
"email": "[email protected]",
"phoneNo": "0899345678864332",
"additionalInfo": {
"firstName": "Galih",
"lastName": "Satya",
"twoFaToken": "01023"
}
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2000600", "responseCode": "4000600",
"responseMessage": "Request has been "responseMessage": "Bad Request"
processed successfully", }
"referenceNo":
"2020102977770000000009"
"partnerReferenceNo":
"2020102900000000000001"
"authCode":
"g4JeIz43jfjVvAvNxswe56g4JeIz43jfjV",
}

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
countryCode String M 2 Requestor’s country code
customerId String M 45 account ID of the customer
email String M 254 Email of the customer
phoneNo String M 16 User’s phone number
additionalInfo Object M Additional information
firstName String M 50 First name of the customer

©2023 | Digi Asia Bios Page 24 of 91


API DOCUMENTATION

lastName String M 50 Last name of the customer


twoFaToken String M 5 Two Factor Authentication
token (OTP)

Response
Parameter Data Type Mandatory Length
responseCode String M 7 Response code
responseMessage String M 150 Response description
referenceNo String M 64 Transaction identifier on
service provider system.
Must be filled upon
successful transaction
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
authCode String M 64 the auth code used to get
accessToken and
agreementToken
additionalInfo Object M Additional information

List of Errors / Response Code


No Response Code Response Message Status
1 2000600 Request has been processed successfully Success
2 4000600 Bad Request Failed
3 4000601 Invalid Field Format {field name} Failed
4 4000602 Invalid Mandatory Field {field name} Failed
5 4000603 Customer Already Registered Failed
6 4010600 Unauthorized. [reason] Failed
7 4010601 Invalid Token (B2B) Failed
8 4010603 Token Not Found (B2B) Failed
9 4030612 OTP Lifetime Expired Failed
10 4040615 Invalid OTP Failed
11 4090601 Conflict Failed
12 5000600 General Error Failed
13 5000601 Internal Server Error Failed
14 5040602 External Server Error Failed
15 5040600 Timeout Failed

©2023 | Digi Asia Bios Page 25 of 91


API DOCUMENTATION

4.2 Customer Re-Registration


4.2.1 Reference API (Customer Re-Registration)
Endpoint [POST] {{SNAPGW_BASE_URL}}/v1.0/link-account-creation
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

{
"phoneNo": "081398458855"
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2000000", "responseCode": "4000000",
"responseMessage": "Request has been "responseMessage": "Bad Request"
processed successfully", }
"referenceNo": "2020102977770000000009"
"partnerReferenceNo":
"2020102900000000000001"
"authCode":
"g4JeIz43jfjVvAvNxswe56g4JeIz43jfjV",
}

Request
Parameter Data Type Mandatory Length Description
phoneNo String M 16 User’s phone number

©2023 | Digi Asia Bios Page 26 of 91


API DOCUMENTATION

Response
Parameter Data Type Mandatory Length
responseCode String M 7 Response code
responseMessage String M 150 Response description
referenceNo String M 64 Transaction identifier on
service provider system.
Must be filled upon
successful transaction
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
authCode String M 64 the auth code used to get
accessToken and
agreementToken
additionalInfo Object M Additional information

List of Errors / Response Code


No Response Code Response Message Status
1 2000000 Request has been processed successfully Success
2 4000000 Bad Request Failed
3 4000001 Invalid Field Format {field name} Failed
4 4000002 Invalid Mandatory Field {field name} Failed
5 4000003 Customer Already Registered Failed
6 4010000 Unauthorized. [reason] Failed
7 4010001 Invalid Token (B2B) Failed
8 4010003 Token Not Found (B2B) Failed
9 4030012 OTP Lifetime Expired Failed
10 4040015 Invalid OTP Failed
11 4090001 Conflict Failed
12 5000000 General Error Failed
13 5000001 Internal Server Error Failed
14 5040002 External Server Error Failed
15 5040000 Timeout Failed

©2023 | Digi Asia Bios Page 27 of 91


API DOCUMENTATION

5 Customer Balance Inquiry

5.1 Customer Balance Inquiry


5.1.1 Sequence Diagram

Figure 5.1.1-1 Customer Balance Inquiry Sequence Diagram (Ref: KAS-API-SEQ-SNAP-002)

5.1.2 Reference API


Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/balance-inquiry
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo": "2020102900000000000001",
"accountNo": "7382382957893840",
"balanceTypes": [
"200",
]
}

©2023 | Digi Asia Bios Page 28 of 91


API DOCUMENTATION

Response (Success) Response (Fail)


Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2001100", "responseCode": "4041111",
"responseMessage": "Request has been "responseMessage": "Account not found"
processed successfully", }
"referenceNo": "2020102977770000000009",
"partnerReferenceNo":
"2020102900000000000001",
"accountNo": "115471119",
"name": "Galih Satya",
"accountInfo": [
{
"availableBalance": {
"value": "20000.00",
"currency": "IDR",
}
}
]
}

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
accountNo String M 16 Account number.
balanceTypes Array of C 3 Balance types, use "200" for
String default value

©2023 | Digi Asia Bios Page 29 of 91


API DOCUMENTATION

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
referenceNo String M 64 Transaction identifier on
service provider system. Must
be filled upon successful
transaction
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
accountNo String M 32 Registered account number
Name String M 140 Customer account name
accountInfo Array M Account information
availableBalance Object M Balance information
Value String M 17 Value of the balance
Currency String M 3 Currency

List of Errors / Response Code


No Response Code Response Message Status
1 2001100 Request has been processed successfully Success
2 4001100 Bad Request Failed
3 4001101 Invalid Field Format {field name} Failed
4 4001102 Invalid Mandatory Field {field name} Failed
5 4011100 Unauthorized. [reason] Failed
6 4011101 Invalid Token (B2B) Failed
7 4011103 Token Not Found (B2B) Failed
8 4041111 Invalid Card/Account/Customer [info]/Virtual Account Failed
9 4091101 Conflict Failed
10 5001100 General Error Failed
11 5001101 Internal Server Error Failed
12 5041102 External Server Error Failed
13 5041100 Timeout Failed

©2023 | Digi Asia Bios Page 30 of 91


API DOCUMENTATION

6 2 Factor Authentication Token

6.1 2 Factor Authentication Token


6.1.1 Sequence Diagram

Figure 6.1.1-1 Two Factor Authentication Token Sequence Diagram (Ref: KAS-API-SEQ-SNAP-003)

6.1.2 Reference API


Endpoint [GET] {{SNAPGW_BASE_URL}}/snap/v1.0/pil-partner-get-
otp/?mobileNumber=
URL Segment
mobileNumber The mobile number of the customer Numeric
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Response (Success) Response (Fail)


Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseMessage": "Success", "responseMessage": "Account not found",
"responseCode": 0, "responseCode": 110005
"data": { }
"expiry": 180
}
}

©2023 | Digi Asia Bios Page 31 of 91


API DOCUMENTATION

Request
Parameter Data Type Mandatory Length Description
mobileNumber Numeric M 16 User’s phone number.

Response
Parameter Data Type Mandatory Length Description
responseCode String M 6 Response code
responseMessage String M 150 Response description
data Object M 2FA data
expiry Int M 4 2FA expiry

List of Errors / Response Code


No Response Code Response Message Status
1 0 Success Success
2 888888 Timeout Failed
3 999999 General error Failed
4 0 Success Success
5 4090001 Conflict Failed

©2023 | Digi Asia Bios Page 32 of 91


API DOCUMENTATION

7 Transaction

7.1 Merchant Payment Inquiry


7.1.1 Reference API
Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/account-inquiry-internal
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo": "2020102900000000000001",
"beneficiaryAccountNo": "08121839000000",
"additionalInfo": {
"customerType": "Merchant"
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2001500", "responseCode": "4041508",
"responseMessage": "Request has been "responseMessage": "Invalid Merchant",
processed successfully", }
"beneficiaryAccountName": "Tony Fajar",
"beneficiaryAccountNo": "08121839000000",
"beneficiaryAccountStatus": "ACTIVE",
"beneficiaryAccountType": "Merchant",
"currency": "IDR",
"additionalInfo":{
"customerType": "Merchant",
"walletNumber": "2003049382910",
}

©2023 | Digi Asia Bios Page 33 of 91


API DOCUMENTATION

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 64 Transaction identifier on service
consumer system
beneficiaryAccountNo String M 34 Beneficiary Account Number
additionalInfo Object M Additional information
customerType String M 20 Type of customer:
Merchant/Customer

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
beneficiaryAccountName String M 100 Beneficiary Account Name
beneficiaryAccountNo String M 34 Beneficiary Account Number
beneficiaryAccountStatus String M 16 Beneficiary Account Status
beneficiaryAccountType String M 34 Beneficiary Account Type
Currency String M 3 Currency
additionalInfo Object M Additional information
customerType String M 20 Type of customer:
Merchant/Customer
Walletnumber String M 30 Account’s wallet number

List of Errors / Response Code


No Response Code Response Message Status
1 2001500 Request has been processed successfully Success
2 4001500 Bad Request Failed
3 4001501 Invalid Field Format {field name} Failed
4 4001502 Invalid Mandatory Field {field name} Failed
5 4011504 Customer Token Not Found Failed
6 4011500 Unauthorized. [reason] Failed
7 4011501 Invalid Token (B2B) Failed
8 4011503 Token Not Found (B2B) Failed
9 4041508 Invalid Merchant Failed
10 4091501 Conflict Failed
11 5001500 General Error Failed
12 5001501 Internal Server Error Failed
13 5041502 External Server Error Failed
14 5041500 Timeout Failed

©2023 | Digi Asia Bios Page 34 of 91


API DOCUMENTATION

7.2 Confirm Merchant Payment


7.2.1 Sequence Diagram

Figure 7.2.1-1 Payment to Merchant Using Barcode Sequence Diagram (Ref: KAS-API-SEQ-SNAP-004)

©2023 | Digi Asia Bios Page 35 of 91


API DOCUMENTATION

7.2.2 Confirm Merchant Payment


Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/transfer-intrabank
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo": "2020102900000000000001",
"amount": {
"value": "100000",
"currency": "IDR",
},
"beneficiaryAccountNo": "08121839000000",
"remark": "remark test",
"sourceAccountNo": "08398439239",
"transactionDate":"2019-07-03T12:08:56-07:00",
"additionalInfo": {
"customerType": "Merchant",
"walletNo": "2003049382910"
}
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2001700", "responseCode": "4041708",
"responseMessage": "Request has been "responseMessage": "Invalid Merchant",
processed successfully", }
"referenceNo": "2020102977770000000009",
"partnerReferenceNo":
"2020102900000000000001",
"amount": {
"value": "10000",
"currency": "IDR",
},

©2023 | Digi Asia Bios Page 36 of 91


API DOCUMENTATION

"beneficiaryAccountNo": "08121839000000",
"customerReference": "10052019",
"sourceAccountNo": "08398439239",
"transactionDate": "2019-07-03T12:08:56-
07:00"
}

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
Amount Object M Transaction amount
Value String M 17 Net amount of the
transaction.
Currency String M 3 Currency
beneficiaryAccountNo String M 34 Beneficiary Account Number
Remark String O 50 Remark/transaction
description
sourceAccountNo String M 19 Source Account Number
transactionDate String M 25 transaction date: ISO 8601
additionalInfo Group M Additional information
customerType String M 20 Type of customer:
Customer/Merchant
walletNo String M 30 Account’s wallet number

©2023 | Digi Asia Bios Page 37 of 91


API DOCUMENTATION

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
referenceNo String O 64 Transaction identifier on
service provider system. Must
be filled upon successful
transaction
partnerReferenceNo String O 64 Transaction identifier on
service consumer system
Amount Group O Transaction amount
Value String M 17 Net amount of the
transaction.
Currency String M 3 Currency
beneficiaryAccountNo String M 34 Beneficiary Account
customerReference String O 30 Reference Number / No
Referral
sourceAccountNo String O 19 Source Account
transactionDate String M 25 transaction date : ISO 8601

List of Errors / Response Code


No Response Code Response Message Status
1 2001700 Request has been processed successfully Success
2 4001700 Bad Request Failed
3 4001701 Invalid Field Format {field name} Failed
4 4001702 Invalid Mandatory Field {field name} Failed
5 4011700 Unauthorized. [reason] Failed
6 4011701 Invalid Token (B2B) Failed
7 4011703 Token Not Found (B2B) Failed
8 4011704 Customer Token Not Found Failed
9 4031714 Insufficient Funds Failed
10 4091701 Conflict Failed
11 4091701 Duplicate partnerReferenceNo Failed
12 5001700 General Error Failed
13 5001701 Internal Server Error Failed
14 5041702 External Server Error Failed
15 5041700 Timeout Failed

©2023 | Digi Asia Bios Page 38 of 91


API DOCUMENTATION

7.3 Biller Inquiry


7.3.1 Reference API
Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/biller-inquiry/
Request
Headers
Content-type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"requestId": "MTAPI-02032022001002023",
"productCode": "PHONE",
"account": "422221",
"Params": [{
"Name": "kodeArea",
"Value": "021"
}]
}

Response (Success) Response (Fail)


Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseId": "218103313", "responseId": "218103313",
"code": 0, "code": 550002,
"data": { "message": "There is no bill found to be paid",
"productCode": "PHONE", }
"description": "Success",
"nominal": "56485",
"price": "57485",
"serviceFee": "2500",
"params": [{
[Data varies by product]
}]
}
}

©2023 | Digi Asia Bios Page 39 of 91


API DOCUMENTATION

Request
Parameter Data Type Mandatory Length Description
requestId String M 64 Transaction identifier on service
consumer system
productCode String M 20 Product Code
account String M 30 Account (Customer’s number)
Params Array O Transaction parameters
Name String O 50 Name of parameters
Value String O 50 Value of parameters

Response
Parameter Data Type Mandatory Length Description
responseId String M 64 Transaction identifier on service
provider system. Must be filled
upon successful transaction
code Int M 6 Response code
message String M 150 Response description
data Object M Transaction data
params Array C Transaction parameters
amount String M 17 Transaction amount
price String M 17 Transaction sell price
serviceFee String M 17 Transaction fee
reffId String M 20 Transaction reference ID

List of Errors / Response Code


No Response Code Response Message Status
1 0 Success Success
2 210009 There is no bill to be paid Failed
3 550002 Request error Failed
4 550001 Format error Failed
5 550003 Invalid request Failed
6 550004 Transaction ID not found Failed
7 880003 Backend error Failed
8 550010 Transaction ID error Failed
9 550009 Cannot access product code Failed
10 888888 Timeout Failed
11 999999 General error Failed
12 4090001 Conflict Failed

©2023 | Digi Asia Bios Page 40 of 91


API DOCUMENTATION

7.4 Biller Payment


7.4.1 Reference API
Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/biller-payment/
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"requestId": "218103313",
"mobileNumber": "4222211",
"productCode": "PHONE",
"amount": "11000",
"sourceMobileNumber": "081218390200",
"Reffid": "18203823",
"Params": [{
"Name": "kodeArea",
"Value": "021"
}]
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseId": "15202931092", "responseId": "218103313",
"code": 0, "code": 550002,
"message": "Success", "message": "There is no bill found to be paid",
"data": { }
"amount": "10000",
"price": "11500",
"serviceFee": "500",
"reffId": "12309123180",
"Params":
[Data varies by product]
}
}

©2023 | Digi Asia Bios Page 41 of 91


API DOCUMENTATION

Request
Parameter Data Type Mandatory Length Description
requestId String M 64 Transaction identifier on
service consumer system
mobileNumber String M 16 User’s phone number.
productCode String M 5 Product Code
amount String M 17 Transaction amount
sourceMobileNumber String M 16 Source Mobile Number
Reffid String M 20 Transaction reference ID
params Array O Transaction parameters
Name String O 50 Name of parameters
Value String O 50 Value of parameters

Response
Parameter Data Type Mandatory Length Description
responseId String M 64 Transaction identifier on service
provider system. Must be filled
upon successful transaction
code Int M 6 Response code
message String M 150 Response description
data Object M Transaction data
mobileNumber String M 16 User’s phone number.
amount String M 17 Transaction amount
price String M 17 Transaction sell price
serviceFee String M 17 Transaction fee
reffId String M 20 Transaction reference ID

List of Errors / Response Code


No Response Code Response Message Status
1 1 In progress Pending
2 0 Success Success
3 550009 Cannot access product code Failed
4 555555 Transaction has been completed Failed
5 440003 Bad request invalid token Failed
6 222222 Insufficient balance Failed
7 888888 Timeout Failed
8 999999 General error Failed
9 4090001 Conflict Failed

©2023 | Digi Asia Bios Page 42 of 91


API DOCUMENTATION

7.5 Transaction Check Status


7.5.1 Sequence Diagram

Figure 7.5.1-1 Transaction Check Status Sequence Diagram (Ref: KAS-API-SEQ-017)

7.5.2 Reference API


Endpoint [GET] {{SNAPGW_BASE_URL}}/snap/v1.0/transaction-status/?requestid=
URL Segment
requestId The request ID of the Transaction Alphanumeric
Request

Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]
Response (Success) Response (Fail)

©2023 | Digi Asia Bios Page 43 of 91


API DOCUMENTATION

Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"code": 0, "responseId": "",
"message": "Success", "code": 550002,
"transaction": { "message": "General Error"
"requestId": "HCI220309PPOB668509127", }
"updateAt": "2022-03-09T19:01:08.619Z",
"type": "Biller Payment",
"product": null,
"laststage": "Payment",
"statuscode": "0",
"status": "Success",
"description": "Transaction success"
}
}

Request
Parameter Data Type Mandatory Length Description
requestId String M 64 Transaction identifier on service
consumer system

Response
Parameter Data Type Mandatory Length Description
code Int M 6 Response code
message String M 150 Response description
transaction Object M Transaction data
requestId String M 16 Transaction identifier on service
consumer system
updateAt String M 17 Transaction latest stage
timestamp
type String M 17 Transaction type
product String M 17 Transaction product
laststage String M 20 Transaction last stage
statuscode String M 20 Transaction status code
status String M 20 Transaction status
description String M 50 Transaction description

©2023 | Digi Asia Bios Page 44 of 91


API DOCUMENTATION

List of Errors / Response Code


No Response Code Response Message Status
1 0 Success Success
2 888888 Timeout Failed
3 999999 General error Failed
4 4090001 Conflict Failed

7.6 P2P Transaction Inquiry


7.6.1 Reference API
Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/account-inquiry-internal
Request
Headers
Content-Type: application/json
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo": "2020102900000000000001",
"beneficiaryAccountNo": "08121839000000",
"additionalInfo": {
"customerType": "Merchant/Customer/Agent",
“walletGroup”: “200”
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2001500", "responseCode": "4041511",
"responseMessage": "Request has been "responseMessage": " Invalid
processed successfully", Card/Account/Customer [info]/Virtual Account",
"beneficiaryAccountName": "Tony Fajar", }
"beneficiaryAccountNo": "08121839000000",
"beneficiaryAccountStatus": "ACTIVE",
"beneficiaryAccountType":
"Merchant/Customer/Agent ",
"currency": "IDR",
"additionalInfo":{

©2023 | Digi Asia Bios Page 45 of 91


API DOCUMENTATION

"customerType":
"Merchant/Customer/Agent ",
"walletNumber": "2003049382910",
“walletGroup”: “200”
}

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 64 Transaction identifier on service
consumer system
beneficiaryAccountNo String M 34 Beneficiary Account Number
additionalInfo Object M Additional information
customerType String M 20 Type of customer:
Merchant/Customer/Agent
walletGroup String O 3 Example: 200/211/212

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
beneficiaryAccountName String M 100 Beneficiary Account Name
beneficiaryAccountNo String M 34 Beneficiary Account Number
beneficiaryAccountStatus String M 16 Beneficiary Account Status
beneficiaryAccountType String M 34 Beneficiary Account Type
Currency String M 3 Currency
additionalInfo Object M Additional information
customerType String M 20 Type of customer:
Merchant/Customer/Agent
walletnumber String M 30 Account’s wallet number
walletGroup String O 3 Example: 200/211/212

List of Errors / Response Code


No Response Code Response Message Status
1 2001500 Request has been processed successfully Success
2 4001500 Bad Request Failed
3 4001501 Invalid Field Format {field name} Failed
4 4001502 Invalid Mandatory Field {field name} Failed
5 4011504 Customer Token Not Found Failed
6 4011500 Unauthorized. [reason] Failed
7 4011501 Invalid Token (B2B) Failed
8 4011503 Token Not Found (B2B) Failed
9 4031514 Insufficient Funds Failed
10 4031518 Inactive Card/Account/Customer Failed

©2023 | Digi Asia Bios Page 46 of 91


API DOCUMENTATION

11 4031524 This transaction requires premium account Failed


12 4041511 Invalid Card/Account/Customer [info]/Virtual Account Failed
13 4091501 Conflict Failed
14 4091501 Duplicate partnerReferenceNo Failed
15 5001500 General Error Failed
16 5001501 Internal Server Error Failed
17 5041502 External Server Error Failed
18 5041500 Timeout Failed

©2023 | Digi Asia Bios Page 47 of 91


API DOCUMENTATION

7.7 Confirm P2P Payment


7.7.1 Sequence Diagram

Figure 7.7.1-1 P2P Sequence Diagram (Ref: KAS-API-SEQ-SNAP-004)

©2023 | Digi Asia Bios Page 48 of 91


API DOCUMENTATION

7.7.2 Reference API


Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/transfer-intrabank
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo": "2020102900000000000001",
"amount": {
"value": "100000",
"currency": "IDR",
},
"beneficiaryAccountNo": "08121839000000",
"remark": "remark test",
"sourceAccountNo": "08398439239",
"transactionDate":"2019-07-03T12:08:56-07:00",
"additionalInfo": {
"customerType": "Merchant/Customer/Agent",
"walletNo": "2003049382910",
"walletGroup": "200"
}
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2001700", "responseCode": "4041711",
"responseMessage": "Request has been "responseMessage": " Invalid
processed successfully", Card/Account/Customer [info]/Virtual Account ",
"referenceNo": "2020102977770000000009", }
"partnerReferenceNo":
"2020102900000000000001",
"amount": {
"value": "10000",
"currency": "IDR",

©2023 | Digi Asia Bios Page 49 of 91


API DOCUMENTATION

},
"beneficiaryAccountNo": "08121839000000",
"customerReference": "10052019",
"sourceAccountNo": "08398439239",
"transactionDate": "2019-07-03T12:08:56-
07:00"
}

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
Amount Object M Transaction amount
Value String M 17 Net amount of the
transaction.
Currency String M 3 Currency
beneficiaryAccountNo String M 34 Beneficiary Account Number
Remark String O 50 Remark/transaction
description
sourceAccountNo String M 19 Source Account Number
transactionDate String M 25 transaction date: ISO 8601
additionalInfo Group M Additional information
customerType String M 20 Type of customer:
Customer/Merchant/Agent
walletNo String M 30 Account’s wallet number
walletGroup String O 3 Example: 200/211/212

©2023 | Digi Asia Bios Page 50 of 91


API DOCUMENTATION

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
referenceNo String O 64 Transaction identifier on
service provider system. Must
be filled upon successful
transaction
partnerReferenceNo String O 64 Transaction identifier on
service consumer system
Amount Group O Transaction amount
Value String M 17 Net amount of the
transaction.
Currency String M 3 Currency
beneficiaryAccountNo String M 34 Beneficiary Account
customerReference String O 30 Reference Number / No
Referral
sourceAccountNo String O 19 Source Account
transactionDate String M 25 transaction date : ISO 8601

List of Errors / Response Code


No Response Code Response Message Status
1 2001700 Request has been processed successfully Success
2 4001700 Bad Request Failed
3 4001701 Invalid Field Format {field name} Failed
4 4001702 Invalid Mandatory Field {field name} Failed
5 4011704 Customer Token Not Found Failed
6 4011700 Unauthorized. [reason] Failed
7 4011701 Invalid Token (B2B) Failed
8 4011703 Token Not Found (B2B) Failed
9 4031702 Exceeds Transaction Amount Limit Failed
10 4031714 Insufficient Funds Failed
11 4031724 This transaction requires premium account Failed
12 4041711 Invalid Card/Account/Customer [info]/Virtual Account Failed
13 4091701 Conflict Failed
14 4091701 Duplicate partnerReferenceNo Failed
15 5001700 General Error Failed
16 5001701 Internal Server Error Failed
17 5041702 External Server Error Failed
18 5041700 Timeout Failed

©2023 | Digi Asia Bios Page 51 of 91


API DOCUMENTATION

7.8 Transfer to Bank


7.8.1 Transfer to Bank-Account Inquiry
Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/emoney/bank-account-inquiry
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo":"2020102900000000000001",
"customerNumber":"081388370001",
"amount":{
"value":"10000.00",
"currency":"IDR"
},
"beneficiaryAccountNumber":"8377388292",
"additionalInfo":{
" beneficiaryBankCode ":"003",
}
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode":"2004200", "responseCode": "4044213",
"responseMessage":"Request has been "responseMessage": " Invalid Amount",
processed successfully", }
"referenceNo":"2020102977770000000009",

"partnerReferenceNo":"2020102900000000000
001",
"beneficiaryAccountNumber":"8377388292",
"beneficiaryAccountName":"John Doe",
"beneficiaryBankCode":"003",
"beneficiaryBankName":"Mandiri",
"amount":{

©2023 | Digi Asia Bios Page 52 of 91


API DOCUMENTATION

"value":"10000.00",
"currency":"IDR"
},
"sessionId":"0UYEB77329002HY",
"additionalInfo":{
" beneficiaryBankCode ":" 003 ",
}
}

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
customerNumber String M 32 Customer Account Number
amount Object M 17
value String M 16 Net amount of the
transaction.

2 If it's IDR then value


includes 2 decimal digits.

e.g. IDR 10.000,- will be


placed with 10000.00
currency String M 3 Currency
(ISO 4217)
beneficiaryAccountNumber String O 32 Destination account
number
additionalInfo Object O 19 Additional information
beneficiaryBankCode String M 8 Bank code

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
referenceNo String C 64 Transaction identifier on
service provider system.
Must be filled upon
successful transaction
partnerReferenceNo String O 64 Transaction identifier on
service consumer system
beneficiaryAccountNumber String M 32 Beneficiary account number
beneficiaryAccountName String M 64 Beneficiary account name
beneficiaryBankCode string O 8 Bank code
beneficiaryBankName String O 25 Bank name

©2023 | Digi Asia Bios Page 53 of 91


API DOCUMENTATION

amount Object M
Value String M 16 Net amount of the
transaction.

2 If it's IDR then value includes


2 decimal digits.

e.g. IDR 10.000,- will be


placed with 10000.00
currency String M 3 Currency
(ISO 4217)
sessionId string O 25 sessionID
additionalInfo Object O Additional information
responseCode String M 7 Response code

List of Errors / Response Code


No Response Code Response Message Status
1 2004200 Request has been processed successfully Success
2 4004200 Bad Request Failed
3 4004201 Invalid Field Format {field name} Failed
4 4004202 Invalid Mandatory Field {field name} Failed
5 4014204 Customer Token Not Found Failed
6 4014200 Unauthorized. [reason] Failed
7 4014201 Invalid Token (B2B) Failed
8 4014203 Token Not Found (B2B) Failed
9 4034209 Dormant Account Failed
10 4034214 Insufficient Funds Failed
11 4034218 Inactive Card/Account/Customer Failed
12 4034224 This transaction requires premium account Failed
13 4044211 Invalid Card/Account/Customer [info]/Virtual Account Failed
14 4094201 Conflict Failed
15 4094201 Duplicate partnerReferenceNo Failed
16 5004200 General Error Failed
17 5004201 Internal Server Error Failed
18 5044202 External Server Error Failed
19 5044200 Timeout Failed

©2023 | Digi Asia Bios Page 54 of 91


API DOCUMENTATION

7.8.2 Transfer to Bank-Payment Transaction


7.8.2.1 Sequence Diagram

Figure 7.8.1-1 Transfer to Bank (Sync) Sequence Diagram (Ref: KAS-API-SEQ-SNAP-004)

©2023 | Digi Asia Bios Page 55 of 91


API DOCUMENTATION

Figure 7.8.1-2 Transfer to Bank (Async) Sequence Diagram (Ref: KAS-API-SEQ-SNAP-004)

©2023 | Digi Asia Bios Page 56 of 91


API DOCUMENTATION

7.8.2.2 Reference API


Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/emoney/transfer-bank
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo":"2020102900000000000001",
"customerNumber":"081388370001",
"beneficiaryAccountNumber":"8377388292",
"beneficiaryBankCode":"003",
"amount":{
"value":"10000.00",
"currency":"IDR"
},
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode":"2004300", "responseCode": "4044313",
"responseMessage":"Request has been "responseMessage": " Invalid Amount ",
processed successfully", }
"referenceNo":"2020102977770000000009",
"partnerReferenceNo":"2020102900000000000
001",
"transactionDate":"2020-12-
21T17:48:41+07:00",
"referenceNumber":"REF993883",
}

©2023 | Digi Asia Bios Page 57 of 91


API DOCUMENTATION

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
customerNumber String M 32 Customer Account Number
beneficiaryAccountNumber string M 32 Destination account
number
beneficiaryBankCode string O 8 Bank code
amount Object M
partnerReferenceNo String M 64 Transaction identifier on
service consumer system
customerNumber String M 32 Customer Account Number
value String M 16 Net amount of the
transaction.

2 If it's IDR then value


includes 2 decimal digits.

e.g. IDR 10.000,- will be


placed with 10000.00
currency String M 3 Currency
(ISO 4217)
additionalInfo Object O Additional information

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
referenceNo String C 64 Transaction identifier on
service provider system.
Must be filled upon
successful transaction
partnerReferenceNo String O 64 Transaction identifier on
service consumer system
transactionDate yyyyMMddhhmmss O 25 Transaction date
referenceNumber String M 64 Reference number
additionalInfo Object O Additional information

List of Errors / Response Code


No Response Code Response Message Status
1 2004300 Request has been processed successfully Success
2 4004300 Bad Request Failed
3 4004301 Invalid Field Format {field name} Failed
4 4004302 Invalid Mandatory Field {field name} Failed

©2023 | Digi Asia Bios Page 58 of 91


API DOCUMENTATION

5 4014300 Unauthorized. [reason] Failed


6 4014301 Invalid Token (B2B) Failed
7 4014303 Token Not Found (B2B) Failed
8 4014304 Customer Token Not Found Failed
9 4034302 Exceeds Transaction Amount Limit Failed
10 4034309 Dormant Account Failed
11 4034314 Insufficient Funds Failed
12 4034315 Transaction Not Permitted. [Reason] Failed
13 4034316 Pending Suspend Transaction Failed
14 4034318 Inactive Card/Account/Customer Failed
15 4034324 This transaction requires premium account Failed
16 4044311 Invalid Card/Account/Customer [info]/Virtual Account Failed
17 4044313 Invalid Amount Failed
18 4094301 Conflict Failed
19 4094301 Duplicate partnerReferenceNo Failed
20 5004300 General Error Failed
21 5004301 Internal Server Error Failed
22 5044302 External Server Error Failed
23 5044300 Timeout Failed

7.8.3 Bank List


Endpoint [GET]{{SNAPGW_BASE_URL}}/snap/v1.0/emoney/bank-list?mobileNumber=
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Response (Success) Response (Fail)


Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"code": 0, "code": 999999,
"message": “Success” "message": “General Error”
"data": [ }
{
"bankCode": “003”,

©2023 | Digi Asia Bios Page 59 of 91


API DOCUMENTATION

"bankName": “Mandiri”,
}
],
}

Request
Parameter Data Type Mandatory Length Description
mobileNumber Numeric M 16 User’s phone number.

Response
Parameter Data Type Mandatory Length Description
bankCode String M 8 Bank code
bankName String M 25 Bank Name
message String C 25 0 = Success
888888 = Timeout
999999= General
Error

List of Errors / Response Code


No Response Code Response Message Status
1 0 Success Success
2 888888 Timeout Failed
3 999999 General error Failed
4 4090001 Conflict Failed

7.8.4 API Callback Transfer Async Parameters


No Parameter M/O Format
1 Code M Int
2 Message M String
3 ResponseId M String
4 Type M String
5 Data {Account, Amount} M String

©2023 | Digi Asia Bios Page 60 of 91


API DOCUMENTATION

Sample Request
Headers
Content-Type:application/json
Body
{
code: 0,
message: 'Success',
responseId: 'XKLEZ20220309143636215',
type: 'bank_transfer',
data: { account: '888809999999918', amount: '33849' }
}

7.8.4.1 Authorization
1. Username
2. Password
3. Method: POST
4. Header

Name Type Description


Content-Type Alphanumeric application/json
Authorization Alphanumeric Basic base64(username:password)

7.9 Reversal Payment


7.9.1 Sequence Diagram

Figure 7.9-1 Full Payment Reversal Sequence Diagram (Ref: KAS-API-SEQ-013)

©2023 | Digi Asia Bios Page 61 of 91


API DOCUMENTATION

Description for the flow above:


1. Customer makes payment in partner apps
2. Partner sends request payment wallet partner to KasPro
3. KasPro sends response with ref id
4. Partner saves ref id
5. Partner sends request full reversal with ref id from capture response payment
6. KasPro sends success response reversal to subscriber wallet
7. Partner sends notification to customer regarding reversal

7.9.2 Reference API


Endpoint [DELETE] {{SNAPGW_BASE_URL}}/snap/v1.0/reversal-payment
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
Authorization-Customer: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"requestId": [string][m],
"mobileNumber": [numeric][m],
"reason": [string][m],
"referenceId" : [string][m]
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json
Body Body
{ {
"responseId": [string], "responseId": [string],
"message": [string], "code": [int],
"code": [int] "message": [string]
} }

©2023 | Digi Asia Bios Page 62 of 91


API DOCUMENTATION

Request
Parameter Data Type Mandatory Length Description
requestId String M 64 Transaction identifier on
service consumer system
mobileNumber String M 16 User’s phone number.
reason String M 150 Reason
referenceId String M 64 Transaction identifier on
service provider system.

Response
Parameter Data Type Mandatory Length Description
responseId String M 64 Transaction identifier on service
provider system. Must be filled
upon successful transaction
code Int M 6 Response code
message String M 150 Response description

List of Errors / Response Code


No Response Code Response Message Status
1 1 In progress Pending
2 0 Success Success
3 555555 Transaction has been completed Failed
4 888888 Timeout Failed
5 999999 General error Failed
6 4090001 Conflict Failed

©2023 | Digi Asia Bios Page 63 of 91


API DOCUMENTATION

7.10 Generate Payment Token


7.10.1 Sequence Diagram

Figure 7.10-1 Get Token Sequence Diagram

Description for the flow above:


1. Customer opens KasPro apps
2. Customer selects Pay by Token
3. KasPro system generates token
4. Customer gets token and expire date of token

7.10.2 Reference API


Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/generate-payment-token
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]
Body
{
"requestId": [string][m],
"mobileNumber": [numeric][m],
"type": [enum]['cashIn','cashOut','payment'][m],
}

©2023 | Digi Asia Bios Page 64 of 91


API DOCUMENTATION

Response (Success) Response (Fail)


Headers Headers
Content-Type:application/json Content-Type:application/json
Body Body
{ {
"responseId": [string], "code": [int],
"code": [int], "message": [string]
"message": [string], }
"data": {
"type:": [enum],
"token": [numeric],
"expiry": [numeric]
}
}

7.10.3 List of Errors / Response Codes


No Response Code Response Message Status
1 0 Success Success
2 110005 Source Account Not Found Failed
3 888888 Timeout Failed
4 999999 General error Failed

7.11 Create Virtual Account Bill Payment


7.11.1 Reference API
Endpoint [POST] {{SNAPGW_BASE_URL}}/snap/v1.0/create-va-bill-payment
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]
Body
{
"request-id": [string][m],
"payment-type": [string][m],
"transaction-details": {
"name": [string][m],
"amount": [money][m],
"bank": [string][m],
"order-id": [string][m]

©2023 | Digi Asia Bios Page 65 of 91


API DOCUMENTATION

}
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json
Body Body
{ {
"code": [int], " response-id ": [string],
"message": [string], "code": [int],
"response-id": [string], "message": [string]
"payment-type": [string], }
"transaction-time": [datetime],
"transaction-status": [string],
"transaction-details": {
"name": [string],
"amount": [money],
"order-id": [string]
},
"va-details": {
"bank": [string],
"expired": [datetime],
"va-number": [numeric]
}
}

7.11.2 List of Errors / Response Codes


No Response Code Response Message Status
1 0 Success Success
2 888888 Timeout Failed
3 999999 General error Failed

©2023 | Digi Asia Bios Page 66 of 91


API DOCUMENTATION

7.12 Delete Virtual Account Bill Payment


7.12.1 Reference API
Endpoint [Delete] https://{{hostname}}/snap/v1.0/delete-va-bill-payment
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]
Body
{
"request-id": [string][m],
"payment-type": [string][m],
"va-details": {
"bank": [string][m],
"va-number": [numeric][m],
}
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json
Body Body
{ {
"code": [int], " response-id ": [string],
"message": [string], "code": [int],
"response-id": [string], "message": [string]
} }

7.12.2 List of Errors / Response Codes


No Response Code Response Message Status
1 0 Success Success
2 888888 Timeout Failed
3 999999 General error Failed

©2023 | Digi Asia Bios Page 67 of 91


API DOCUMENTATION

8 QRIS

8.1 Decode QR MPM


8.1.1 Sequence Diagram

Figure 8.1.1-1 Decode QR MPM Sequence Diagram (Ref: KAS-API-SEQ-SNAP-006)

8.1.2 Reference API


Endpoint [POST] {{SNAPGW_BASE_URL}}/v1.0/qr/qr-mpm-decode
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo": "012238291023",
"qrContent": "00020101...",
"scanTime": "2020-12-23T08:27:11+07:00",

Response (Success) Response (Fail)


Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2004800", "responseCode": "4044808",
"responseMessage": "Invalid Merchant",

©2023 | Digi Asia Bios Page 68 of 91


API DOCUMENTATION

"responseMessage": "Request has been }


processed successfully",
"referenceNo": "2020102977770000000009",
"merchantName": "Baso Malang",
"merchantCategory": "Food & Beverage",
"merchantLocation": "Jakarta",
"transactionAmount": {
"value": "10000",
"currency": "IDR",
},
"feeAmount": {
"value": "1000",
"currency": "IDR",
}
}

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 12 Transaction identifier on
service consumer system
qrContent String M 512 QR Raw String
scanTime String M 25 The time when the QRIS
scanned by the User
ISO 8601

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
referenceNo String C 64 Transaction identifier on
service provider system.
Must be filled upon
successful transaction
merchantName String C 25 Merchant Name
merchantCategory String C 32 Merchant Category
merchantLocation String C 25 Merchant Location
transactionAmount Object O Amount of transaction
value String M 17 Net amount of the
transaction.
currency String M 3 Currency

©2023 | Digi Asia Bios Page 69 of 91


API DOCUMENTATION

List of Errors / Response Code


No Response Code Response Message Status
1 2004800 Request has been processed successfully Success
2 4004800 Bad Request Failed
3 4004801 Invalid Field Format {field name} Failed
4 4004802 Invalid Mandatory Field {field name} Failed
5 4014800 Unauthorized. [reason] Failed
6 4014801 Invalid Token (B2B) Failed
7 4014803 Token Not Found (B2B) Failed
8 4014804 Customer Token Not Found Failed
9 4034814 Insufficient Funds Failed
10 4094801 Conflict Failed
11 4094801 Duplicate partnerReferenceNo Failed
12 5004800 General Error Failed
13 5004801 Internal Server Error Failed
14 5044802 External Server Error Failed
15 5044800 Timeout Failed

8.2 QRIS MPM Payment


8.2.1 Sequence Diagram

Figure 8.2.1-1 QRIS MPM Payment Sequence Diagram (Ref: KAS-API-SEQ-SNAP-007)

©2023 | Digi Asia Bios Page 70 of 91


API DOCUMENTATION

8.2.2 Reference API


Endpoint [POST] {{SNAPGW_BASE_URL}}/v1.0/qr/qr-mpm-payment
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"partnerReferenceNo": "012238291023",
"amount": {
"value": "10000",
"currency": "IDR",
},
"feeAmount": {
"value": "1000",
"currency": "IDR",
},
"additionalInfo": {
"sourceAccountNo": "081218399991",
"isPL": "true"
}
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2005000", "responseCode": 4045008"",
"responseMessage": "Request has been "responseMessage": "Invalid Merchant"
processed successfully", }
"referenceNo": "2020102977770000000009",
"partnerReferenceNo": "012238291023",
"transactionDate": "2020-12-
23T08:37:11+07:00",
"amount": {
"value": "10000",
"currency": "IDR",
},

©2023 | Digi Asia Bios Page 71 of 91


API DOCUMENTATION

"feeAmount": {
"value": "1000",
"currency": "IDR",
}
}

Request
Parameter Data Type Mandatory Length Description
partnerReferenceNo String M 12 Transaction identifier
on service consumer
system
amount Object C Transaction amount,
Mandatory if QR type is
Static
value String M 17 Net amount of the
transaction.
currency String M 3 Currency
feeAmount Object O Transaction fee, can be
filled if fee type (Tag 55)
is 01
value String M 17 Fee amount of the
transaction
currency String M 3 Currency
AdditionalInfo Group M Additional information
sourceAccountNo String M 25 Source Account Number
billNumber String O 25 Bill Number
storeLabel String O 25 Store Label
loyaltyNumber String O 25 Loyalty Number
referenceLabel String O 25 Reference Label
customerLabel String O 25 Customer Label
terminalLabel String O 25 Terminal Label
purposeOfTransaction String O 25 Purpose of Transaction
isPL String C 5 true/false

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
referenceNo String C 64 Transaction identifier
on service provider
system. Must be filled
upon successful
transaction

©2023 | Digi Asia Bios Page 72 of 91


API DOCUMENTATION

partnerReferenceNo String O 64 Transaction identifier


on service consumer
system
transactionDate Date O 255 Transaction date
ISO-8601
amount Object M Transaction amount
value String M 17 Net amount of the
transaction.
currency String M 3 Currency
feeAmount Object M Fee amount
value String M 17 Fee amount of the
transaction
currency String M 3 Currency

List of Errors / Response Code


No Response Code Response Message Status
1 2005000 Request has been processed successfully Success
2 4005000 Bad Request Failed
3 4005001 Invalid Field Format {field name} Failed
4 4005002 Invalid Mandatory Field {field name} Failed
5 4015000 Unauthorized. [reason] Failed
6 4015001 Invalid Token (B2B) Failed
7 4015003 Token Not Found (B2B) Failed
8 4015004 Customer Token Not Found Failed
9 4035002 Exceeds Trx Frequency Limit Failed
10 4035006 Feature Not Allowed At This Time. [reason] Failed
11 4035014 Insufficient Funds Failed
12 4035015 Transaction Not Permitted. [reason] Failed
13 4035018 Inactive Card/Account/Customer Failed
14 4045001 Transaction Not Found Failed
15 4045002 Invalid Routing Failed
16 4045008 Invalid Merchant Failed
17 4045020 Invalid PAN Number Failed
18 4045021 QR Expires Failed
19 4045022 Restricted Card Failed
20 4045023 Duplicated Transmission Failed Failed
21 4095001 Conflict Failed
22 4095001 Duplicate partnerReferenceNo Failed
23 5005000 General Error Failed
24 5005001 Internal Server Error Failed
25 5045002 External Server Error Failed
26 5045000 Timeout Failed
27 5045001 Link Down Failed

©2023 | Digi Asia Bios Page 73 of 91


API DOCUMENTATION

8.3 QRIS Transaction Status


8.3.1 Sequence Diagram

Figure 8.3.1-1 QRIS Transaction Status Diagram (Ref: KAS-API-SEQ-017)

8.3.2 Reference API


Endpoint [POST] {{SNAPGW_BASE_URL}}/v1.0/qr/qr-mpm-status
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]

Body
{
"originalReferenceNo": "2020102977770000000009",
"originalPartnerReferenceNo": "012238291023",
"originalExternalId": "012238291023",
"serviceCode": "50",
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
"responseCode": "2005100", "responseCode": "5055108",

©2023 | Digi Asia Bios Page 74 of 91


API DOCUMENTATION

"responseMessage": "Request has been "responseMessage": "Invalid Merchant",


processed successfully", }
"originalReferenceNo": "012238291023",
"originalPartnerReferenceNo":
"012238291023",
"serviceCode": "50",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"originalResponseCode":"2005300",
"originalResponseMessage":"Request has
been processed successfully",
"amount": {
"value": "10000",
"currency": "IDR"
}
}

Request
Parameter Data Type Mandatory Length Description
originalReferenceNo String O 64 Original transaction
identifier on service
provider system
originalPartnerReferenceNo String O 64 Original transaction
identifier on service
consumer system
originalExternalId String O 32 Original External-ID
on header message
serviceCode String M 2 Transaction type
indicator (service
code of the original
transaction request)

Response
Parameter Data Type Mandatory Length Description
responseCode String M 7 Response code
responseMessage String M 150 Response description
originalReferenceNo String C 64 Original transaction
identifier on service
provider system.
Must be filled upon
successful
transaction

©2023 | Digi Asia Bios Page 75 of 91


API DOCUMENTATION

originalPartnerReferenceNo String O 64 Original transaction


identifier on service
consumer system
serviceCode String M 2 Transaction type
indicator (service
code of the original
transaction request)
latestTransactionStatus String M 2 00 - Success
01 - Initiated
02 - Paying
03 - Pending
04 - Refunded
05 - Canceled
06 - Failed
07 - Not found
transactionStatusDesc String O 50 Description status
transaction
amount Object M Transaction amount
value String M 17 Net amount of the
transaction.
currency String M 3 Currency

List of Errors / Response Code


No Response Code Response Message Status
1 2005100 Request has been processed successfully Success
2 4005100 Bad Request Failed
3 4005101 Invalid Field Format {field name} Failed
4 4005102 Invalid Mandatory Field {field name} Failed
5 4015100 Unauthorized. [reason] Failed
6 4015101 Invalid Token (B2B) Failed
7 4015103 Token Not Found (B2B) Failed
8 4015104 Customer Token Not Found Failed
9 4035102 Exceeds Trx Frequency Limit Failed
10 4035106 Feature Not Allowed At This Time. [reason] Failed
11 4035114 Insufficient Funds Failed
12 4035115 Transaction Not Permitted. [reason] Failed
13 4035118 Inactive Card/Account/Customer Failed
14 4045101 Transaction Not Found Failed
15 4045102 Invalid Routing Failed
16 4045108 Invalid Merchant Failed
17 4045120 Invalid PAN Number Failed
18 4045121 QR Expires Failed
19 4045122 Restricted Card Failed
20 4045123 Duplicated Transmission Failed Failed
21 4095101 Conflict Failed

©2023 | Digi Asia Bios Page 76 of 91


API DOCUMENTATION

22 4095101 Duplicate partnerReferenceNo Failed


23 5005100 General Error Failed
24 5005101 Internal Server Error Failed
25 5045102 External Server Error Failed
26 5045100 Timeout Failed
27 5045101 Link Down Failed

©2023 | Digi Asia Bios Page 77 of 91


API DOCUMENTATION

9 Upgrade Customer Account

9.1 Upgrade Customer Account with OCR


9.1.1 Sequence Diagram

Figure 9.1-1 Upgrade Customer with OCR Sequence Diagram (Ref: KAS-API-SEQ-003)

©2023 | Digi Asia Bios Page 78 of 91


API DOCUMENTATION

9.1.2 Reference API Upgrade Premium with OCR Inquiry


Endpoint [POST] {{SNAPGW_BASE_URL}}/ekyc/inquiry/upgradePremium
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]
Body:form-data
photo= files
idCard= files
selfieWithIdCard= files
msisdn=
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json
Body Body
{ {
"code": 0, "code": 110005,
"message": "Berhasil", "message": "Customer not found"
"data": { }
"requestId": "1654593357242",
"idCardNumber": "1902014501960001",
"name": "AMANDA PUTRI PARAMITA",
"religion": "ISLAM",
"rtrw": "008/025",
"address": "JL, RADIN INTEN",
"province": "KEPULAUAN BANGKA BELITUNG",
"district": "TANJUNG PANDAN",
"subDistrict": "KABUPATEN BELITUNG",
"occupation": "KARYAWAN SWASTA",
"birthPlace": "TANJUNGPANDAN",
"gender": "PEREMPUAN",
"birthDate": "11-07-1995",
"idExpiredDate": "SEUMUR HIDUP",
"bloodType": "B",
"villageDistrict": "PANGKAL LALANG",
"nationality": "WNI",
"maritalStatus": "BELUM KAWIN"
}
}

©2023 | Digi Asia Bios Page 79 of 91


API DOCUMENTATION

9.1.3 List of Errors / Response Codes


No Response Code Response Message Status
1 0 Success Success
2 888888 Timeout Failed
3 999999 General error Failed
The selfie photo you entered is invalid. Please repeat the
4 810022 Failed
Premium upgrade process.
The identification card photo you entered is invalid. Please
5 810023 Failed
repeat the Premium upgrade process.
The selfie with identification card photo you entered is
6 810024 Failed
invalid. Please repeat the Premium upgrade process.
The mobile number you entered is invalid. Please repeat the
7 810001 Failed
Premium upgrade process.
8 550011 The mobile number you entered is not valid. Failed
Your daily Premium upgrade requests has exceeded the
9 110008 Failed
limit.
10 110005 User not found Failed
11 110004 Your account is already a Premium account. Failed
Your id card number is included in blacklist category. Please
12 110010 Failed
contact our Contact Center for further information.
You cannot continue the Premium upgrade process. Please
13 550012 Failed
contact our Contact Center for further information.
14 550020 ID card dimension < 300 x 400 Failed
15 550021 ID card photo can not be identified Failed
16 4090001 Conflict Failed

9.1.4 Reference API Upgrade Premium with OCR Confirmation


Endpoint [POST] {{ SNAPGW_BASE_URL }}/ekyc/confirm/upgradePremium
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]
X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]
Body
{
"msisdn": "",
"requestId": "",
"idCardNumber": "",
"name": "",
"religion": "",

©2023 | Digi Asia Bios Page 80 of 91


API DOCUMENTATION

"rtrw": "",
"address": "",
"province": "",
"district": "",
"subDistrict": "",
"occupation": "",
"birthPlace": "",
"gender": "",
"birthDate": "",
"idExpiredDate": "",
"bloodType": "",
"villageDistrict": "",
"nationality": "",
"maritalStatus": ""
}

Response (Success) Response (Fail)


Headers Headers
Content-Type:application/json Content-Type:application/json
Body Body
{ {
"code": 200002, "code": 110004,
"message": " Selamat! Akun Anda telah "message": " Your account status is already
terdaftar sebagai akun KasPro premium " premium"
}
}

9.1.5 List of Errors / Response Codes


No Response Code Response Message Status
1 110004 Your account status is already premium Failed
Your upgrade request to premium is still in
2 110003 Failed
progress
3 110005 User not found Failed
Your phone number is included in
4 110009 Failed
blacklist category.
Congratulation! Your account has been registered
5 200002 Success
as a KasPro Premium account.
Hi, your Premium account request is being
6 200001 processed. For further information, please contact Pending
our Contact Center.
7 888888 Timeout Failed
8 999999 General error Failed
Phone number you entered is incomplete. Please
9 810001 Failed
repeat the whole Premium Upgrade process

©2023 | Digi Asia Bios Page 81 of 91


API DOCUMENTATION

Id card number you entered is incomplete. Please


10 810002 Failed
repeat the whole Premium Upgrade process.
Name you entered is incomplete. Please repeat the
11 810003 Failed
whole Premium Upgrade process
Birthdate you entered is incomplete. Please repeat
12 810004 Failed
the whole Premium Upgrade process
Birthplace you entered is incomplete. Please
13 810005 Failed
repeat the whole Premium Upgrade process.
Country code you entered is incomplete. Please
14 810006 Failed
repeat the whole Premium Upgrade process.
Date of Issue you entered is incomplete. Please
15 810007 Failed
repeat the whole Premium Upgrade process.
Expired date you entered is incomplete. Please
16 810008 Failed
repeat the whole Premium Upgrade process.
Issuing office you entered is incomplete. Please
17 810009 Failed
repeat the whole Premium Upgrade process.
Registration number you entered is incomplete.
18 810010 Please repeat the whole Premium Upgrade Failed
process.
Id type you entered is incomplete. Please repeat
19 810011 Failed
the whole Premium Upgrade process.
Gender you entered is incomplete. Please repeat
20 810012 Failed
the whole Premium Upgrade process.
Address you entered is incomplete. Please repeat
21 810013 Failed
the whole Premium Upgrade process.
District you entered is incomplete. Please repeat
22 810014 Failed
the whole Premium Upgrade process.
Village you entered is incomplete. Please repeat
23 810015 Failed
the whole Premium Upgrade process.
Rt/Rw you entered is incomplete. Please repeat
24 810016 Failed
the whole Premium Upgrade process.
Request Id you entered is incomplete. Please
25 810017 Failed
repeat the whole Premium Upgrade process.
Gender you entered is incomplete. Please repeat
26 810018 Failed
the whole Premium Upgrade process
Marital status you entered is incomplete. Please
27 810019 Failed
repeat the whole Premium Upgrade process
"Occupation you entered is incomplete. Please
28 810020 Failed
repeat the whole Premium Upgrade process.
Nationality you entered is incomplete. Please
29 810021 Failed
repeat the whole Premium Upgrade process
Selfie Photo you entered is incomplete. Please
30 810022 Failed
repeat the whole Premium Upgrade process.
Id card Photo you entered is incomplete. Please
31 810023 Failed
repeat the whole Premium Upgrade process.

©2023 | Digi Asia Bios Page 82 of 91


API DOCUMENTATION

Selfie with id card photo you entered is


32 810024 incomplete. Please repeat the whole Premium Failed
Upgrade process
Religion you entered is incomplete. Please repeat
33 810025 Failed
the whole Premium Upgrade process.
34 550019 ID card number must contain 16 characters Failed
35 550022 Selfie face image too small Failed
36 550023 Your selfie can not be identified Failed
37 4090001 Conflict Failed

9.1.6 OCR Guideline


No Image Setting Recommendations
1 Search Mechanism 1:1 matching
2 Minimum face area size 300x300 pixels, or adjust on 600x600 pixels
3 Minimum camera pixel Above .2MP
4 Ideal face posture Frontal face
5 Photo orientation position Vertical
6 Accepted face tilt > 15 degree
7 Accepted head rotation > 30 degree
8 Accepted image format input JPG or JPEG
9 Image file size < 800 KB
10 Total face in one frame 1 face
11 Image compression recommendation Bicubic, lossless

©2023 | Digi Asia Bios Page 83 of 91


API DOCUMENTATION

9.2 Upgrade Customer Account with Passport and SIM


9.2.1 Sequence Diagram

Figure 9.2-1 Upgrade Customer Account with Passport and SIM Sequence Diagram (Ref: KAS-API-SEQ-002)

9.2.2 Reference API Upgrade Premium with Passport and SIM


Endpoint [POST] {{SNAPGW_BASE_URL}}/ekyc/inquiry/upgradePremium
Request
Headers
Content-Type: application/json
Authorization: Bearer [token]
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: [alphanumeric]
X-PARTNER-ID: [alphanumeric]

©2023 | Digi Asia Bios Page 84 of 91


API DOCUMENTATION

X-EXTERNAL-ID: [alphanumeric]
CHANNEL-ID: [alphanumeric]
Body: form data
{
"photo": [files],
"idCard": [files],
"selfieWithIdCard": [files],
"requestId": [string],
"msisdn": [numeric],
"email": [numeric],
"idType": [string],
"idNumber": [string],
"fullName": [string],
"birthPlace": [string],
"birthDate": [date],
"gender": [string],
"bloodType": [string],
"religion": [string],
"maritalStatus": [string],
"occupation": [string],
"nationality": [string],
"idExpiryDate": [date],
"address": [string],
"district": [string],
"village": [string],
"rtRw": [string],
"dateOfIssue": [date],
"dateOfExpired" : [date],
"registrationNumber": [numeric],
"issuingOffice": [string],
}
Response (Success) Response (Fail)
Headers Headers
Content-Type:application/json Content-Type:application/json

Body Body
{ {
data {"requestId": [string]}, "reponseId": [string],
"message": [string], "code": [int],
"code": [int] "message": [string]
} }

©2023 | Digi Asia Bios Page 85 of 91


API DOCUMENTATION

9.2.3 List of Errors / Response Codes


No Response Code Response Message Status
1 0 Success Success
2 110001 Customer already registered Failed
3 110005 User not found Failed
Hai, permintaan upgrade Premium akun Anda
4 200001 Pending
sedang diproses
5 110002 Email already registered Failed
6 888888 Timeout Failed
7 999999 General error Failed
8 4090001 Conflict Failed

9.3 Mandatory Field


No Field KTP SIM Passport
1 photo Mandatory Mandatory Mandatory
2 idCard Mandatory Mandatory Mandatory
3 selfieWithIdCard Mandatory Mandatory Mandatory
4 requestId Optional Optional Optional
5 msisdn Mandatory Mandatory Mandatory
6 email Optional Optional Optional
7 idType Mandatory Mandatory Mandatory
8 idNumber Mandatory Mandatory Mandatory
9 fullName Mandatory Mandatory Mandatory
10 birthPlace Mandatory Mandatory Mandatory
11 birthDate Mandatory Mandatory Mandatory
12 gender Mandatory Mandatory Optional
13 bloodType Optional Optional Optional
14 religion Mandatory Optional Optional
15 maritalStatus Mandatory Optional Optional
16 occupation Mandatory Optional Optional
17 nationality Mandatory Mandatory Mandatory
18 idExpiryDate Optional Optional Optional
19 address Mandatory Mandatory Optional
20 district Mandatory Mandatory Optional
21 village Mandatory Mandatory Optional
22 rtRw Mandatory Mandatory Optional
23 dateOfIssue Optional Optional Mandatory
24 dateOfExpired Optional Optional Mandatory
25 registrationNumber Optional Optional Mandatory
26 issuingOffice Optional Optional Mandatory

©2023 | Digi Asia Bios Page 86 of 91


API DOCUMENTATION

9.4 API Callback – Request Upgrade to Premium

9.4.1 Sequence Diagram

9.4.2 API Parameters


No Parameter M/O Notes
1 Request-id M Unique id generated by KasPro
2 Request-date M Param date
3 Account-number M Account number of customer
4 MSISDN M MSISDN of customer
1. Approve
5 Status M
2. Rejected
6 Reject-reason O Reason of rejection can be more than 1

©2023 | Digi Asia Bios Page 87 of 91


API DOCUMENTATION

10 AML

10.1 Reference API


Endpoint [GET] {{SNAPGW_BASE_URL}}/snap/v1.0/credit-
inquiry?mobileNumber={mobilenumber}&amount={amount}
Request
URL Segment
mobileNumber The mobile number of the customer Numeric
amount Credit amount Money
Headers
Origin:[urldomain]
Authorization: Bearer [token]
Content-Type: application/json
Partner-Key: [alphanumeric]
Date: [Thu, 18 Feb 2021 17:00:00 GMT]
KasPro-Signature: [signature]

Resonse
Headers
Content-Type:application/json
Body
{
"code": [int],
"message": [string],
"data": {
"currentBalance": [numeric],
"remainingCreditAmount": [numeric],
"remainingMonthlyTransaction": [numeric],
"remainingMaxBalance": [numeric],
"accountType": [string],
"accountStatus": [string]
}
}

10.2 List of Errors / Response Codes


No Response Code Response Message Status
1 0 Success Success
2 888888 Timeout Failed
3 999999 General error Failed
4 110005 Source Account Not Found Failed
5 110006 Account is not active Failed
6 220003 Monthly top up limit already exceeded Failed
7 220004 Maximum balance exceeded Failed

©2023 | Digi Asia Bios Page 88 of 91


API DOCUMENTATION

10.3 Parameter Description


No Field Description
1 currentBalance Current balance
2 remainingCreditAmount Remaining credit amount
3 remainingMonthlyTransaction Remaining credit amount this month
4 remainingMaxBalance Remaining maximum balance
5 accountType Account type (premium / regular)
6 accountStatus Account status (active/ inactive)
7 remainingMonthlyTransaction Remaining monthly transaction

©2023 | Digi Asia Bios Page 89 of 91


API DOCUMENTATION

©2023 | Digi Asia Bios Page 90 of 91

You might also like