Pause Subscription
curl --request PATCH \
--url https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"resumeAt": "2026-08-01T00:00:00"
}
'import requests
url = "https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause"
payload = { "resumeAt": "2026-08-01T00:00:00" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({resumeAt: '2026-08-01T00:00:00'})
};
fetch('https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause', 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://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'resumeAt' => '2026-08-01T00:00:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause"
payload := strings.NewReader("{\n \"resumeAt\": \"2026-08-01T00:00:00\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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.patch("https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"resumeAt\": \"2026-08-01T00:00:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resumeAt\": \"2026-08-01T00:00:00\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Subscription paused",
"data": {
"id": 22,
"customerId": "test-trial-2",
"customerEmail": "johndoe@gmail.com",
"status": "PAUSED",
"enrollmentReference": "SUBREF_EE9A8CD25F38423B87",
"enrollmentTxnReference": "SUB_ENROLL_22_1783543549106",
"pausedAt": "2026-07-08T22:05:03.791857158",
"pauseResumesAt": "2026-07-08T22:05:52.596019689"
}
}Subscription Lifecycle
Pause Subscription
Pauses recurring billing for a subscription. Billing remains suspended until the subscription is resumed manually or automatically on the specified resume date.
Note:
- If
resumeAtis omitted, the subscription remains paused until it is resumed manually.
PATCH
/
subscription
/
api
/
v1
/
subscriptions
/
{id}
/
pause
Pause Subscription
curl --request PATCH \
--url https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"resumeAt": "2026-08-01T00:00:00"
}
'import requests
url = "https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause"
payload = { "resumeAt": "2026-08-01T00:00:00" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({resumeAt: '2026-08-01T00:00:00'})
};
fetch('https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause', 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://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'resumeAt' => '2026-08-01T00:00:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause"
payload := strings.NewReader("{\n \"resumeAt\": \"2026-08-01T00:00:00\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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.patch("https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"resumeAt\": \"2026-08-01T00:00:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resumeAt\": \"2026-08-01T00:00:00\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Subscription paused",
"data": {
"id": 22,
"customerId": "test-trial-2",
"customerEmail": "johndoe@gmail.com",
"status": "PAUSED",
"enrollmentReference": "SUBREF_EE9A8CD25F38423B87",
"enrollmentTxnReference": "SUB_ENROLL_22_1783543549106",
"pausedAt": "2026-07-08T22:05:03.791857158",
"pauseResumesAt": "2026-07-08T22:05:52.596019689"
}
}Authorizations
Payaza {{Public API Key in Base 64}}
Path Parameters
The ID of the subscription.
Body
application/json
Date and time when the subscription should automatically resume.
Example:
"2026-08-01T00:00:00"
⌘I