Retry Subscription
curl --request POST \
--url https://api-sandbox.y.uno/v1/subscriptions/{id}/retry \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/subscriptions/{id}/retry"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/subscriptions/{id}/retry', 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-sandbox.y.uno/v1/subscriptions/{id}/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/subscriptions/{id}/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.y.uno/v1/subscriptions/{id}/retry")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/subscriptions/{id}/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "0054840f-bcd5-4d8e-b86c-c18ede81c556",
"name": "Test Subscription",
"account_id": "f7c5fe77-721b-49c2-84d3-957748df3c2c",
"country": "CL",
"description": "Subscription Test",
"merchant_reference": "subscription-ref-merchant-AA01",
"status": "ACTIVE",
"amount": {
"currency": "CLP",
"value": 15000
},
"frequency": {
"type": "MONTH",
"value": 1
},
"billing_cycles": {
"total": 12,
"current": 2,
"next_at": "2025-05-29T11:13:31.786421Z"
},
"customer_payer": {
"id": "1c6d1a88-d8d5-4c09-b19c-852530d89f05"
},
"payment_method": {
"type": "CARD",
"vaulted_token": "743880c1-1bdb-4572-99a8-c4e5ce184895"
},
"availability": {
"start_at": "2025-04-29T11:13:31.786421Z",
"finish_at": null
},
"retries": {
"retry_on_decline": false,
"amount": 6
},
"metadata": null,
"additional_data": null,
"trial_period": {
"billing_cycles": 1,
"amount": {
"value": 0,
"currency": ""
}
},
"initial_payment_validation": false,
"created_at": "2025-04-29T11:13:31.786421Z",
"updated_at": "2025-04-29T11:13:31.942325Z"
}{
"code": "INVALID_STATE",
"messages": [
"The last payment intent of the subscription does not support the action requested."
]
}Retry Subscription
POST
/
subscriptions
/
{id}
/
retry
Retry Subscription
curl --request POST \
--url https://api-sandbox.y.uno/v1/subscriptions/{id}/retry \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/subscriptions/{id}/retry"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/subscriptions/{id}/retry', 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-sandbox.y.uno/v1/subscriptions/{id}/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/subscriptions/{id}/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.y.uno/v1/subscriptions/{id}/retry")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/subscriptions/{id}/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "0054840f-bcd5-4d8e-b86c-c18ede81c556",
"name": "Test Subscription",
"account_id": "f7c5fe77-721b-49c2-84d3-957748df3c2c",
"country": "CL",
"description": "Subscription Test",
"merchant_reference": "subscription-ref-merchant-AA01",
"status": "ACTIVE",
"amount": {
"currency": "CLP",
"value": 15000
},
"frequency": {
"type": "MONTH",
"value": 1
},
"billing_cycles": {
"total": 12,
"current": 2,
"next_at": "2025-05-29T11:13:31.786421Z"
},
"customer_payer": {
"id": "1c6d1a88-d8d5-4c09-b19c-852530d89f05"
},
"payment_method": {
"type": "CARD",
"vaulted_token": "743880c1-1bdb-4572-99a8-c4e5ce184895"
},
"availability": {
"start_at": "2025-04-29T11:13:31.786421Z",
"finish_at": null
},
"retries": {
"retry_on_decline": false,
"amount": 6
},
"metadata": null,
"additional_data": null,
"trial_period": {
"billing_cycles": 1,
"amount": {
"value": 0,
"currency": ""
}
},
"initial_payment_validation": false,
"created_at": "2025-04-29T11:13:31.786421Z",
"updated_at": "2025-04-29T11:13:31.942325Z"
}{
"code": "INVALID_STATE",
"messages": [
"The last payment intent of the subscription does not support the action requested."
]
}Use this endpoint to manually retry the most recent failed payment of a subscription. This is useful when a customer updates their payment method or resolves a payment issue (e.g., insufficient funds, expired card) mid-billing cycle, since subscription updates only take effect starting from the next billing cycle. Calling this endpoint forces a new charge attempt for the current cycle using the latest subscription configuration.
- Only the most recent payment of the subscription can be retried.
- Multiple manual retries can be executed only if the previous retry attempt resulted in a DECLINED status.
- Manually triggering a retry stops the smart retry scheme for the corresponding payment. The following payments of the subscription will follow the smart retry scheme if enabled in the creation.
- After the successful retry attempt, the system continues with the next scheduled subscription charge.
- If neither condition is met, an INVALID_REQUEST error is returned.
Authorizations
Headers
The account_id found in your Yuno Dashboard (UUID).
Path Parameters
The unique identifier of the subscription, see create subscription (UUID).
Response
200
Example:
"0054840f-bcd5-4d8e-b86c-c18ede81c556"
Example:
"Test Subscription"
Example:
"f7c5fe77-721b-49c2-84d3-957748df3c2c"
Example:
"CL"
Example:
"Subscription Test"
Example:
"subscription-ref-merchant-AA01"
Example:
"ACTIVE"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
false
Example:
"2025-04-29T11:13:31.786421Z"
Example:
"2025-04-29T11:13:31.942325Z"
Was this page helpful?