Future Transactions
Cancel future transaction
Cancel a specific scheduled payment within a recurring series without affecting the rest of the schedule.
POST
/
v1
/
payments
/
recurring
/
future-transactions
/
cancel
/
{terminal_friendly_id}
cURL
curl --request POST \
--url https://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"future_transaction_id": "<string>",
"recurring_id": "<string>"
}
'import requests
url = "https://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}"
payload = {
"future_transaction_id": "<string>",
"recurring_id": "<string>"
}
headers = {
"x-api-key": "<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>', 'Content-Type': 'application/json'},
body: JSON.stringify({future_transaction_id: '<string>', recurring_id: '<string>'})
};
fetch('https://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}', 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://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}",
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([
'future_transaction_id' => '<string>',
'recurring_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}"
payload := strings.NewReader("{\n \"future_transaction_id\": \"<string>\",\n \"recurring_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"future_transaction_id\": \"<string>\",\n \"recurring_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}")
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["Content-Type"] = 'application/json'
request.body = "{\n \"future_transaction_id\": \"<string>\",\n \"recurring_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"recurring_id": "<string>",
"future_transaction_id": "<string>",
"cancelled": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}Cancel one future transaction using its
future_transaction_id and recurring_id.
This cancels only the specified future transaction. To stop all future payments and end the entire series, use the recurring cancel endpoint instead.
Safe retries for this POST endpoint use the
Idempotency-Key header. Reuse the same key only when retrying the exact same request body. See Idempotency.Authorizations
Headers
Optional idempotency key, scoped to terminal + matched route pattern. A replayed request returns the cached response with Idempotency-Replayed: true.
Maximum string length:
255Pattern:
^[\w-]+$Path Parameters
The unique identifier of the terminal.
Required string length:
6Pattern:
^[\dA-Za-z]{6}$Body
application/json
⌘I
cURL
curl --request POST \
--url https://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"future_transaction_id": "<string>",
"recurring_id": "<string>"
}
'import requests
url = "https://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}"
payload = {
"future_transaction_id": "<string>",
"recurring_id": "<string>"
}
headers = {
"x-api-key": "<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>', 'Content-Type': 'application/json'},
body: JSON.stringify({future_transaction_id: '<string>', recurring_id: '<string>'})
};
fetch('https://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}', 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://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}",
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([
'future_transaction_id' => '<string>',
'recurring_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}"
payload := strings.NewReader("{\n \"future_transaction_id\": \"<string>\",\n \"recurring_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"future_transaction_id\": \"<string>\",\n \"recurring_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://terminal.smartretry.com/v1/payments/recurring/future-transactions/cancel/{terminal_friendly_id}")
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["Content-Type"] = 'application/json'
request.body = "{\n \"future_transaction_id\": \"<string>\",\n \"recurring_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"recurring_id": "<string>",
"future_transaction_id": "<string>",
"cancelled": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "<string>",
"instance": "<string>",
"context": {}
}