curl --request PUT \
--url https://api.orchestrasolutions.com/PaymentContract/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"maxOccurrences": 1073741824,
"metadata": "<string>"
}
'import requests
url = "https://api.orchestrasolutions.com/PaymentContract/{id}"
payload = {
"name": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"maxOccurrences": 1073741824,
"metadata": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
endDate: '2023-11-07T05:31:56Z',
maxOccurrences: 1073741824,
metadata: '<string>'
})
};
fetch('https://api.orchestrasolutions.com/PaymentContract/{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://api.orchestrasolutions.com/PaymentContract/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'endDate' => '2023-11-07T05:31:56Z',
'maxOccurrences' => 1073741824,
'metadata' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.orchestrasolutions.com/PaymentContract/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"maxOccurrences\": 1073741824,\n \"metadata\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.orchestrasolutions.com/PaymentContract/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"maxOccurrences\": 1073741824,\n \"metadata\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orchestrasolutions.com/PaymentContract/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"maxOccurrences\": 1073741824,\n \"metadata\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"tokenId": "<string>",
"chargeRequestData": {
"amount": 123,
"currency": "AFN",
"myRef": "<string>",
"payerDetails": {
"address1": "<string>",
"address2": "<string>",
"address3": "<string>",
"city": "<string>",
"stateProvince": "<string>",
"postCode": "<string>",
"countryCode": "<string>"
},
"isDigital": true,
"orderDesc": "<string>",
"cardHolderName": "<string>",
"expirationMonth": 123,
"expirationYear": 123
},
"merchantTimezone": "<string>",
"cardholderTimezone": "<string>",
"metadata": "<string>",
"template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"frequency": "Daily",
"upgAccountName": "<string>"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateName": "<string>",
"name": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"maxOccurrences": 123,
"currentOccurrences": 123,
"nextPaymentDate": "2023-11-07T05:31:56Z",
"status": "Active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastExecutedAt": "2023-11-07T05:31:56Z"
}"<string>""<string>"Update a Payment Contract
This method allows you to update an existing payment contract. Only certain fields can be updated: Name, EndDate, MaxOccurrences, and Metadata.
curl --request PUT \
--url https://api.orchestrasolutions.com/PaymentContract/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"maxOccurrences": 1073741824,
"metadata": "<string>"
}
'import requests
url = "https://api.orchestrasolutions.com/PaymentContract/{id}"
payload = {
"name": "<string>",
"endDate": "2023-11-07T05:31:56Z",
"maxOccurrences": 1073741824,
"metadata": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
endDate: '2023-11-07T05:31:56Z',
maxOccurrences: 1073741824,
metadata: '<string>'
})
};
fetch('https://api.orchestrasolutions.com/PaymentContract/{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://api.orchestrasolutions.com/PaymentContract/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'endDate' => '2023-11-07T05:31:56Z',
'maxOccurrences' => 1073741824,
'metadata' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.orchestrasolutions.com/PaymentContract/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"maxOccurrences\": 1073741824,\n \"metadata\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.orchestrasolutions.com/PaymentContract/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"maxOccurrences\": 1073741824,\n \"metadata\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orchestrasolutions.com/PaymentContract/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"maxOccurrences\": 1073741824,\n \"metadata\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"tokenId": "<string>",
"chargeRequestData": {
"amount": 123,
"currency": "AFN",
"myRef": "<string>",
"payerDetails": {
"address1": "<string>",
"address2": "<string>",
"address3": "<string>",
"city": "<string>",
"stateProvince": "<string>",
"postCode": "<string>",
"countryCode": "<string>"
},
"isDigital": true,
"orderDesc": "<string>",
"cardHolderName": "<string>",
"expirationMonth": 123,
"expirationYear": 123
},
"merchantTimezone": "<string>",
"cardholderTimezone": "<string>",
"metadata": "<string>",
"template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"frequency": "Daily",
"upgAccountName": "<string>"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateName": "<string>",
"name": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"maxOccurrences": 123,
"currentOccurrences": 123,
"nextPaymentDate": "2023-11-07T05:31:56Z",
"status": "Active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastExecutedAt": "2023-11-07T05:31:56Z"
}"<string>""<string>"Scheduled Payments Guide
Path Parameters
Contract ID
Body
Updated contract data
Input model for updating a payment contract
Response
OK
Full output model for payment contract details
Reference to tokenized payment method
Charge request data for scheduled payments (excludes PAN/CVV which come from token)
Show child attributes
Show child attributes
Merchant timezone (IANA format, e.g., "America/New_York")
Cardholder timezone (IANA format, e.g., "America/New_York")
Optional custom metadata (JSON)
Brief template info for contract output
Show child attributes
Show child attributes
Unique identifier
Reference to template this contract is based on
Template name
User-friendly contract name
When payments should begin
Optional end date
Optional maximum number of payments
Number of successful payments executed
Next scheduled payment date
Status of a payment contract
Active, Paused, Cancelled, Completed Creation timestamp
Last update timestamp
Timestamp of last successful payment execution