Cancel a payment
curl --request POST \
--url https://{deployment}/api/v1/paymint/cancel \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-Paymint-MMK-Mode: <api-key>' \
--data '
{
"bill_id": "BILL_123",
"price": 50000
}
'import requests
url = "https://{deployment}/api/v1/paymint/cancel"
payload = {
"bill_id": "BILL_123",
"price": 50000
}
headers = {
"X-API-KEY": "<api-key>",
"X-Paymint-MMK-Mode": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'X-Paymint-MMK-Mode': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({bill_id: 'BILL_123', price: 50000})
};
fetch('https://{deployment}/api/v1/paymint/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{deployment}/api/v1/paymint/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'bill_id' => 'BILL_123',
'price' => 50000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-Paymint-MMK-Mode: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{deployment}/api/v1/paymint/cancel"
payload := strings.NewReader("{\n \"bill_id\": \"BILL_123\",\n \"price\": 50000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-Paymint-MMK-Mode", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{deployment}/api/v1/paymint/cancel")
.header("X-API-KEY", "<api-key>")
.header("X-Paymint-MMK-Mode", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bill_id\": \"BILL_123\",\n \"price\": 50000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{deployment}/api/v1/paymint/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-Paymint-MMK-Mode"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bill_id\": \"BILL_123\",\n \"price\": 50000\n}"
response = http.request(request)
puts response.read_body{}{
"success": true,
"error": "<string>"
}{
"success": true,
"error": "<string>"
}Payments
Cancel a payment
Cancels a previously sent payment request. Requires a Pro or Paymint-only license.
POST
/
paymint
/
cancel
Cancel a payment
curl --request POST \
--url https://{deployment}/api/v1/paymint/cancel \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-Paymint-MMK-Mode: <api-key>' \
--data '
{
"bill_id": "BILL_123",
"price": 50000
}
'import requests
url = "https://{deployment}/api/v1/paymint/cancel"
payload = {
"bill_id": "BILL_123",
"price": 50000
}
headers = {
"X-API-KEY": "<api-key>",
"X-Paymint-MMK-Mode": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'X-Paymint-MMK-Mode': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({bill_id: 'BILL_123', price: 50000})
};
fetch('https://{deployment}/api/v1/paymint/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{deployment}/api/v1/paymint/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'bill_id' => 'BILL_123',
'price' => 50000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-Paymint-MMK-Mode: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{deployment}/api/v1/paymint/cancel"
payload := strings.NewReader("{\n \"bill_id\": \"BILL_123\",\n \"price\": 50000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-Paymint-MMK-Mode", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{deployment}/api/v1/paymint/cancel")
.header("X-API-KEY", "<api-key>")
.header("X-Paymint-MMK-Mode", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bill_id\": \"BILL_123\",\n \"price\": 50000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{deployment}/api/v1/paymint/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-Paymint-MMK-Mode"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bill_id\": \"BILL_123\",\n \"price\": 50000\n}"
response = http.request(request)
puts response.read_body{}{
"success": true,
"error": "<string>"
}{
"success": true,
"error": "<string>"
}Authorizations
ApiKeyAuth & PaymintMMKModeApiKeyAuth & PaymintHost & PaymintApiKey & PaymintMemberId & PaymintMerchantId & PaymintBusinessNumber
Your deployment's API key (MMK_API_KEY).
Set to true to use MMK mode (uses a license configured on your deployment). Set the Paymint connection fields on the connection page in the Magic Meal Kits app.
Response
Cancelled
The response is of type object.
Was this page helpful?
⌘I

