Linkage

Account Binding

Account Binding is a service for those using the Direct Debit or Linkage services. To connect with these services, you must register the customer data, which will be verified and validated to ensure accuracy.
Type Value
Service Code
07
Name
API Account Binding
HTTP Method
POST

Flow

You send the required parameters to make a request, and Espay Payment Gateway will respond in JSON format.

API URL

Environment URL
Sandbox
Port of HTTPS (443)
https://sandbox-api.espay.id/apidirectdebit/v1.0/debit/registra tion-account-binding
Production
Port of HTTPS (443)
https://api.espay.id/apidirectdebit/v1.0/debit/registra tion-account-binding

Headers

Name Type Mandatory Description
Content-Type
String
Y
Content of your request body.

Example:
application/json
X-TIMESTAMP
String (25)
Y
Customer's current local date and time.

Format:
yyyy-MM-ddThh:mi:ssTZD (ISO 8601)

Example:
2024-03-14T07:49:28+07:00
X-SIGNATURE
String (255)
Y
Code used to validate transactions. Learn Signatures Asymmetric
X-EXTERNAL-ID
String (32)
Y
Numeric String. Reference number that should be unique on the same day.
X-PARTNER-ID
String (50)
Y
Merchant Code from Espay team.

Example:
SGWYESSISHOP
CHANNEL-ID
String (5)
Y
Channel id.

Value:
Espay
Authorization-Customer
String (150)
C
Access Token B2B2C. Espay -> Bank
Y: Yes, O: Optional, C: Conditional

Request Parameters​

Parameter Type Mandatory Description
partnerReferenceNo
String (64)
Y
Original merchant order id / payment id.
merchantId
String (64)
Y
Partner code.

Value:
"ESPAY"
phoneNo
String (13)
Y
Customer phone number.

Format:
62xxxxxxxxxxxx
authCode
String (128)
Y
Auth Code from Get auth code service.
additionalInfo
Object
  productCode
String (16)
Y
Product code. Click here
  accountToken
String (64)
Y
Registered Customer id.
  ktpFile
base64encoded
C
KTP / ID Card image.

Format:
  • Base64 encoded.
  • The maximum compression limit is up to 50kb.
  npwpFile
base64encoded
C
NPWP image.

Format:
  • Base64 encoded.
  • The maximum compression limit is up to 50kb.
  pdfFile
base64encoded
C
File PDF.

Format:
  • Base64 encoded.
  amount
String (16.2)
C
    value
String (16.2)
C
Amount binding.

Format:
Decimal .00 (ISO 4217)

Example:
150000.00
    currency
String (3)
C
Transaction currency code.

Format:
  • Rupiah: IDR
  customerAccountNumber
String (24)
C
Account Number Customer for Binding
  customerName
String (100)
C
Account Name Customer for Binding.
  debitType
String (1)
C
Tipe debit.

Format:
  • Fix: F
    If debitType = F, then amount “nominal transaksi”.
  • Variable: V
    JIf debitType = V, then amount “0”.
Y: Yes, O: Optional, C: Conditional

Response Parameters

Parameter Type Mandatory Description
responseCode
String (7)
Y
Response Code.

Format:
HTTP Code + Service Code + Error Code

Example:
200+07+00 = 2000700.
responseMessage
String (150)
Y
Response description.
referenceNo
String (64)
C
Unique ID from Saldomu.
AdditionalInfo
Object
  accountInfo
    accountType
String (64)
O
Account Type.
    accountId
String (64)
O
Account Number.
linkId
String (64)
O
Link/Binding Id.
accountToken
String (64)
O
Registered Customer id.
redirectUrl
String (255)
O
Redirect URL for agreement page or PIN page.
Y: Yes, O: Optional, C: Conditional































Sample Headers

Content-Type:application/json
X-TIMESTAMP:2024-03-14T07:49:28+07:00
X-SIGNATURE:jaCUbDOSIjFcDaZ1rO0aCczJrWSfV0wAXVi/zOLlOLOIVH00gucOSOnHpKTARwpnn6qB08Vi8VJviNhIQh1q6zVJAwdhxnHRlwNFa28IVFTtSmD4nXPWT3LsuYuFPNDGJ59/MgKMVjwIofYvq2dwOHoDi9rnyT3nPl7N2bRdIQceQlD6sITcqdEbRUlm+zTFB2MxNy4vFaEZz1LU8fsENp+giMNqxR26DsNcRj1K8JBXO6nY8q2m3jmTmiduXK5VZXxt/5v6bp+OlYCwJhn3hmdZD1zwC3Hu6qZcCIhO6IVe0ThSCfsaCdye9o/Ew6VdMWbTtQUoR983mq6MubLmzg==
X-EXTERNAL-ID:d3be5aec-155b-4b46-bfee-3fd55363d0f4
X-PARTNER-ID:SGWYESSISHOP
CHANNEL-ID:ESPAY
               



































