Schedule Payments›Manage
Update schedule
Edit a schedule before its first run (can_edit: true). Same body and rules as Create; the schedule restarts from the new start_at.
Send your secret key in the
P-API-KEY header. Keep it on your server, never in an app or browser.Path parameters
-
scheduleReference string RequiredExample:
SCH-9SC5QIH5GNLC
Body (JSON)
-
service string RequiredExample:
data -
biller string RequiredExample:
mtn_data -
customer_id string RequiredExample:
08031234567 -
code string RequiredExample:
mtn-2gb-30days -
frequency string RequiredExample:
monthly -
start_at string RequiredExample:
{{startAt}}
Responses
- 200Success
- 404Error
- 422Error
Request
curl --request PUT \ --url 'https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'P-API-KEY: YOUR_SECRET_KEY' \ --data '{ "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }'curl --request PUT \ --url 'https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'P-API-KEY: YOUR_SECRET_KEY' \ --data '{ "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }'
<?php use Illuminate\Support\Facades\Http; $response = Http::withHeaders([ 'Accept' => 'application/json', 'Content-Type' => 'application/json', 'P-API-KEY' => 'YOUR_SECRET_KEY', ])->put('https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}', [ 'service' => 'data', 'biller' => 'mtn_data', 'customer_id' => '08031234567', 'code' => 'mtn-2gb-30days', 'frequency' => 'monthly', 'start_at' => '{{startAt}}', ]); $data = $response->json();<?php use Illuminate\Support\Facades\Http; $response = Http::withHeaders([ 'Accept' => 'application/json', 'Content-Type' => 'application/json', 'P-API-KEY' => 'YOUR_SECRET_KEY', ])->put('https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}', [ 'service' => 'data', 'biller' => 'mtn_data', 'customer_id' => '08031234567', 'code' => 'mtn-2gb-30days', 'frequency' => 'monthly', 'start_at' => '{{startAt}}', ]); $data = $response->json();
const response = await fetch('https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}', { method: 'PUT', headers: { "Accept": "application/json", "Content-Type": "application/json", "P-API-KEY": "YOUR_SECRET_KEY", }, body: JSON.stringify({ "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }), }); const data = await response.json();const response = await fetch('https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}', { method: 'PUT', headers: { "Accept": "application/json", "Content-Type": "application/json", "P-API-KEY": "YOUR_SECRET_KEY", }, body: JSON.stringify({ "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }), }); const data = await response.json();
import requests response = requests.request( "PUT", "https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}", headers={ "Accept": "application/json", "Content-Type": "application/json", "P-API-KEY": "YOUR_SECRET_KEY", }, json={ "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }, ) data = response.json()import requests response = requests.request( "PUT", "https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}", headers={ "Accept": "application/json", "Content-Type": "application/json", "P-API-KEY": "YOUR_SECRET_KEY", }, json={ "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }, ) data = response.json()
PUT /v2/scheduled-payments/{scheduleReference} HTTP/1.1 Host: api.paybeta.ng Accept: application/json Content-Type: application/json P-API-KEY: YOUR_SECRET_KEY { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }PUT /v2/scheduled-payments/{scheduleReference} HTTP/1.1 Host: api.sandbox.paybeta.ng Accept: application/json Content-Type: application/json P-API-KEY: YOUR_SECRET_KEY { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }
import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; String body = """ { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}")) .header("Accept", "application/json") .header("Content-Type", "application/json") .header("P-API-KEY", "YOUR_SECRET_KEY") .method("PUT", HttpRequest.BodyPublishers.ofString(body)) .build(); HttpResponse<String> response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body());import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; String body = """ { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}")) .header("Accept", "application/json") .header("Content-Type", "application/json") .header("P-API-KEY", "YOUR_SECRET_KEY") .method("PUT", HttpRequest.BodyPublishers.ofString(body)) .build(); HttpResponse<String> response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body());
using System.Net.Http; using System.Text; using var client = new HttpClient(); var request = new HttpRequestMessage(new HttpMethod("PUT"), "https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}"); request.Headers.TryAddWithoutValidation("Accept", "application/json"); request.Headers.TryAddWithoutValidation("P-API-KEY", "YOUR_SECRET_KEY"); request.Content = new StringContent( """ { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } """, Encoding.UTF8, "application/json"); var response = await client.SendAsync(request); var data = await response.Content.ReadAsStringAsync(); Console.WriteLine(data);using System.Net.Http; using System.Text; using var client = new HttpClient(); var request = new HttpRequestMessage(new HttpMethod("PUT"), "https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}"); request.Headers.TryAddWithoutValidation("Accept", "application/json"); request.Headers.TryAddWithoutValidation("P-API-KEY", "YOUR_SECRET_KEY"); request.Content = new StringContent( """ { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } """, Encoding.UTF8, "application/json"); var response = await client.SendAsync(request); var data = await response.Content.ReadAsStringAsync(); Console.WriteLine(data);
package main import ( "fmt" "io" "net/http" "strings" ) func main() { req, _ := http.NewRequest("PUT", "https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}", strings.NewReader(`{ "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }`)) req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.Header.Set("P-API-KEY", "YOUR_SECRET_KEY") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() data, _ := io.ReadAll(res.Body) fmt.Println(string(data)) }package main import ( "fmt" "io" "net/http" "strings" ) func main() { req, _ := http.NewRequest("PUT", "https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}", strings.NewReader(`{ "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" }`)) req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.Header.Set("P-API-KEY", "YOUR_SECRET_KEY") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() data, _ := io.ReadAll(res.Body) fmt.Println(string(data)) }
require "net/http" require "json" uri = URI("https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}") request = Net::HTTP::Put.new(uri) request["Accept"] = "application/json" request["Content-Type"] = "application/json" request["P-API-KEY"] = "YOUR_SECRET_KEY" request.body = <<~'JSON' { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } JSON response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http| http.request(request) end data = JSON.parse(response.body)require "net/http" require "json" uri = URI("https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}") request = Net::HTTP::Put.new(uri) request["Accept"] = "application/json" request["Content-Type"] = "application/json" request["P-API-KEY"] = "YOUR_SECRET_KEY" request.body = <<~'JSON' { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } JSON response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http| http.request(request) end data = JSON.parse(response.body)
import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody val client = OkHttpClient() val body = """ { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } """.trimIndent().toRequestBody("application/json".toMediaType()) val request = Request.Builder() .url("https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}") .method("PUT", body) .addHeader("Accept", "application/json") .addHeader("Content-Type", "application/json") .addHeader("P-API-KEY", "YOUR_SECRET_KEY") .build() client.newCall(request).execute().use { response -> println(response.body?.string()) }import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody val client = OkHttpClient() val body = """ { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } """.trimIndent().toRequestBody("application/json".toMediaType()) val request = Request.Builder() .url("https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}") .method("PUT", body) .addHeader("Accept", "application/json") .addHeader("Content-Type", "application/json") .addHeader("P-API-KEY", "YOUR_SECRET_KEY") .build() client.newCall(request).execute().use { response -> println(response.body?.string()) }
import Foundation var request = URLRequest(url: URL(string: "https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}")!) request.httpMethod = "PUT" request.setValue("application/json", forHTTPHeaderField: "Accept") request.setValue("application/json", forHTTPHeaderField: "Content-Type") request.setValue("YOUR_SECRET_KEY", forHTTPHeaderField: "P-API-KEY") request.httpBody = #""" { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } """#.data(using: .utf8) let (data, _) = try await URLSession.shared.data(for: request) print(String(data: data, encoding: .utf8)!)import Foundation var request = URLRequest(url: URL(string: "https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}")!) request.httpMethod = "PUT" request.setValue("application/json", forHTTPHeaderField: "Accept") request.setValue("application/json", forHTTPHeaderField: "Content-Type") request.setValue("YOUR_SECRET_KEY", forHTTPHeaderField: "P-API-KEY") request.httpBody = #""" { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } """#.data(using: .utf8) let (data, _) = try await URLSession.shared.data(for: request) print(String(data: data, encoding: .utf8)!)
import 'package:http/http.dart' as http; final response = await http.put( Uri.parse('https://api.paybeta.ng/v2/scheduled-payments/{scheduleReference}'), headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'P-API-KEY': 'YOUR_SECRET_KEY', }, body: r''' { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } ''', ); print(response.body);import 'package:http/http.dart' as http; final response = await http.put( Uri.parse('https://api.sandbox.paybeta.ng/v2/scheduled-payments/{scheduleReference}'), headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'P-API-KEY': 'YOUR_SECRET_KEY', }, body: r''' { "service": "data", "biller": "mtn_data", "customer_id": "08031234567", "code": "mtn-2gb-30days", "frequency": "monthly", "start_at": "{{startAt}}" } ''', ); print(response.body);
Response
{
"success": true,
"message": "Schedule updated successfully.",
"data": {
"reference": "SCH-7F3K9QX2AB12",
"service": "data",
"service_label": "Internet Data",
"biller": "mtn_data",
"biller_label": "MTN Data",
"biller_code": "mtn-1gb-30days",
"product_name": "MTN 1GB - 30 Days",
"customer_id": "08031234567",
"customer_name": null,
"amount": 1000,
"frequency": "monthly",
"frequency_label": "Monthly",
"starts_at": "2026-11-01T09:00:00+01:00",
"ends_at": null,
"next_run_at": "2026-11-01T09:00:00+01:00",
"status": "active",
"failure_reason": null,
"can_retry": false,
"can_cancel": true,
"can_pause": true,
"can_pay_now": true,
"can_resume": false,
"resume_needs_start_at": false,
"paused_at": null,
"can_edit": true,
"archived": false,
"can_reactivate": false,
"can_delete": false,
"reactivation_needs_start_at": false,
"cancelled_at": null,
"total_runs": 0,
"last_run_at": null,
"last_run": null,
"description": "Data for Mum",
"summary": "Internet Data scheduled for the beneficiary 08031234567",
"created_at": "2026-10-05T12:00:00+01:00"
}
}
{
"success": false,
"message": "Schedule not found."
}
{
"success": false,
"message": "This schedule can no longer be edited — it has already started running.",
"errors": {
"schedule": [
"This schedule can no longer be edited — it has already started running."
]
}
}