Retry invoice payment
curl --request POST \
--url https://api.quentli.com/v1/invoices/{id}/try-payment \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.quentli.com/v1/invoices/{id}/try-payment"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.quentli.com/v1/invoices/{id}/try-payment', 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.quentli.com/v1/invoices/{id}/try-payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.quentli.com/v1/invoices/{id}/try-payment"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.quentli.com/v1/invoices/{id}/try-payment")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quentli.com/v1/invoices/{id}/try-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"payment": {
"id": "p_1234567890abcdefghij",
"createdAt": "2025-01-15T18:30:00.000Z",
"updatedAt": "2025-01-15T18:30:00.000Z",
"amount": 150000,
"currency": "MXN",
"description": "Colegiatura Enero 2025",
"type": "CARD",
"status": "COMPLETE",
"isCompleted": true,
"paymentTime": "2025-01-15T18:30:00.000Z",
"customerId": "cus_1234567890abcdefghij",
"paymentIntentId": null,
"organizationId": "org_1234567890abcdefghij",
"skipTaxInvoice": false,
"monthlyInstallments": null,
"processor": null,
"processorFee": null,
"processorFeeTax": null,
"installmentsFee": null,
"installmentsFeeTax": null,
"externalPaymentTypeId": null,
"sessionId": null,
"paymentMethodId": "pm_1234567890abcdefghij",
"metadata": null,
"meta": null
},
"invoice": {
"id": "inv_1234567890abcdefghij",
"createdAt": "2025-01-10T12:00:00.000Z",
"updatedAt": "2025-01-10T12:00:00.000Z",
"customerId": "cus_1234567890abcdefghij",
"subscriptionId": "sub_1234567890abcdefghij",
"collectionMethod": "SEND_REMINDER",
"totalAmount": 150000,
"currency": "MXN",
"dueDate": "2025-02-01T06:00:00.000Z",
"expireDate": null,
"organizationId": "org_1234567890abcdefghij",
"isPaid": false,
"paidById": null,
"amountPaid": 0,
"beneficiaryId": null,
"allowOfftimePayment": false,
"paidWithId": null,
"canceledAt": null,
"canceledById": null,
"items": [
{
"id": "invi_1234567890abcdefghij",
"description": "Colegiatura Enero 2025",
"conceptId": "pc_1234567890abcdefghij",
"concept": null,
"quantity": 1
}
],
"meta": {
"Ciclo Escolar": "2025-1"
}
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Invoices
Retry invoice payment
Attempts to charge the invoice using the associated payment method.
POST
/
v1
/
invoices
/
{id}
/
try-payment
Retry invoice payment
curl --request POST \
--url https://api.quentli.com/v1/invoices/{id}/try-payment \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.quentli.com/v1/invoices/{id}/try-payment"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.quentli.com/v1/invoices/{id}/try-payment', 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.quentli.com/v1/invoices/{id}/try-payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.quentli.com/v1/invoices/{id}/try-payment"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.quentli.com/v1/invoices/{id}/try-payment")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quentli.com/v1/invoices/{id}/try-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"payment": {
"id": "p_1234567890abcdefghij",
"createdAt": "2025-01-15T18:30:00.000Z",
"updatedAt": "2025-01-15T18:30:00.000Z",
"amount": 150000,
"currency": "MXN",
"description": "Colegiatura Enero 2025",
"type": "CARD",
"status": "COMPLETE",
"isCompleted": true,
"paymentTime": "2025-01-15T18:30:00.000Z",
"customerId": "cus_1234567890abcdefghij",
"paymentIntentId": null,
"organizationId": "org_1234567890abcdefghij",
"skipTaxInvoice": false,
"monthlyInstallments": null,
"processor": null,
"processorFee": null,
"processorFeeTax": null,
"installmentsFee": null,
"installmentsFeeTax": null,
"externalPaymentTypeId": null,
"sessionId": null,
"paymentMethodId": "pm_1234567890abcdefghij",
"metadata": null,
"meta": null
},
"invoice": {
"id": "inv_1234567890abcdefghij",
"createdAt": "2025-01-10T12:00:00.000Z",
"updatedAt": "2025-01-10T12:00:00.000Z",
"customerId": "cus_1234567890abcdefghij",
"subscriptionId": "sub_1234567890abcdefghij",
"collectionMethod": "SEND_REMINDER",
"totalAmount": 150000,
"currency": "MXN",
"dueDate": "2025-02-01T06:00:00.000Z",
"expireDate": null,
"organizationId": "org_1234567890abcdefghij",
"isPaid": false,
"paidById": null,
"amountPaid": 0,
"beneficiaryId": null,
"allowOfftimePayment": false,
"paidWithId": null,
"canceledAt": null,
"canceledById": null,
"items": [
{
"id": "invi_1234567890abcdefghij",
"description": "Colegiatura Enero 2025",
"conceptId": "pc_1234567890abcdefghij",
"concept": null,
"quantity": 1
}
],
"meta": {
"Ciclo Escolar": "2025-1"
}
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Authorizations
Organization API key using Authorization: Bearer sk_....
Path Parameters
Identifier of the invoice.
Response
Payment attempt result
Result of retrying a payment for an invoice.
Was this page helpful?
⌘I