Appearance
Query Payment SNAP
Information
This API is requested from the Merchant during query payment/check status.
Path | /v1.0/qr/qr-mpm-query |
---|---|
HTTP Method | POST |
Service Code | 51 |
Request
Details
Parameter | Data Type | Mandatory | Length | Description |
---|---|---|---|---|
originalReferenceNo | string | M | 64 | Original transaction identifier on the service provider system |
originalPartnerReferenceNo | string | M | 64 | Original transaction identifier on service consumer system. |
serviceCode | string | M | 2 | Transaction 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
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 |
originalPartnerReferenceNo | String | M | 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 - Succes 01 - Initiated 04 - Refunded 05 - Canceled 07 - Not found |
transactionStatusDesc | String | M | 50 | Description status transaction |
paidTime | yyyyMMddHHmmss | C | 255 | Transaction date (ISO-8601) |
amount | Object | M | ||
amount.value | String | M | 16,2 | 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 |
amount.currency | String (ISO4217) | M | 3 | Currency |
terminalId | String | O | 16 | Terminal Identification |
additionalInfo | Object | O | Additional information | |
additionalInfo.merchantId | String | M | Identifier merchant | |
additionalInfo.merchantAccountNumber | String | O | Merchant PAN | |
additionalInfo.paymentChannel | String | O | Description of acquirer payment channel | |
additionalInfo.issuer | String | C | The value will be returned for successful payment. | |
additionalInfo.retrievalReferenceNo | String | C | 64 | Reference number generated by Issuer. The value will be returned for successful payment. |
additionalInfo.invoiceNo | String | C | Reference number if payment is successful. | |
additionalInfo.customerName | String | O | Customer name from Issuer | |
additionalInfo.customerNumber | String | O | Customer PAN from Issuer | |
additionalInfo.paymentDetail | Object | M | ||
additionalInfo.paymentDetail.totalAmount | Object | M | ||
additionalInfo.paymentDetail.totalAmount.value | String | M | 16,2 | Total 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.currency | String | M | 3 | Currency |
additionalInfo.paymentDetail.tipAmount | Object | O | Fees charged by merchants to customers | |
additionalInfo.paymentDetail.tipAmount.value | String | O | 16,2 | Tip Amount |
additionalInfo.paymentDetail.tipAmount.currency | String | O | 3 | Currency (IDR) |
additionalInfo.createdTime | ISO-8601 | M | Created time, ISO-8601 | |
additionalInfo.validityPeriod | ISO-8601 | M | Valid time for payment, ISO-8601 | |
additionalInfo.cancelTime | String | C | 25 | Cancel time. ISO-8601. Must be filled if canceled transaction success |
additionalInfo.totalRefundedAmount | Object | C | The value will be returned for refunded payment. | |
additionalInfo.totalRefundedAmount.value | String | M | 16,2 | The 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.currency | String | M | 3 | Currency |
additionalInfo.refundHistory | Array of Object | C | The value will be returned for refunded payment. | |
additionalInfo.refundHistory.refundAmount | Object | M | 16,2 | |
additionalInfo.refundHistory.refundAmount.value | String | M | 16,2 | Total 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.currency | String | M | 3 | Currency |
additionalInfo.refundHistory.refundTime | String | M | ISO-8601 | |
additionalInfo.callbackUrl | Text | M | Merchant URL notify payment | |
additionalIfo.customerDetail | Object | O | ||
additionalIfo.customerDetail.email | String | O | 255 | Give validation format. Use @ |
additionalIfo.customerDetail.phone | String | O | 30 | Number only |
additionalIfo.customerDetail.fullName | String | O | 100 | |
additionalIfo.itemDetails | Array of Objects | O | Explain the items purchased | |
additionalIfo.itemDetails.itemId | String(25) | C | 25 | ID of product. Mandatory if item details is filled |
additionalIfo.itemDetails.name | String(150) | C | 100 | Name of product. Mandatory if item details is filled |
additionalIfo.itemDetails.amount | Object | C | Price per unit. Mandatory if item details is filled. Accumulation amount should be match with original amount | |
additionalIfo.itemDetails.amount.value | String | C | Mandatory if item details is filled | |
additionalIfo.itemDetails.amount.currency | String | C | 16,2 | Mandatory if item details is filled |
additionalIfo.itemDetails.qty | Int(10) | C | 8 | Number of product units. Mandatory if item details is filled. Maximum 99999999 |
additionalIfo.itemDetails.description | String(255) | O | 255 | Description 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"
}
}
}