Amend Payment Schedule Status
PATCH
https://beta-api.monoova.com/au/payto/pam-v1/PaymentSchedule/{scheduleId}/status
Path Parameters
- scheduleIdstringrequiredExampleDescriptionDefaultMONSCH12345Pattern^[a-zA-Z0-9_-]{1,36}$
Body Parameters
- bodyMandateManager.Application.PaymentSchedules.Dto.AmendPaymentScheduleStatusDtoInrequiredDescription
- statusstringrequiredExampleDescriptionDefaultPausedPattern^(Active|Paused|Cancelled)$
- statusReasonDescriptionstringExampleDescriptionDefaultCustomer requested a pause in paymentsMax Length256Pattern^[ -~]{0,256}$
Responses
200
- MandateManager.Application.PaymentSchedules.Dto.AmendPaymentScheduleStatusResponseDescription
- traceIdstringExampleDescriptionDefault1dabfaa9-abe8-4d2d-a69a-b723079d84edPattern^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
- scheduleIdstringExampleDescriptionDefaultMONSCH12345Pattern^[a-zA-Z0-9_-]{1,36}$
- statusstringExampleDescriptionDefaultPausedPattern^(Pending|Active|Paused|Cancelled)$
- statusDescriptionstringExampleDescriptionDefaultPausedPattern^.+$
- statusReasonCodestringExampleDescriptionDefaultCustReqPattern^(CustReq|CreateError|Expired|AgreementStatusChanged|InvalidPayeeDetails|BilateralAmendmentInitiated|MaxedOutTotalInstanceLimit|MaxedOutTotalAmountLimit|ExceededScheduleEndDate|FinalPaymentInitiated|SchedulingDisabled)$
- statusReasonDescriptionstringExampleDescriptionDefaultCustomer requested a pause in paymentsPattern^.+$
400
- MandateManager.Application.Common.Dtos.ErrorResponseExample
{ "traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741", "errors": [ { "errorCode": "PAM_SCHED_STATUS_UPDATE_NOCHANGE", "errorMessage": "Payment schedule MONSCH12345 is already Paused" } ] }Description- traceIdstringExampleDescriptionDefault4ea61012-2d9b-413d-a5b4-90ad69a68741Pattern^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
- errorsMandateManager.Application.Common.Dtos.ErrorDto[]Description
- errorCodestringExampleDescriptionDefaultPAM_STARTDATE_EARLYPattern^[A-Z]{3}_[A-Z0-9_]+$
- errorMessagestringExampleDescriptionDefaultpaymentDetails.startDate must be future datePattern^.+$
401
403
- MandateManager.Application.Common.Dtos.ErrorResponseExample
{ "traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741", "errors": [ { "errorCode": "PAM_FORBIDDEN_ERROR", "errorMessage": "Not allowed to amend payment schedule status for account 6279059778044302" } ] }Description- traceIdstringExampleDescriptionDefault4ea61012-2d9b-413d-a5b4-90ad69a68741Pattern^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
- errorsMandateManager.Application.Common.Dtos.ErrorDto[]Description
- errorCodestringExampleDescriptionDefaultPAM_STARTDATE_EARLYPattern^[A-Z]{3}_[A-Z0-9_]+$
- errorMessagestringExampleDescriptionDefaultpaymentDetails.startDate must be future datePattern^.+$
404
- MandateManager.Application.Common.Dtos.ErrorResponseExample
{ "traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741", "errors": [ { "errorCode": "PAM_SCHED_NOT_FOUND_ERROR", "errorMessage": "PaymentSchedule not found for ScheduleId MONSCH12345" } ] }Description- traceIdstringExampleDescriptionDefault4ea61012-2d9b-413d-a5b4-90ad69a68741Pattern^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
- errorsMandateManager.Application.Common.Dtos.ErrorDto[]Description
- errorCodestringExampleDescriptionDefaultPAM_STARTDATE_EARLYPattern^[A-Z]{3}_[A-Z0-9_]+$
- errorMessagestringExampleDescriptionDefaultpaymentDetails.startDate must be future datePattern^.+$
500
- MandateManager.Application.Common.Dtos.ErrorResponseExample
{ "traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741", "errors": [ { "errorCode": "PAM_UNEXPECTED_ERROR", "errorMessage": "Internal server error. Please contact Monoova support." } ] }Description- traceIdstringExampleDescriptionDefault4ea61012-2d9b-413d-a5b4-90ad69a68741Pattern^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
- errorsMandateManager.Application.Common.Dtos.ErrorDto[]Description
- errorCodestringExampleDescriptionDefaultPAM_STARTDATE_EARLYPattern^[A-Z]{3}_[A-Z0-9_]+$
- errorMessagestringExampleDescriptionDefaultpaymentDetails.startDate must be future datePattern^.+$
502
- MandateManager.Application.Common.Dtos.ErrorResponseExample
{ "traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741", "errors": [ { "errorCode": "PAM_SCHEDULER_ERROR", "errorMessage": "Error returned from scheduler service - service unavailable" } ] }Description- traceIdstringExampleDescriptionDefault4ea61012-2d9b-413d-a5b4-90ad69a68741Pattern^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
- errorsMandateManager.Application.Common.Dtos.ErrorDto[]Description
- errorCodestringExampleDescriptionDefaultPAM_STARTDATE_EARLYPattern^[A-Z]{3}_[A-Z0-9_]+$
- errorMessagestringExampleDescriptionDefaultpaymentDetails.startDate must be future datePattern^.+$
503
504
- MandateManager.Application.Common.Dtos.ErrorResponseExample
{ "traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741", "errors": [ { "errorCode": "PAM_SCHEDULER_TIMEOUT", "errorMessage": "Timeout from scheduler service" } ] }Description- traceIdstringExampleDescriptionDefault4ea61012-2d9b-413d-a5b4-90ad69a68741Pattern^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
- errorsMandateManager.Application.Common.Dtos.ErrorDto[]Description
- errorCodestringExampleDescriptionDefaultPAM_STARTDATE_EARLYPattern^[A-Z]{3}_[A-Z0-9_]+$
- errorMessagestringExampleDescriptionDefaultpaymentDetails.startDate must be future datePattern^.+$
curl
curl --request PATCH \
--url https://beta-api.monoova.com/au/payto/pam-v1/PaymentSchedule/{scheduleId}/status \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"status": "Paused",
"statusReasonDescription": "Customer requested a pause in payments"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"status": "Paused",
"statusReasonDescription": "Customer requested a pause in payments"
});
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://beta-api.monoova.com/au/payto/pam-v1/PaymentSchedule/{scheduleId}/status", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://beta-api.monoova.com/au/payto/pam-v1/PaymentSchedule/{scheduleId}/status")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"status": "Paused",
"statusReasonDescription": "Customer requested a pause in payments"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://beta-api.monoova.com/au/payto/pam-v1/PaymentSchedule/{scheduleId}/status"
payload = json.dumps({
"status": "Paused",
"statusReasonDescription": "Customer requested a pause in payments"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
200
// OK. The payment schedule status was changed.
{
"traceId": "1dabfaa9-abe8-4d2d-a69a-b723079d84ed",
"scheduleId": "MONSCH12345",
"status": "Paused",
"statusDescription": "Paused",
"statusReasonCode": "CustReq",
"statusReasonDescription": "Customer requested a pause in payments"
}400
// Bad Request. The request failed validation. See errors for details.
{
"traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
"errors": [
{
"errorCode": "PAM_STARTDATE_EARLY",
"errorMessage": "paymentDetails.startDate must be future date"
}
]
}401
// Unauthorized. The bearer token is missing, invalid or expired. Bearer tokens are valid for 24 hours; generate a new token and retry.
403
// Forbidden. Your account is not permitted to perform this operation.
{
"traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
"errors": [
{
"errorCode": "PAM_STARTDATE_EARLY",
"errorMessage": "paymentDetails.startDate must be future date"
}
]
}404
// Not Found. The payment schedule could not be found.
{
"traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
"errors": [
{
"errorCode": "PAM_STARTDATE_EARLY",
"errorMessage": "paymentDetails.startDate must be future date"
}
]
}500
// Internal Server Error. An unexpected error occurred. Contact Monoova support if the problem persists.
{
"traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
"errors": [
{
"errorCode": "PAM_STARTDATE_EARLY",
"errorMessage": "paymentDetails.startDate must be future date"
}
]
}502
// Bad Gateway. An upstream service, such as the NPP gateway, returned an error. Retry the request later.
{
"traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
"errors": [
{
"errorCode": "PAM_STARTDATE_EARLY",
"errorMessage": "paymentDetails.startDate must be future date"
}
]
}503
// Service Unavailable. The service is temporarily unavailable. Retry the request later.
504
// Gateway Timeout. An upstream service, such as the NPP gateway, did not respond in time. Retry the request later.
{
"traceId": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
"errors": [
{
"errorCode": "PAM_STARTDATE_EARLY",
"errorMessage": "paymentDetails.startDate must be future date"
}
]
}