Retry Status
1 min
POST
https://api.<merchant-url>.com/retry/{invoice_id}
Path Parameters
- invoice_idstringrequiredExampleDescription
Body Parameters
- bodyget_retry_information_body
- customobjectExample
{ "brand": "Pepsi" }Description
Responses
200
- retry_status_200
- retrybooleanrequiredDescription
- reasonstringrequiredExampleDescription
- amountnumberExampleDescription
- metadataobjectDescription
- payment_methodsobject[]Description
- idstringExampleDescription
- network_transaction_idstringExampleDescription
- binstringExampleDescription
- tokenobjectDescription
- idstringExampleDescription
- expiration_monthstringExampleDescription
- expiration_yearstringExampleDescription
- card_validation_numberstringExampleDescription
- billing_addressobjectDescription
- namestringExampleDescription
- citystringExampleDescription
- statestringExampleDescription
- zipstringExampleDescription
- phonestringExampleDescription
401
- retry_status_401
- detailstringExample
404
- retry_status_404
- detailstringExample
429
- retry_status_429
- detailstringExample
500
- retry_status_500
- detailstringExample
curl
curl --request POST \
--url https://api.<merchant-url>.com/retry/{invoice_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.<merchant-url>.com/retry/{invoice_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.<merchant-url>.com/retry/{invoice_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.<merchant-url>.com/retry/{invoice_id}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The request succeeded
{
"retry": false,
"reason": "User Cancelation",
"amount": 19.99,
"metadata": {},
"payment_methods": [
{
"id": "pm_12345",
"network_transaction_id": "QKSX6RP250903",
"bin": "621035",
"token": {
"id": "4457010000000009",
"expiration_month": "02",
"expiration_year": "27",
"card_validation_number": "445"
},
"billing_address": {
"name": "John Smith",
"city": "Boston",
"state": "MA",
"zip": "02108",
"phone": "555-309-9999"
}
}
]
}401
// Invalid Credentials
{
"detail": "Missing or invalid api key"
}404
// Invoice Not Found
{
"detail": "An invoice with the provided ID cannot be found"
}429
// Too Many Requests
{
"detail": "Requests have exceeded rate limiting"
}500
// Server Error
{
"detail": "A server error has occurred"
}This endpoint is provisioned on the merchant's servers for Recover to retrieve invoice retry information. It serves as a final check to make sure that Recover is able to attempt a payment before executing.
Add field values in the boxes below to create an example payload on the right side of the screen.