Appearance
Cancel QR
Invalidate or Cancel your QRIS even after it being generated to your customer if there some modified detail in your data / order by using this endpoint.
##JSON Attributes
Name | Data Type | Required | Details |
---|---|---|---|
transaction_id | String | Yes | MCP Transaction ID |
external_id | String(64) | Yes | Unique string from merchant, used in signature |
order_id | String(255) | Yes | Only allows '-' for special characters, not unique, may be duplicated |
payment_method | String | Yes | Fixed value: wallet |
payment_channel | String | Yes | Fixed value: SHOPEEPAY , NOBU |
##Information
Hostname | https://api-stage.ifortepay.id |
---|---|
Path | /ewallet/v2/cancel-qr |
HTTP Method | POST |
##Headers
Key | Format | Required | Value |
---|---|---|---|
Content-Type | application/json | M | |
Authorization | String | M | |
x-req-signature | String | M | |
x-version | String | M | v3 |
##Example
Body raw
json
{
"transaction_id": "{{mcp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{order_id}}",
"payment_channel": "{{channel_name: SHOPEEPAY / NOBU}}",
"payment_method": "wallet"
}
Example Request
shell
curl --location 'https://api-stage.ifortepay.id/ewallet/v2/cancel-qr' \
--header 'Authorization: {{Authorization}}' \
--header 'x-req-signature: {{x-req-signature}}' \
--header 'Content-Type: application/json' \
--header 'x-version: v3' \
--data '{
"transaction_id": "{{mcp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{order_id}}",
"payment_channel": "{{channel_name: SHOPEEPAY/NOBU}}",
"payment_method": "wallet"
}'
go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-stage.ifortepay.id/ewallet/v2/cancel-qr"
method := "POST"
payload := strings.NewReader(`{
"transaction_id": "{{mcp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{order_id}}",
"payment_channel": "{{channel_name: SHOPEEPAY/NOBU}}",
"payment_method": "wallet"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "{{Authorization}}")
req.Header.Add("x-req-signature", "{{x-req-signature}}")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("x-version", "v3")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
js
var axios = require('axios');
var data = JSON.stringify({
"transaction_id": "{{mcp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{order_id}}",
"payment_channel": "{{channel_name: SHOPEEPAY/NOBU}}",
"payment_method": "wallet"
});
var config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api-stage.ifortepay.id/ewallet/v2/cancel-qr',
headers: {
'Authorization': '{{Authorization}}',
'x-req-signature': '{{x-req-signature}}',
'Content-Type': 'application/json',
'x-version': 'v3'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
php
use GuzzleHttp\Client;
$client = new Client();
$headers = [
'Authorization' => '{{Authorization}}',
'x-req-signature' => '{{x-req-signature}}',
'Content-Type' => 'application/json',
'x-version' => 'v3'
];
$body = '{
"transaction_id": "{{mcp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{order_id}}",
"payment_channel": "{{channel_name: SHOPEEPAY/NOBU}}",
"payment_method": "wallet"
}';
$request = new Request('POST', 'https://api-stage.ifortepay.id/ewallet/v2/cancel-qr', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
Example Response
json
{
"transaction_id": "123456",
"external_id": "123456",
"order_id": "123456",
"response_code": "00",
"payment_method": "wallet",
"payment_channel": "SHOPEEPAY",
"transaction_status": "CANCELED"
}