Recurring
Charge recurring
Manually trigger a charge against an active merchant-managed recurring series.
POST
/
v1
/
payments
/
recurring
/
charge
/
{terminal_friendly_id}
cURL
curl --request POST \
--url https://terminal.smartretry.com/v1/payments/recurring/charge/{terminal_friendly_id} \
--header 'Content-Type: application/json' \
--header 'x-signature: <api-key>' \
--header 'x-timestamp: <api-key>' \
--data '
{
"recurring_id": "<string>",
"amount": 500000
}
'import requests
url = "https://terminal.smartretry.com/v1/payments/recurring/charge/{terminal_friendly_id}"
payload = {
"recurring_id": "<string>",
"amount": 500000
}
headers = {
"x-timestamp": "<api-key>",
"x-signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-timestamp': '<api-key>',
'x-signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({recurring_id: '<string>', amount: 500000})
};
fetch('https://terminal.smartretry.com/v1/payments/recurring/charge/{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/charge/{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([
'recurring_id' => '<string>',
'amount' => 500000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-signature: <api-key>",
"x-timestamp: <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/charge/{terminal_friendly_id}"
payload := strings.NewReader("{\n \"recurring_id\": \"<string>\",\n \"amount\": 500000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-timestamp", "<api-key>")
req.Header.Add("x-signature", "<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/charge/{terminal_friendly_id}")
.header("x-timestamp", "<api-key>")
.header("x-signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recurring_id\": \"<string>\",\n \"amount\": 500000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://terminal.smartretry.com/v1/payments/recurring/charge/{terminal_friendly_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-timestamp"] = '<api-key>'
request["x-signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recurring_id\": \"<string>\",\n \"amount\": 500000\n}"
response = http.request(request)
puts response.read_body{
"transaction_id": "<string>",
"recurring_id": "<string>",
"accepted": true,
"order_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}Submit a charge against an existing recurring series by its
recurring_id.
Retry a previous recurring charge
Use this same endpoint to create a new retry attempt. In the request body, provideretry.originating_id for the previous SmartRetry recurring charge transaction.
A retry request creates a new attempt. To safely replay the exact same request after an ambiguous
failure, reuse its
Idempotency-Key. See Idempotency.Authorizations
Current Unix time in seconds. Must be within 5 minutes of server time. Included in the signed string.
Lowercase hex HMAC-SHA256 of {timestamp}.{METHOD}.{path_with_query}.{raw_body}, keyed with your API Secret. See the Authentication guide.
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
- Option 1
- Option 2
The recurring series identifier.
Required string length:
8Pattern:
^[\dA-Za-z]{8}$Payment amount in major currency units (e.g. 10.00 for $10.00 USD).
Required range:
0.01 <= x <= 999999.99Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, UYI, UYU, UYW, UZS, VED, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL ⌘I
cURL
curl --request POST \
--url https://terminal.smartretry.com/v1/payments/recurring/charge/{terminal_friendly_id} \
--header 'Content-Type: application/json' \
--header 'x-signature: <api-key>' \
--header 'x-timestamp: <api-key>' \
--data '
{
"recurring_id": "<string>",
"amount": 500000
}
'import requests
url = "https://terminal.smartretry.com/v1/payments/recurring/charge/{terminal_friendly_id}"
payload = {
"recurring_id": "<string>",
"amount": 500000
}
headers = {
"x-timestamp": "<api-key>",
"x-signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-timestamp': '<api-key>',
'x-signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({recurring_id: '<string>', amount: 500000})
};
fetch('https://terminal.smartretry.com/v1/payments/recurring/charge/{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/charge/{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([
'recurring_id' => '<string>',
'amount' => 500000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-signature: <api-key>",
"x-timestamp: <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/charge/{terminal_friendly_id}"
payload := strings.NewReader("{\n \"recurring_id\": \"<string>\",\n \"amount\": 500000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-timestamp", "<api-key>")
req.Header.Add("x-signature", "<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/charge/{terminal_friendly_id}")
.header("x-timestamp", "<api-key>")
.header("x-signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recurring_id\": \"<string>\",\n \"amount\": 500000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://terminal.smartretry.com/v1/payments/recurring/charge/{terminal_friendly_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-timestamp"] = '<api-key>'
request["x-signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recurring_id\": \"<string>\",\n \"amount\": 500000\n}"
response = http.request(request)
puts response.read_body{
"transaction_id": "<string>",
"recurring_id": "<string>",
"accepted": true,
"order_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"reason_code": "SYSTEM/SUCCESSFUL",
"instance": "<string>",
"context": {}
}