Skip to content

Query Payment SNAP

Information

This API is requested from the Merchant during query payment/check status.

Path/v1.0/qr/qr-mpm-query
HTTP MethodPOST
Service Code51

Request

Details
ParameterData TypeMandatoryLengthDescription
originalReferenceNostringM64Original transaction identifier on the service provider system
originalPartnerReferenceNostringM64Original transaction identifier on service consumer system.
serviceCodestringM2Transaction type indicator (service code of the original transaction request), which is 47 for generate QR MPM.

Example Request

sh
curl --location '.../v1.0/qr/qr-mpm-query' \
--header 'Content-Type: application/json' \
--header 'X-TIMESTAMP: 2020-12-23T08:43:11+07:00' \
--header 'X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5' \
--header 'X-PARTNER-ID: IFP2024067944' \
--header 'X-EXTERNAL-ID: 41807553358950093184162180797837' \
--header 'CHANNEL-ID: QR004' \
--data '{
           "originalReferenceNo": "2020102977770000000009",
           "originalPartnerReferenceNo": "2020102900000000000001",
           "serviceCode": "47"
         }'
go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := ".../v1.0/qr/qr-mpm-query"
  method := "POST"

  payload := strings.NewReader(`{
           "originalReferenceNo": "2020102977770000000009",
           "originalPartnerReferenceNo": "2020102900000000000001",
           "serviceCode": "47"
         }`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("X-TIMESTAMP", "2020-12-23T08:43:11+07:00")
  req.Header.Add("X-SIGNATURE", "85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5")
  req.Header.Add("X-PARTNER-ID", "IFP2024067944")
  req.Header.Add("X-EXTERNAL-ID", "41807553358950093184162180797837")
  req.Header.Add("CHANNEL-ID", "QR004")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
js
const axios = require('axios');
let data = JSON.stringify({
  "originalReferenceNo": "2020102977770000000009",
  "originalPartnerReferenceNo": "2020102900000000000001",
  "serviceCode": "47"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: '.../v1.0/qr/qr-mpm-query',
  headers: { 
    'Content-Type': 'application/json', 
    'X-TIMESTAMP': '2020-12-23T08:43:11+07:00', 
    'X-SIGNATURE': '85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5', 
    'X-PARTNER-ID': 'IFP2024067944', 
    'X-EXTERNAL-ID': '41807553358950093184162180797837', 
    'CHANNEL-ID': 'QR004'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
rust
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("Content-Type", "application/json".parse()?);
    headers.insert("X-TIMESTAMP", "2020-12-23T08:43:11+07:00".parse()?);
    headers.insert("X-SIGNATURE", "85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5".parse()?);
    headers.insert("X-PARTNER-ID", "IFP2024067944".parse()?);
    headers.insert("X-EXTERNAL-ID", "41807553358950093184162180797837".parse()?);
    headers.insert("CHANNEL-ID", "QR004".parse()?);

    let data = r#"{
    "originalReferenceNo": "2020102977770000000009",
    "originalPartnerReferenceNo": "2020102900000000000001",
    "serviceCode": "47"
}"#;

    let json: serde_json::Value = serde_json::from_str(&data)?;

    let request = client.request(reqwest::Method::POST, ".../v1.0/qr/qr-mpm-query")
        .headers(headers)
        .json(&json);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}
php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => '.../v1.0/qr/qr-mpm-query',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
           "originalReferenceNo": "2020102977770000000009",
           "originalPartnerReferenceNo": "2020102900000000000001",
           "serviceCode": "47"
         }',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'X-TIMESTAMP: 2020-12-23T08:43:11+07:00',
    'X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5',
    'X-PARTNER-ID: IFP2024067944',
    'X-EXTERNAL-ID: 41807553358950093184162180797837',
    'CHANNEL-ID: QR004'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response

Details
ParameterData TypeMandatoryLengthDescription
responseCodeStringM7Response code
responseMessageStringM150Response description
originalReferenceNoStringC64Original transaction identifier on service provider system. Must be filled upon successful transaction
originalPartnerReferenceNoStringM64Original transaction identifier on service consumer system
serviceCodeStringM2Transaction type indicator (service code of the original transaction request)
latestTransactionStatusStringM200 - Succes
01 - Initiated
04 - Refunded
05 - Canceled
07 - Not found
transactionStatusDescStringM50Description status transaction
paidTimeyyyyMMddHHmmssC255Transaction date (ISO-8601)
amountObjectM
amount.valueStringM16,2Amount of the transaction. If it's IDR then the value includes 2 decimal digits. e.g. IDR 10.000,- will be placed with 10000.00
amount.currencyString (ISO4217)M3Currency
terminalIdStringO16Terminal Identification
additionalInfoObjectOAdditional information
additionalInfo.merchantIdStringMIdentifier merchant
additionalInfo.merchantAccountNumberStringOMerchant PAN
additionalInfo.paymentChannelStringODescription of acquirer payment channel
additionalInfo.issuerStringCThe value will be returned for successful payment.
additionalInfo.retrievalReferenceNoStringC64Reference number generated by Issuer. The value will be returned for successful payment.
additionalInfo.invoiceNoStringCReference number if payment is successful.
additionalInfo.customerNameStringOCustomer name from Issuer
additionalInfo.customerNumberStringOCustomer PAN from Issuer
additionalInfo.paymentDetailObjectM
additionalInfo.paymentDetail.totalAmountObjectM
additionalInfo.paymentDetail.totalAmount.valueStringM16,2Total amount of the transaction. If it's IDR then the value includes 2 decimal digits. e.g. IDR 10.000,- will be placed with 10000.00 with 2 decimal
additionalInfo.paymentDetail.totalAmount.currencyStringM3Currency
additionalInfo.paymentDetail.tipAmountObjectOFees charged by merchants to customers
additionalInfo.paymentDetail.tipAmount.valueStringO16,2Tip Amount
additionalInfo.paymentDetail.tipAmount.currencyStringO3Currency (IDR)
additionalInfo.createdTimeISO-8601MCreated time, ISO-8601
additionalInfo.validityPeriodISO-8601MValid time for payment, ISO-8601
additionalInfo.cancelTimeStringC25Cancel time. ISO-8601. Must be filled if canceled transaction success
additionalInfo.totalRefundedAmountObjectCThe value will be returned for refunded payment.
additionalInfo.totalRefundedAmount.valueStringM16,2The total amount of the refund. If it's IDR then the value includes 2 decimal digits. e.g. IDR 10.000,- will be placed with 10000.00 with 2 decimal
additionalInfo.totalRefundedAmount.currencyStringM3Currency
additionalInfo.refundHistoryArray of ObjectCThe value will be returned for refunded payment.
additionalInfo.refundHistory.refundAmountObjectM16,2
additionalInfo.refundHistory.refundAmount.valueStringM16,2Total amount of the refund. If it's IDR then value includes 2 decimal digits. e.g. IDR 10.000,- will be placed with 10000.00 with 2 decimal
additionalInfo.refundHistory.refundAmount.currencyStringM3Currency
additionalInfo.refundHistory.refundTimeStringMISO-8601
additionalInfo.callbackUrlTextMMerchant URL notify payment
additionalIfo.customerDetailObjectO
additionalIfo.customerDetail.emailStringO255Give validation format. Use @
additionalIfo.customerDetail.phoneStringO30Number only
additionalIfo.customerDetail.fullNameStringO100
additionalIfo.itemDetailsArray of ObjectsOExplain the items purchased
additionalIfo.itemDetails.itemIdString(25)C25ID of product. Mandatory if item details is filled
additionalIfo.itemDetails.nameString(150)C100Name of product.
Mandatory if item details is filled
additionalIfo.itemDetails.amountObjectCPrice per unit.
Mandatory if item details is filled. Accumulation amount should be match with original amount
additionalIfo.itemDetails.amount.valueStringCMandatory if item details is filled
additionalIfo.itemDetails.amount.currencyStringC16,2Mandatory if item details is filled
additionalIfo.itemDetails.qtyInt(10)C8Number of product units.
Mandatory if item details is filled. Maximum 99999999
additionalIfo.itemDetails.descriptionString(255)O255Description of product

Example Response

{
    "responseCode": "2005100",
    "responseMessage": "Request has been processed successfully",
    "originalReferenceNo": "2020102977770000000009",
    "originalPartnerReferenceNo": "2020102900000000000001",
    "serviceCode": "17",
    "latestTransactionStatus": "00",
    "transactionStatusDesc": "Success",
    "paidTime": "2024-07-03T12:08:56+07:00",
    "amount": {
        "value": "12345678.00",
        "currency": "IDR"
    },
    "terminalId": "213141251124",
    "additionalInfo": {
        "paymentChannel": "IFORTEPAY",
        "issuer": "BCA",
        "retrievalReferenceNo": "220062712874",
        "paymentDetail": {
            "totalAmount": {
                "value": "800000.00",
                "currency": "IDR"
            }
        },
        "createdTime": "2025-05-09T14:37:10+07:00",
        "validityPeriod": "2025-05-09T14:52:10+07:00",
        "acquirerIssuerRelation": "off_us",
        "callbackUrl": "https://testcallback.com",
        "merchantId": "MC2025024500",
        "invoiceNo": "01746776297531883917",
        "merchantAccountNumber": "9360088802024078316",
        "customerName": "Dummy Name",
        "customerNumber": "9360002319993788396",
        "itemDetails": [
            {
                "itemId": "12345",
                "name": "Dress wanita",
                "amount": {
                    "value": "700000.00",
                    "currency": "IDR"
                },
                "qty": 1,
                "description": "pembelian baju"
            },
            {
                "itemId": "378251",
                "name": "Kaos Kaki",
                "amount": {
                    "value": "100000.00",
                    "currency": "IDR"
                },
                "qty": 1,
                "description": "pembelian kaos kaki"
            }
        ],
        "customerDetail": {
            "email": "test@gmail.com",
            "fullName": "Customer name",
            "phone": "08888888888"
        }
    }
}

iFortepay API Documentation