Sample Request

{
    "partnerReferenceNo": "156436436456544",
    "merchantId": "ESPAY",
    "phoneNo": "087888XXXXX",
    "authCode": "YT1Ex4UGXzAcxw5Ve8l4QNLH2GmGPN",
    "additionalInfo": {
        "productCode": "DANAMONDIRECTDEBIT",
        "accountToken": "ESP230929094046rRD5mCT1IZkrBhJb5",
        "ktpFile":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////2wBDAf//////////////////////////////////////////////////////////////////////////////////////wAARCADqATkDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAECA//EACQQAQEBAAIBBAMBAQEBAAAAAAABESExQQISUXFhgZGxocHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2gAMAwEAAhEDEQA/AMriLyCKgg1gQwCgs4FTMOdutepjQak+FzMSVqgxZdRdPPIIvH5WzzGdBriphtTeAXg2ZjKA1pqKDUGZca3foBek8gFv8Ie3fKdA1qb8s7hoL6eLVt51FsAnql3Ut1M7 AWbflLMDkEMX/F6/YjK/pADFQAUNA6alYagKk72m/j9p4Bq2fDDSYKLNXPNLoHE/NT6RYC31cJxZ3yWVM+aBYi/S2ZgiAsnYJx5D21vPmqrm3PTfpQQwyAC8JZvSKDni41ZrMuUVVl+Uz9 w9v/1QWrZsZ5nFPHYH+JZyureQSF5M+fJ0CAfwRAVRBQA1DAWVUayoJUWoDpsxntPsueBV4 +Vxhd+IusqCrv5ZEUVOk1RuJfwSLOOkGFi4XPCoYYrNiKauosBGi9ICstM1UAAAAAAFQ0Vc TBAXUGgIqGoKhKAzRRUQUAwxoSrGRpkQA/qiosOL9oJptMRRVZa0VUqSiChE6BqMgCwqKqI ogAIAqKCKgKoogg0lBFuIKgAAAKNRlf2gqsftsEtZWoAAqAACKoMqAAeSoqp39kL2AqLOlE 8rEBFQARYALhigrNC9gGmooLp4TweEQFFBFAECgIoAu0ifIAqAAA//9k=",
        "npwpFile":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBD AP//////////////////////////////////////////////////////////////////////////////////////2wBDAf/////////////////////////////////////////////////////////////////////////////////////wAARCADqATkDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAECA//EACQQAQEBAAIBBAMBAQEBAAAAAAABESExQQISUXFhgZGxocHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2gAMAwEAAhEDEQA/AMriLyCKgg1gQwCgs4FTMOdutepjQak+FzMSVqgxZdRdPPIIvH5WzzGdBriphtTeAXg2ZjKA1pqKDUGZca3foBek8gFv8Ie3fKdA1qb8s7hoL6eLVt51FsAnql3Ut1M7A WbflLMDkEMX/F6/YjK/pADFQAUNA6alYagKk72m/j9p4Bq2fDDSYKLNXPNLoHE/NT6RYC31cJxZ3yWVM+aBYi/S2ZgiAsnYJx5D21vPmqrm3PTfpQQwyAC8JZvSKDni41ZrMuUVVl+Uz9w 9v/1QWrZsZ5nFPHYH+JZyureQSF5M+fJ0CAfwRAVRBQA1DAWVUayoJUWoDpsxntPsueBV4+ AgL0CAAAALiANCKioNLgM1CrLihmTafkt1EF3SZ5ZVUW4mnIKvAi5fhEURVDWVQBRAAAAAA AAQFRVyAyulgAqCKlF8IqLsEgC9mGoC+IusqCrv5ZEUVOk1RuJfwSLOOkGFi4XPCoYYrNiK auosBGi9ICstM1UAAAAAAFQ0VcTBAXUGgIqGoKhKAzRRUQUAwxoSrGRpkQA/qiosOL9oJpt MRRVZa0VUqSiChE6BqMgCwqKqIogAIAqKCKgKoogg0lBFuIKgAAAKNRlf2gqsftsEtZWoAA qAACKoMqAAeSoqp39kL2AqLOlE8rEBFQARYALhigrNC9gGmooLp4TweEQFFBFAECgIoAu0ifIAqAAA//9k=",
        "pdfFile": "data:application/pdf;base64,JVBERi0xLjcNCiW1tbW1DQoxID Agb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuZyhlbikgL1N0cnVjdFRyZ WVSb290IDE1IDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4vTWV0YWRhdGEgMjcgMCBS L1ZpZXdlclByZWZlcmVuY2VzIDI4IDAgUj4+DQplbmRvYmoNCjIgMCBvYmoNCjw8L1R5cGU +PDg4Q0RCRTBCODY2MDkzNDZBRTc1MzE3RTExNTgyNUNBPl0gPj4NCnN0YXJ0eHJlZg0KMT UwNzYNCiUlRU9GDQp4cmVmDQowIDANCnRyYWlsZXINCjw8L1NpemUgMzAvUm9vdCAxIDAgU i9JbmZvIDE0IDAgUi9JRFs8ODhDREJFMEI4NjYwOTM0NkFFNzUzMTdFMTE1ODI1Q0E+PDg4 Q0RCRTBCODY2MDkzNDZBRTc1MzE3RTExNTgyNUNBPl0gL1ByZXYgMTUwNzYvWFJlZlN0bSA xNDc2OD4+DQpzdGFydHhyZWYNCjE1ODMzDQolJUVPRg==",
        "amount": {
            "value": "150000.00",
            "currency": "IDR"
        },
        "customerAccountNumber": "108909378902",
        "customerName": "Jhon Doe",
        "debitType": "V"
    }
}
  
               































































