curl --request POST \
--url https://api.quentli.com/v1/invoice-payment-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"customer": {
"name": "<string>",
"username": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"dueDate": "2023-11-07T05:31:56Z",
"items": [
{
"description": "<string>",
"amount": 2,
"quantity": 2
}
],
"expireDate": "2023-11-07T05:31:56Z",
"collectionMethod": "AUTOMATIC",
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
'{
"url": "<string>",
"customer": {
"id": "cus_1234567890abcdefghij",
"createdAt": "2025-01-10T12:00:00.000Z",
"updatedAt": "2025-01-10T12:00:00.000Z",
"name": "Juan Pérez",
"username": "juan_perez_01",
"organizationId": "org_1234567890abcdefghij",
"acceptedServiceAgreement": true,
"skipTaxInvoice": false,
"emailVerified": false,
"phoneNumberVerified": true,
"hasChangedPassword": true,
"email": "juan@example.com",
"phoneNumber": "+525512345678",
"secondaryPhoneNumber": null,
"archivedAt": null,
"archivedById": "u_1234567890abcdefghij",
"signatureAcceptedAt": "2025-01-10T12:00:00.000Z",
"optedOutWhatsappAt": null,
"optedInWhatsappAt": "2025-01-05T10:00:00.000Z",
"startedWhatsappAt": "2025-01-05T09:55:00.000Z",
"replyWithAssistant": false,
"metadata": [
{
"key": "studentId",
"value": "A-1029"
}
],
"meta": {
"studentId": "A-1029"
}
},
"invoice": {
"id": "inv_1234567890abcdefghij",
"createdAt": "2025-01-10T12:00:00.000Z",
"updatedAt": "2025-01-10T12:00:00.000Z",
"customerId": "cus_1234567890abcdefghij",
"collectionMethod": "SEND_REMINDER",
"totalAmount": 150000,
"currency": "MXN",
"dueDate": "2025-02-01T06:00:00.000Z",
"organizationId": "org_1234567890abcdefghij",
"isPaid": false,
"amountPaid": 0,
"allowOfftimePayment": false,
"items": [
{
"id": "invi_1234567890abcdefghij",
"description": "Colegiatura Enero 2025",
"conceptId": "pc_1234567890abcdefghij",
"concept": null,
"quantity": 1
}
],
"subscriptionId": "sub_1234567890abcdefghij",
"expireDate": null,
"paidById": null,
"beneficiaryId": null,
"paidWithId": null,
"canceledAt": null,
"canceledById": null,
"meta": {
"Ciclo Escolar": "2025-1"
}
}
}Creates or reuses a customer, creates or updates an invoice, and returns an authenticated payment link.
curl --request POST \
--url https://api.quentli.com/v1/invoice-payment-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"customer": {
"name": "<string>",
"username": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
]
},
"dueDate": "2023-11-07T05:31:56Z",
"items": [
{
"description": "<string>",
"amount": 2,
"quantity": 2
}
],
"expireDate": "2023-11-07T05:31:56Z",
"collectionMethod": "AUTOMATIC",
"metadata": [
{
"key": "<string>",
"value": "<string>"
}
]
}
}
'{
"url": "<string>",
"customer": {
"id": "cus_1234567890abcdefghij",
"createdAt": "2025-01-10T12:00:00.000Z",
"updatedAt": "2025-01-10T12:00:00.000Z",
"name": "Juan Pérez",
"username": "juan_perez_01",
"organizationId": "org_1234567890abcdefghij",
"acceptedServiceAgreement": true,
"skipTaxInvoice": false,
"emailVerified": false,
"phoneNumberVerified": true,
"hasChangedPassword": true,
"email": "juan@example.com",
"phoneNumber": "+525512345678",
"secondaryPhoneNumber": null,
"archivedAt": null,
"archivedById": "u_1234567890abcdefghij",
"signatureAcceptedAt": "2025-01-10T12:00:00.000Z",
"optedOutWhatsappAt": null,
"optedInWhatsappAt": "2025-01-05T10:00:00.000Z",
"startedWhatsappAt": "2025-01-05T09:55:00.000Z",
"replyWithAssistant": false,
"metadata": [
{
"key": "studentId",
"value": "A-1029"
}
],
"meta": {
"studentId": "A-1029"
}
},
"invoice": {
"id": "inv_1234567890abcdefghij",
"createdAt": "2025-01-10T12:00:00.000Z",
"updatedAt": "2025-01-10T12:00:00.000Z",
"customerId": "cus_1234567890abcdefghij",
"collectionMethod": "SEND_REMINDER",
"totalAmount": 150000,
"currency": "MXN",
"dueDate": "2025-02-01T06:00:00.000Z",
"organizationId": "org_1234567890abcdefghij",
"isPaid": false,
"amountPaid": 0,
"allowOfftimePayment": false,
"items": [
{
"id": "invi_1234567890abcdefghij",
"description": "Colegiatura Enero 2025",
"conceptId": "pc_1234567890abcdefghij",
"concept": null,
"quantity": 1
}
],
"subscriptionId": "sub_1234567890abcdefghij",
"expireDate": null,
"paidById": null,
"beneficiaryId": null,
"paidWithId": null,
"canceledAt": null,
"canceledById": null,
"meta": {
"Ciclo Escolar": "2025-1"
}
}
}Organization API key using Authorization: Bearer sk_....
Request body for creating an invoice payment session.
Show child attributes
Invoice payment session created
Response containing the payment link, resolved customer, and invoice.
Was this page helpful?