Inquiry

Inquiry is a service used by Espay Payment Gateway to find out transaction details. You are asked to provide a response based on the format provided and register your Inquiry URL on the Espay Sandbox Portal. This Inquiry service is mandatory for those integrated with the Embed Kit and Direct Integration methods with the Dynamic Virtual Account type.

Type Value
Service Code
24
Name
Inquiry
HTTP Method
POST

Flow

Espay Payment Gateway will send a request to your server via the inquiry URL registered on the Espay Sandbox Portal when a new transaction occurs. You are required to respond in JSON using the provided format.

API URL

Merchant URL Endpoint Description
https://yourdomain.com
.../v1.0/transfer-va/inquiry
Merchant domain URL.
Port of HTTPS (443).
TLS 1.2
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.
Y: Yes, O: Optional, C: Conditional

Request Parameters

Parameter Type Mandatory Description
partnerServiceId
String (8)
Y
Partner service Id.

Format:
padding space + ESPAY

Value:
" ESPAY"
customerNo
String (20)
Y
Merchant code from Espay team.

Example:
SGWYESSISHOP
virtualAccountNo
String (28)
Y
Unique code to identify the order/billing/invoice.

Example:
Transaction number, invoice ID, etc.
trxDateInit
String (25)
Y
Date and time of the Espay system.

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

Example:
2024-10-24T17:25:40+0700
inquiryRequestId
String (128)
Y
Unique ID for inquiry from Espay.
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+24+00 = 2002400
responseMessage
String (150)
Y
Response description.
virtualAccountData
Object
Y
  partnerServiceId
String (8)
Y
Partner service Id.

Format:
padding space + ESPAY

Value:
" ESPAY"
  customerNo
String (20)
Y
Merchant code from Espay team.

Example:
SGWYESSISHOP
  virtualAccountNo
String (28)
Y
Unique code to identify the order/billing/invoice.

Example:
Transaction number, invoice ID, etc.
  virtualAccountName
String (255)
Y
Customer name.
  virtualAccountEmail
String (255)
C
Customer email. Mandatory for paylater payments.
  virtualAccountPhone
String (30)
C
Customer phone number. Mandatory for paylater payments.

Format:
62xxxxxxxxx
  inquiryRequestId
String (128)
Y
Unique ID for inquiry from Espay.
  totalAmount
Object
Y
     value
String (16.2)
Y
Total amount.

