curl --request PATCH \
--url https://api.paytsoftware.com/v1/payment_plans/{id}/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'administration_id=<string>' \
--data 'fields=<string>'import requests
url = "https://api.paytsoftware.com/v1/payment_plans/{id}/approve"
payload = {
"administration_id": "<string>",
"fields": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({administration_id: '<string>', fields: '<string>'})
};
fetch('https://api.paytsoftware.com/v1/payment_plans/{id}/approve', 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.paytsoftware.com/v1/payment_plans/{id}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "administration_id=%3Cstring%3E&fields=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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.paytsoftware.com/v1/payment_plans/{id}/approve"
payload := strings.NewReader("administration_id=%3Cstring%3E&fields=%3Cstring%3E")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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.paytsoftware.com/v1/payment_plans/{id}/approve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("administration_id=%3Cstring%3E&fields=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytsoftware.com/v1/payment_plans/{id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "administration_id=%3Cstring%3E&fields=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"auto_activated": true,
"administration_id": "<string>",
"debtor_id": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"payment_terms": [
{
"id": "<string>",
"total_amount": "<string>",
"amount_due": "<string>",
"due_date": "<string>",
"payment_date": "<string>"
}
],
"active": true,
"reason": "<string>",
"rejected_by_user": {
"id": "<string>",
"name": "<string>",
"email_address": "<string>"
},
"approved_at": "2023-11-07T05:31:56Z",
"deactivated_at": "2023-11-07T05:31:56Z",
"proposed_at": "2023-11-07T05:31:56Z",
"rejected_at": "2023-11-07T05:31:56Z",
"public_url": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Approve a proposed payment plan
Approve a proposed payment plan
curl --request PATCH \
--url https://api.paytsoftware.com/v1/payment_plans/{id}/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'administration_id=<string>' \
--data 'fields=<string>'import requests
url = "https://api.paytsoftware.com/v1/payment_plans/{id}/approve"
payload = {
"administration_id": "<string>",
"fields": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({administration_id: '<string>', fields: '<string>'})
};
fetch('https://api.paytsoftware.com/v1/payment_plans/{id}/approve', 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.paytsoftware.com/v1/payment_plans/{id}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "administration_id=%3Cstring%3E&fields=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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.paytsoftware.com/v1/payment_plans/{id}/approve"
payload := strings.NewReader("administration_id=%3Cstring%3E&fields=%3Cstring%3E")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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.paytsoftware.com/v1/payment_plans/{id}/approve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("administration_id=%3Cstring%3E&fields=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytsoftware.com/v1/payment_plans/{id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "administration_id=%3Cstring%3E&fields=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"auto_activated": true,
"administration_id": "<string>",
"debtor_id": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"payment_terms": [
{
"id": "<string>",
"total_amount": "<string>",
"amount_due": "<string>",
"due_date": "<string>",
"payment_date": "<string>"
}
],
"active": true,
"reason": "<string>",
"rejected_by_user": {
"id": "<string>",
"name": "<string>",
"email_address": "<string>"
},
"approved_at": "2023-11-07T05:31:56Z",
"deactivated_at": "2023-11-07T05:31:56Z",
"proposed_at": "2023-11-07T05:31:56Z",
"rejected_at": "2023-11-07T05:31:56Z",
"public_url": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
OAuth2 access token or static API token. See Authorization for how to obtain one.
Path Parameters
Payment plan identifier
Body
Response
Approve a proposed payment plan
CustomerApi_V1_PaymentPlanEntity model
Whether the payment plan was auto-activated
Owning administration identifier
Associated debtor identifier
Unique identifier
Timestamp at which the payment plan was created
Timestamp at which the payment_plan was last updated
Payment terms (derived)
Show child attributes
Show child attributes
Whether the payment plan is active
Reason for proposing payment plan provided by debtor
User who rejected the proposed payment plan
Show child attributes
Show child attributes
Timestamp at which the payment plan was approved
Timestamp at which the payment plan was deactivated
Timestamp at which the payment plan was proposed
Timestamp at which the payment plan was rejected
Link to the debtor portal (request with the 'fields' parameter)
Was this page helpful?