Skip to main content
POST
/
gateway
/
checkcancel
Cancel (void) a check disbursement
curl --request POST \
  --url https://payapi-sandbox.ingo.money/gateway/checkcancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "participant_id": "12345",
  "check_number": "49379283",
  "amount": 100.04,
  "reason_code": 73,
  "explanation": "Check Not Printed",
  "participant_unique_id1": "2ac29937-1c52-4647-ba54-f1442ffae4d1"
}
'
import requests

url = "https://payapi-sandbox.ingo.money/gateway/checkcancel"

payload = {
"participant_id": "12345",
"check_number": "49379283",
"amount": 100.04,
"reason_code": 73,
"explanation": "Check Not Printed",
"participant_unique_id1": "2ac29937-1c52-4647-ba54-f1442ffae4d1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
participant_id: '12345',
check_number: '49379283',
amount: 100.04,
reason_code: 73,
explanation: 'Check Not Printed',
participant_unique_id1: '2ac29937-1c52-4647-ba54-f1442ffae4d1'
})
};

fetch('https://payapi-sandbox.ingo.money/gateway/checkcancel', 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://payapi-sandbox.ingo.money/gateway/checkcancel",
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([
'participant_id' => '12345',
'check_number' => '49379283',
'amount' => 100.04,
'reason_code' => 73,
'explanation' => 'Check Not Printed',
'participant_unique_id1' => '2ac29937-1c52-4647-ba54-f1442ffae4d1'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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://payapi-sandbox.ingo.money/gateway/checkcancel"

payload := strings.NewReader("{\n \"participant_id\": \"12345\",\n \"check_number\": \"49379283\",\n \"amount\": 100.04,\n \"reason_code\": 73,\n \"explanation\": \"Check Not Printed\",\n \"participant_unique_id1\": \"2ac29937-1c52-4647-ba54-f1442ffae4d1\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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://payapi-sandbox.ingo.money/gateway/checkcancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"participant_id\": \"12345\",\n \"check_number\": \"49379283\",\n \"amount\": 100.04,\n \"reason_code\": 73,\n \"explanation\": \"Check Not Printed\",\n \"participant_unique_id1\": \"2ac29937-1c52-4647-ba54-f1442ffae4d1\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://payapi-sandbox.ingo.money/gateway/checkcancel")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"participant_id\": \"12345\",\n \"check_number\": \"49379283\",\n \"amount\": 100.04,\n \"reason_code\": 73,\n \"explanation\": \"Check Not Printed\",\n \"participant_unique_id1\": \"2ac29937-1c52-4647-ba54-f1442ffae4d1\"\n}"

response = http.request(request)
puts response.read_body
{
  "status_code": 100,
  "client_message": "Success",
  "data": {
    "check_number": "49379283",
    "transaction_id": 2361543,
    "request_timestamp": 1633470601,
    "participant_unique_id1": "2ac29937-1c52-4647-ba54-f1442ffae4d1"
  },
  "time": "0.7614"
}
{
"status_code": 722,
"client_message": "Check Invalid To Cancel"
}

Body

application/json
participant_id
string
required

Unique participant identifier assigned by Ingo.

Maximum string length: 5
Example:

"12345"

check_number
string
required

Check number assigned to the check disbursement transaction. Provided in the Process call response (check_number field).

Example:

"49379283"

amount
number<float>
required

Amount of the transaction. Must exactly match the original transaction amount.

Required range: x >= 0.01
Example:

100.04

reason_code
enum<integer>
required

Reason code for the check cancel request. Must match the check's current transaction status. 73 = Check Not Printed (routed transactions only). 74 = Undelivered Check (issued transactions only). 75 = Client Request (issued transactions only). 76 = Internal Request (issued transactions only).

Available options:
73,
74,
75,
76
Example:

73

explanation
string
required

Brief explanation for the check cancel request.

Required string length: 1 - 150
Example:

"Check Not Printed"

participant_unique_id1
string
required

Participant assigned unique ID for the original check Process request. Must exactly match the original value.

Required string length: 1 - 255
Example:

"2ac29937-1c52-4647-ba54-f1442ffae4d1"

Response

Check cancelled successfully

status_code
integer

Numeric code describing the status of the API request. 100 = Success.

Example:

100

client_message
string

Text description associated with the status code.

Example:

"Success"

data
object

Information about identifiers associated with the transaction.

time
string

Time in seconds to complete the request.

Example:

"0.7614"