Resend an Existing Webhook Notification
POST
https://api.mpay.com.au/subscriptions/v2/resend/{id}
Path Parameters
- idstringrequiredExampleDescriptionDefault885321Pattern^[0-9]{1,12}$
Responses
200
- subscriptionListResponse_V2
- durationMsintegerExampleDescriptionDefault213Pattern^[0-9]{1,7}$
- statusstringExampleDescriptionDefaultOkPattern^[A-Za-z]{2,30}$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyPattern^.{1,500}$
- debugobjectDescription
- signInMAccountDetailsstringExampleDescriptionDefaultmAccount: 4210000000 (Active)Pattern^.{0,500}$
- finalSignInMAccountFinancialsstringExampleDescriptionDefaultBalance: 15000.00, Available: 15000.00Pattern^.{0,500}$
- initialSignInMAccountFinancialsstringExampleDescriptionDefaultBalance: 15000.00, Available: 15000.00Pattern^.{0,500}$
- traceLogIdstringExampleDescriptionDefault8f3c1d92-5b47-4a10-9f2e-6c7d81ab0e55Pattern^[A-Za-z0-9-]{1,64}$
- exceptionIdintegerExampleDescriptionDefault40312Pattern^[0-9]{1,10}$
- exceptionMsgstringExampleDescriptionDefaultNotification could not be resent because the subscription is inactive.Pattern^.{0,500}$
400
- errorResponseExample
{ "durationMs": 12, "status": "Error", "statusDescription": "Validation failed: targetUrl is required and must be a valid URL." }Description- durationMsintegerExampleDescriptionDefault12Pattern^[0-9]{1,7}$
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,30}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: targetUrl is required and must be a valid URL.Pattern^.{1,500}$
401
- errorResponseExample
{ "durationMs": 4, "status": "Unauthorized", "statusDescription": "Authentication failed. Check the API key supplied as the username." }Description- durationMsintegerExampleDescriptionDefault12Pattern^[0-9]{1,7}$
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,30}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: targetUrl is required and must be a valid URL.Pattern^.{1,500}$
500
- errorResponseExample
{ "durationMs": 5312, "status": "Exception", "statusDescription": "An unexpected error occurred while processing the request. Please contact Monoova support." }Description- durationMsintegerExampleDescriptionDefault12Pattern^[0-9]{1,7}$
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,30}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: targetUrl is required and must be a valid URL.Pattern^.{1,500}$
curl
curl --request POST \
--url https://api.mpay.com.au/subscriptions/v2/resend/{id} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/subscriptions/v2/resend/{id}", 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://api.mpay.com.au/subscriptions/v2/resend/{id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.mpay.com.au/subscriptions/v2/resend/{id}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Success. The notification was queued for resending and the processing result is returned.
{
"durationMs": 213,
"status": "Ok",
"statusDescription": "Operation completed successfully",
"debug": {
"signInMAccountDetails": "mAccount: 4210000000 (Active)",
"finalSignInMAccountFinancials": "Balance: 15000.00, Available: 15000.00",
"initialSignInMAccountFinancials": "Balance: 15000.00, Available: 15000.00",
"traceLogId": "8f3c1d92-5b47-4a10-9f2e-6c7d81ab0e55",
"exceptionId": 40312,
"exceptionMsg": "Notification could not be resent because the subscription is inactive."
}
}400
// Bad request. The request could not be processed because one or more fields are missing, malformed, or failed validation. Check the statusDescription for the field at fault, correct it and retry.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: targetUrl is required and must be a valid URL."
}401
// Unauthorized. The request did not include valid basic authentication credentials, or the API key supplied is inactive or not permitted to use this endpoint. Confirm the API key is passed as the basic authentication username and retry.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: targetUrl is required and must be a valid URL."
}500
// Internal server error. An unexpected error occurred while processing the request. The request may not have been completed — do not assume the subscription changed. Retry the request and, if the error persists, contact Monoova support quoting the statusDescription.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: targetUrl is required and must be a valid URL."
}