Sample Response

{
    "responseCode": "2000700",
    "responseMessage": "Successful",
    "referenceNo": "6285156503065",
    "additionalInfo": {
        "accountInfo": {
            "accountType": "ACCOUNT",
            "accountId": "00******0812"
        }
    },
    "linkId": "83d5fa51aec3dc8",
    "accountToken": "ESP230929094046rRD5mCT1IZkrBhJb5",
    "redirectUrl": "https://google.com"
}
                





CURL

  
curl --location 'https://sandbox-api.espay.id/apidirectdebit/v1.0/debit/registration-account-binding' \
--header 'X-TIMESTAMP: 2024-03-14T07:49:28+07:00' \
--header 'X-SIGNATURE: k11fOnIYrNxeTZzeCOYmrE6DID3nNvdloeSMGqOLDrio/LLTwI2xCvfzXoi2ZX5eGJ9McYaD1P6FZqmzTYJIcWVz8HGFRUmpWZkutSuH48daQfq3zSpjXm6lbp8sT/ch2fdnjjZh0SZBjbijKaWt9Ci4Kw0e370fi1fTy9/XBPTQ+A0r49yB88aPQ7Nbw9HEzZAKdKLx9d1r3QkYC2Nc+eJFTP/GM/Z8JwX0o5hkTIWuVjk3Jg/gzsLr3CVKEoC2scJjwEKZ+BA+W0pn2Iznqfcpj0TkuA3UwXUcAWdNi70JzfGOrL3wArpyHeU7rxCzbvJlmRJBqurVlzyEm66XxQ==' \
--header 'X-EXTERNAL-ID: 5e33f700-4eef-4f8b-96b2-572156b0b360' \
--header 'X-PARTNER-ID: SGWYESSISHOP' \
--header 'CHANNEL-ID: ESPAY' \
--header 'Content-Type: application/json' \
--data '{
    "partnerReferenceNo":"156436436456544",
    "merchantId":"ESPAY",
    "phoneNo":"0896227489011",
    "authCode":"YT1Ex4UGXzAcxw5Ve8l4QNLH2GmGPN",
    "additionalInfo":{
        "productCode":"DANAMONDIRECTDEBIT",
        "accountToken":"ESP230929094046rRD5mCT1IZkrBhJb5",
        "ktpFile":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAwAARCADqATkDASIAAhEBAxEB/8QAFwAB AQEBAAAAAAAAAAAAAAAAAAECA//EACQQAQEBAAIBBAMBAQEBAAAAAAABESExQQISUXFhgZG xocHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2g AMAwEAAhEDEQA/AMriLyCKgg1gQwCgs4FTMOdutepjQak+FzMSVqgxZdRdPPIIvH5WzzGdB riphtTeAXg2ZjKA1pqKDUGZca3foBek8gFv8Ie3fKdA1qb8s7hoL6eLVt51FsAnql3Ut1M7 AWbflLMDkEMX/F6/YjK/pADFQAUNA6alYagKk72m/j9p4Bq2fDDSYKLNXPNLoHE/NT6RYC3 1cJxZ3yWVM+aBYi/S2ZgiAsnYJx5D21vPmqrm3PTfpQQwyAC8JZvSKDni41ZrMuUVVl+Uz9 w9v/1QWrZsZ5nFPHYH+JZyureQSF5M+fJ0CAfwRAVRBQA1DAWVUayoJUWoDpsxntPsueBV4 +Vxhd+IusqCrv5ZEUVOk1RuJfwSLOOkGFi4XPCoYYrNiKauosBGi9ICstM1UAAAAAAFQ0Vc TBAXUGgIqGoKhKAzRRUQUAwxoSrGRpkQA/qiosOL9oJptMRRVZa0VUqSiChE6BqMgCwqKqI ogAIAqKCKgKoogg0lBFuIKgAAAKNRlf2gqsftsEtZWoAAqAACKoMqAAeSoqp39kL2AqLOlE 8rEBFQARYALhigrNC9gGmooLp4TweEQFFBFAECgIoAu0ifIAqAAA//9k=",
        "npwpFile":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBD ocHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2gA MAwEAAhEDEQA/AMriLyCKgg1gQwCgs4FTMOdutepjQak+FzMSVqgxZdRdPPIIvH5WzzGdBr iphtTeAXg2ZjKA1pqKDUGZca3foBek8gFv8Ie3fKdA1qb8s7hoL6eLVt51FsAnql3Ut1M7A WbflLMDkEMX/F6/YjK/pADFQAUNA6alYagKk72m/j9p4Bq2fDDSYKLNXPNLoHE/NT6RYC31 cJxZ3yWVM+aBYi/S2ZgiAsnYJx5D21vPmqrm3PTfpQQwyAC8JZvSKDni41ZrMuUVVl+Uz9w 9v/1QWrZsZ5nFPHYH+JZyureQSF5M+fJ0CAfwRAVRBQA1DAWVUayoJUWoDpsxntPsueBV4+ AgL0CAAAALiANCKioNLgM1CrLihmTafkt1EF3SZ5ZVUW4mnIKvAi5fhEURVDWVQBRAAAAAA AAQFRVyAyulgAqCKlF8IqLsEgC9mGoC+IusqCrv5ZEUVOk1RuJfwSLOOkGFi4XPCoYYrNiK auosBGi9ICstM1UAAAAAAFQ0VcTBAXUGgIqGoKhKAzRRUQUAwxoSrGRpkQA/qiosOL9oJpt MRRVZa0VUqSiChE6BqMgCwqKqIogAIAqKCKgKoogg0lBFuIKgAAAKNRlf2gqsftsEtZWoAA qAACKoMqAAeSoqp39kL2AqLOlE8rEBFQARYALhigrNC9gGmooLp4TweEQFFBFAECgIoAu0i fIAqAAA//9k=",
        "pdfFile":"data:application/pdf;base64,JVBERi0xLjcNCiW1tbW1DQoxID Agb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuZyhlbikgL1N0cnVjdFRyZ WVSb290IDE1IDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4vTWV0YWRhdGEgMjcgMCBS L1ZpZXdlclByZWZlcmVuY2VzIDI4IDAgUj4+DQplbmRvYmoNCjIgMCBvYmoNCjw8L1R5cGU +PDg4Q0RCRTBCODY2MDkzNDZBRTc1MzE3RTExNTgyNUNBPl0gPj4NCnN0YXJ0eHJlZg0KMT UwNzYNCiUlRU9GDQp4cmVmDQowIDANCnRyYWlsZXINCjw8L1NpemUgMzAvUm9vdCAxIDAgU i9JbmZvIDE0IDAgUi9JRFs8ODhDREJFMEI4NjYwOTM0NkFFNzUzMTdFMTE1ODI1Q0E+PDg4 Q0RCRTBCODY2MDkzNDZBRTc1MzE3RTExNTgyNUNBPl0gL1ByZXYgMTUwNzYvWFJlZlN0bSA xNDc2OD4+DQpzdGFydHhyZWYNCjE1ODMzDQolJUVPRg==",
        "amount": {
            "value":"150000.00",
            "currency":"IDR"
        },
    "customerAccountNumber":"108909378902",
    "customerName":"Jhon Doe",
    "debitType":"V"
    }
}
'    
  





Scroll to Top