Get Invoice

The following is an API endpoint to inquiry payment transaction.

Used to retrieve payment invoice details by reference number.

Endpoint

/api/merchant/transaction/inquiry/{referenceNumber}

Headers

  • Name
    X-Client-Id
    Type
    uuid
    Description

    Client ID (provided by BJPAY or retrieve from our Merchant Portal).

  • Name
    X-Client-Secret
    Type
    string
    Description

    Client Secret (provided by BJPAY or retrieve from our Merchant Portal).

  • Name
    X-Request-Time
    Type
    YYYY-MM-DDTHH:mm:ssZ
    Description

    Request Time should be ISO 8601 and will be used to generate Signature.

  • Name
    Content-Type
    Type
    application/json
    Description

    Content type application/json

Path Parameters

  • Name
    referenceNumber
    Type
    string
    Description

    Your own reference number used when creating the payment invoice.

Response Data

  • Name
    transactionNumber
    Type
    string
    Description

    BJPAY transaction number.

  • Name
    referenceNumber
    Type
    string
    Description

    Your own reference number.

  • Name
    paymentCode
    Type
    string
    Description

    Payment channel code.

  • Name
    paymentName
    Type
    string
    Description

    Payment channel name.

  • Name
    customerName
    Type
    string
    Description

    Customer name.

  • Name
    customerEmail
    Type
    string
    Description

    Customer email.

  • Name
    customerPhoneNumber
    Type
    string
    Description

    Customer phone number.

  • Name
    finishNotifyUrl
    Type
    string
    Description

    Your backend notify endpoint.

  • Name
    finishReturnUrl
    Type
    string
    Description

    Your backend callback endpoint.

  • Name
    expiredAt
    Type
    string
    Description

    Expired payment in format RFC 3339.

  • Name
    totalAmount
    Type
    number
    Description

    Total amount.

  • Name
    fee
    Type
    number
    Description

    Fee of service payment.

  • Name
    totalReceived
    Type
    number
    Description

    Total amount received after fee deduction.

  • Name
    paymentDest
    Type
    string
    Description

    Payment destination. Can be VA number, QR text, or redirect URL.

  • Name
    paymentDestType
    Type
    string
    Description

    Payment destination type. Can be DIRECT, REDIRECT, or DEEPLINK.

  • Name
    status
    Type
    string
    Description

    Payment status.

  • Name
    currency
    Type
    string
    Description

    Transaction currency code.

  • Name
    paymentAt
    Type
    string
    Description

    Payment completion time in format RFC 3339. Empty string if not yet paid.

  • Name
    settlementAt
    Type
    string
    Description

    Settlement time in format RFC 3339. Empty string if not yet settled.

Request

Example

GET
/api/merchant/transaction/inquiry/{referenceNumber}
curl --location --request GET 'https://api.bjpay.co.id/api/merchant/transaction/inquiry/BJP05134e418d311b55e5cd9e13' \
  --header 'X-Client-Id: {{client_id}}' \
  --header 'X-Client-Secret: {{client_secret}}' \
  --header 'X-Request-Time: {{request_time}}' \
  --header 'Content-Type: application/json'

Status Code

Success Responses

CodeFunctionMessageDescription
OKRCSuccess()"Success"Request completed successfully

Authentication & Authorization Errors

CodeFunctionMessageDescription
01RCUnauthorized()"Unauthorized"User lacks proper authentication or authorization

Validation Errors

CodeFunctionMessageDescription
14RCInvalidReferenceNumber()"Invalid Transaction Reference Number"The transaction reference number is invalid
23RCInvalidRequestTime()"Invalid X-Request-Time"The request timestamp header is invalid

Business Logic Errors

CodeFunctionMessageDescription
41RCTransactionNotFound()"Transaction Not Found"The requested transaction does not exist
42RCServiceUnavailable()"Service currently not available or not in active hour"Service is temporarily unavailable or outside operating hours

System Errors

CodeFunctionMessageDescription
51RCInternalError()"Internal Error"An unexpected server error occurred

Response

Example

{
"code": "OK", // Check Response Code List
"message": "Success", // Check Response Message List
"data": {
    "transactionNumber": "BJP-X9063-03A2DA25525CCF84099149",
    "referenceNumber": "BJP05134e418d311b55e5cd9e13",
    "paymentCode": "VA_BCA",
    "paymentName": "Virtual Account BCA",
    "customerName": "BANGJEFF",
    "customerEmail": "[email protected]",
    "customerPhoneNumber": "62123224456",
    "finishNotifyUrl": "https://my-cool-apps.com/api/notify",
    "finishReturnUrl": "https://my-cool-apps.com/api/callback",
    "expiredAt": "2024-06-23T13:00:48+07:00",
    "totalAmount": 58000,
    "fee": 1160,
    "totalReceived": 56840,
    "paymentDest": "3597080155666076",
    "paymentDestType": "DIRECT",
    "status": "UNPAID",
    "currency": "IDR",
    "paymentAt": "2024-06-24T12:04:22+07:00",
    "settlementAt": "2024-06-25T12:04:22+07:00"
  }
}

Was this page helpful?