LAGO_URL="https://api.getlago.com"
INVOICE_ID="__INVOICE_ID__"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/invoices/$INVOICE_ID/retry_payment" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json'
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
client = Client(api_key='__YOUR_API_KEY__')
invoice = None
try:
invoice = client.invoices.retry_payment('__INVOICE_ID__') # Invoice ID
except LagoApiError as e:
repair_broken_state(e) # do something on error or raise your own exception
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')
client.invoices.retry_payment('__INVOICE_ID__') // Invoice ID
await client.invoices.retryPayment("invoice-id");
import "fmt"
import "github.com/getlago/lago-go-client"
func main() {
lagoClient := lago.New().
SetApiKey("__YOUR_API_KEY__")
invoice, err := lagoClient.Invoice().RetryPayment("__INVOICE_ID__")
if err != nil {
// Error is *lago.Error
panic(err)
}
// invoice is *lago.Invoice
fmt.Println(invoice)
// If the invoice has to be generated, the response is empty
// And you will get a webhook `invoice.generated`
}
{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 405,
"error": "Method Not Allowed",
"code": "not_allowed"
}Invoices
Retry an invoice payment
This endpoint resends an invoice for collection and retry a payment.
POST
/
invoices
/
{lago_id}
/
retry_payment
LAGO_URL="https://api.getlago.com"
INVOICE_ID="__INVOICE_ID__"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/invoices/$INVOICE_ID/retry_payment" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json'
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
client = Client(api_key='__YOUR_API_KEY__')
invoice = None
try:
invoice = client.invoices.retry_payment('__INVOICE_ID__') # Invoice ID
except LagoApiError as e:
repair_broken_state(e) # do something on error or raise your own exception
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')
client.invoices.retry_payment('__INVOICE_ID__') // Invoice ID
await client.invoices.retryPayment("invoice-id");
import "fmt"
import "github.com/getlago/lago-go-client"
func main() {
lagoClient := lago.New().
SetApiKey("__YOUR_API_KEY__")
invoice, err := lagoClient.Invoice().RetryPayment("__INVOICE_ID__")
if err != nil {
// Error is *lago.Error
panic(err)
}
// invoice is *lago.Invoice
fmt.Println(invoice)
// If the invoice has to be generated, the response is empty
// And you will get a webhook `invoice.generated`
}
{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 405,
"error": "Method Not Allowed",
"code": "not_allowed"
}LAGO_URL="https://api.getlago.com"
INVOICE_ID="__INVOICE_ID__"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/invoices/$INVOICE_ID/retry_payment" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json'
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
client = Client(api_key='__YOUR_API_KEY__')
invoice = None
try:
invoice = client.invoices.retry_payment('__INVOICE_ID__') # Invoice ID
except LagoApiError as e:
repair_broken_state(e) # do something on error or raise your own exception
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')
client.invoices.retry_payment('__INVOICE_ID__') // Invoice ID
await client.invoices.retryPayment("invoice-id");
import "fmt"
import "github.com/getlago/lago-go-client"
func main() {
lagoClient := lago.New().
SetApiKey("__YOUR_API_KEY__")
invoice, err := lagoClient.Invoice().RetryPayment("__INVOICE_ID__")
if err != nil {
// Error is *lago.Error
panic(err)
}
// invoice is *lago.Invoice
fmt.Println(invoice)
// If the invoice has to be generated, the response is empty
// And you will get a webhook `invoice.generated`
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
Example:
"1a901a90-1a90-1a90-1a90-1a901a901a90"
Body
application/json
Payment method to use for the retry (optional)
Reference to a specific payment method for processing the payment.
Show child attributes
Show child attributes
Response
Invoice payment retried
Was this page helpful?