Format:
Decimal .00 ((ISO 4217)

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

Format:
  • Rupiah: IDR
  billDetails
Array of Objects
Y
    billDescription
Object
Y
      english
String (18)
Y
Transaction description (English version).
      indonesia
String (18)
Y
Transaction description (Indonesian version).
  additionalInfo
Object
C
    token
String (40)
C
Token credit card.
    transactionDate
String (25)
Y
Date and time from merchant.

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

Example:
2024-03-14T07:49:28+07:00
    installmentPeriod
String (3)
C
Installment period. Mandatory for paylater payments.

Format:
  • 30 Days: 30D
  • 3 Months: 3M
  • 6 Months: 6M
  • 12 Months: 12M
    isInstallment
String (1)
C
Mandatory for credit card payments.

Format:
  • Yes: Y
  • No: N
    expiredDatetime
String (25)
O
Time and expiration date of the transaction.

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

Example:
2024-03-14T07:49:28+07:00
    validationCode
String (100)
C
Promotional validation code. Mandatory for promotional engine users.
    dataMerchant
Object
C
Merchant data. Mandatory for collection users.
      listBills
Array of Objects
C
Check the Merchant Data table (Installment Payment and Multi Bills).
    shippingAddress
Object
C
Shipping address. Mandatory for paylater payments.
      firstName
String (50)
C
First name.
      lastName
String (50)
C
Last name.
      address
String (255)
C
Shipping address.
      city
String (50)
C
City.
      postalCode
String (10)
C
Postal code.
      phoneNumber
String (30)
C
Phone number.

Format:
62xxxxxxxxxxxx
      countryCode
String (3)
C
Country code.

Format:
ISO 3166 Alpha 3

Example:
IDN
    items
Array of Objects
C
List of purchased items. Mandatory for paylater payments.
      id
String (10)
C
Item id.
      name
String (50)
C
Item name.
      price
String (16)
C
Item price.

Format:
Integer (must round price)

Example:
150000
      type
String (50)
C
Item type / item category.
      url
String (100)
C
Item url.
      quantity
String (16)
C
Item purchase quantity.

Format:
Integer (Must round digit) Item purchase quantity.

Format:
Integer (Must round digit)

Example:
10
Y: Yes, O: Optional, C: Conditional

Data Merchant - Installment Payment

Parameter Type Mandatory Description
kodeCa
String (8)
C
CA code merchant.
kodeSubCa
String (8)
C
Sub CA code mMerchant.
namaPelanggan
String (100)
Y
Customer name.
noKontrak
String (12)
Y
Contract number customer.
angsuranKe
String (2)
Y
Number installment.
jmlBayarExcAdm
String (16.2)
C
Total payment exc admin.

Format:
Desimal .00 (ISO 4217)

Example:
50000.00
denda
String (16.2)
C
Penalty.

Format:
Desimal .00 (ISO 4217)

Example:
50000.00
feeCa
String (16.2)
C
Fee CA.

Format:
Desimal .00 (ISO 4217)

Example:
50000.00
feeSwitcher
String (16.2)
C
Fee switcher.

Format:
Desimal .00 (ISO 4217)

Example:
50000.00
totalAdmin
String (16.2)
C
Total admin.

Format:
Desimal .00 (ISO 4217)

Example:
50000.00
jumlahBayar
String (16.2)
Y
Total payment.

Format:
Desimal .00 (ISO 4217)

Example:
150000.00
minimumAmount
String (16.2)
C
Minimum payment installment.

Format:
Desimal .00 (ISO 4217)

Example:
150000.00
customer
Object
C
  email
String (100)
C
Customer email.
jatuhTempo
Date
C
Payment due date.

Format:
yyyy-MM-dd

Example:
2025-03-10
Y: Yes, O: Optional, C: Conditional

Data Merchant - Multi Bills

Parameter Tipe Mandatory Keterangan
listBills
Array of Object
C
  billCode
String (2)
Y
Bill code for customer.

Example:
01, 02, 03 etc.
  billName
String (20)
Y
Bill name.
  billAmount
Object
Y
Bill amount.
    value
String (16.2)
Y
Bill amount.

Format:
Decimal .00 (ISO 4217)

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

Format:
  • Rupiah: IDR
  billSubCompany
String (5)
C
Bill sub company.
Parameter Type Mandatory Description
listBills
Array of Object
C
  BillDescription
Object
C
Transaction description.
    Indonesian
String (18)
C
Transaction description (Indonesian version).
    English
String (18)
C
Transaction description (English version).
  BillAmount
String (16.2)
C
Amount bills.

Format:
Desimal .00 (ISO 4217)

Example:
150000.00
  BillNumber
String (18)
C
Bill number.
  BillSubCompany
String (5)
C
Bill sub company.
Y: Yes, O: Optional, C: Conditional

URL Registration

Ensure your URL format and response comply with this documentation guidelines. Next, immediately register your Inquiry URL via the Espay Sandbox portal. Read how to add a URL here.

































Sample Header

Content-Type:application/json
X-TIMESTAMP:2024-03-14T07:49:28+07:00
X-SIGNATURE:Ae668CcZjeuMGF6VPU2qYffMn093O/te89fGERTM2j1dm1AnOiWd5J9fSRCgG8l2vp+5Ij6PqeC7vkircm5ZQw==
X-EXTERNAL-ID:9299e5ee-82ff-4a67-ad59-06ce5cf5fba2
X-PARTNER-ID:SGWYESSISHOP
CHANNEL-ID:ESPAY
            




























Sample Request

{
    "partnerServiceId":" ESPAY",
    "customerNo":"SGWYESSISHOP",
    "virtualAccountNo":"ORDER0001",
    "trxDateInit":"2024-10-24T17:25:40+0700",
    "inquiryRequestId":"abcdef-123456-abcdeg"
}
            



























Sample Response Positive

{
    "responseCode": "2002400",
    "responseMessage": "Success",
    "virtualAccountData": {
        "partnerServiceId": " Espay",
        "customerNo": "SGWYESSISHOP",
        "virtualAccountNo": "DIGOERDER00001",
        "virtualAccountName": "Jokul Doe",
        "virtualAccountEmail": "john@email.com",
        "virtualAccountPhone": "6281828384858",
        "inquiryRequestId": "abcdef-123456-abcdef",
        "totalAmount": {
            "value": "890000.00",
            "currency": "IDR"
        },
        "billDetails": [
            {
                "billDescription": {
                    "english": "Tagihan No 123456",
                    "indonesia": "Invoice No 123456"
                }
            }
        ],
        "additionalInfo": {
            "token": "2023011167618274122",
            "transactionDate": "2022-08-21T14:56:11+07:00",
            "dataMerchant": {
                "kodeCa": "880105",
                "kodeSubCa": "-",
                "namaPelanggan": "Yories Yolanda",
                "noKontrak": "060223118342",
                "angsuranKe": "15",
                "jmlBayarExcAdm": 5000000.00,
                "denda": 0.00,
                "feeCa": 5000.00,
                "feeSwitcher": 0.00,
                "totalAdmin": 5000.00,
                "jumlahBayar": 5005000.00,
                "minimumAmount": 2000000.00,
                "customer": {
                    "email": "test@gmail.com"
                },
                "jatuhTempo": "2025-03-10",
            "listBills": [
                {
                    "billCode": 01,
                    "billName": "Bill Invoice 1",
                    "billAmount": {
                        "value": "70000.00",
                        "currency": "IDR"
                    },
                    "billSubCompany": "00001"
                },
                {
                    "billCode": 02,
                    "billName": "Bill Invoice 2",
                    "billAmount": {
                        "value": "50000.00",
                        "currency": "IDR"
                    },
                    "billSubCompany": "00002"
                }
            ],
            "shippingAddress": {
                "firstName": "Jokul",
                "lastName": "Doe",
                "address": "Jl. Teknologi Indonesia No. 25",
                "city": "Jakarta",
                "postalCode": "12960",
                "phoneNumber": "6281828384858",
                "countryCode": "IDN"
            },
            "items": [
                {
                    "id": "1",
                    "name": "Newlook Charm",
                    "price": "10000",
                    "type": "Contact Lens",
                    "url": "https://domain.com/products/detail?id=1",
                    "quantity": "1"
                },
                {
                    "id": "2",
                    "name": "Newlook Playful",
                    "price": "10000",
                    "type": "Contact Lens",
                    "url": "https://domain.com/products/detail?id=2",
                    "quantity": "1"
                }
            ]
        }
    }
}
          


Sample Respons Negative

{
    "responseCode": "4012400",
    "responseMessage": "Unauthorized Signature"
}
            


CURL

curl --location 'https://digallery-me.xyz/api/v1.0/transfer-va/inquiry' \
--header 'Content-Type: application/json' \
--header 'X-TIMESTAMP: 2024-03-14T07:49:28+07:00' \
--header 'X-SIGNATURE: Ae668CcZjeuMGF6VPU2qYffMn093O/te89fGERTM2j1dm1AnOiWd5J9fSRCgG8l2vp+5Ij6PqeC7vkircm5ZQw==' \
--header 'X-EXTERNAL-ID: 9299e5ee-82ff-4a67-ad59-06ce5cf5fba2' \
--header 'X-PARTNER-ID: SGWYESSISHOP' \
--header 'CHANNEL-ID: ESPAY' \
--data-urlencode 'partnerServiceId= ESPAY' \
--data-urlencode 'customerNo=SGWYESSISHOP' \
--data-urlencode 'virtualAccountNo=ORDER0001' \
--data-urlencode 'trxDateInit=2023-08-31T07:49:28+07:00' \
--data-urlencode 'inquiryRequestId=abcdef-123456-abcdeg'
          
Scroll to Top