Ir al contenido
UnoPagoDocumentación
Referencia de la APIBillingInvoices

Get an invoice by id

GET
/v1/invoices/{invoiceId}

Autorización

bearerAuth
headerAutorizaciónBearer <token>

Your API key, created in Configuración → Claves API. The key alone, without the Bearer prefix, is accepted too.

Parámetros de ruta

invoiceId*string
Patrón^[cC][0-9a-z]{6,}$
Formatocuid

Cuerpo de la respuesta

Successful response

application/json
  1. response
lateFeeType*|null
currency*string
Valor en"VES""USD""EUR"
pricingMode*string

CURRENCY for a VES invoice; otherwise your account's pricing when the invoice was issued. REFERENCE (REF): dollars and euros count the same, so the amount can be paid as that figure in either. CURRENCY: other currencies convert at the day's rates.

Valor en"CURRENCY""REFERENCE"
status*string

DRAFT for a checkout order before its first confirmed payment (no customer yet, nobody owes it), UNPAID when issued, OVERDUE past its due date, PENDING while a payment is in flight (a reported transfer being reconciled or an online charge still settling), PARTIAL once part is paid, PAID, or VOIDED (final).

Valor en"DRAFT""UNPAID""OVERDUE""PENDING""PARTIAL""PAID""VOIDED"
source*string

STANDARD (console, API or a plan), KIOSK (a cantina sale) or ONBOARDING (the account's first-steps test charge).

Valor en"STANDARD""KIOSK""ONBOARDING""CHECKOUT"
id*string
Patrón^[cC][0-9a-z]{6,}$
Formatocuid
externalId*|

Your id for this invoice, unique in your account.

accountId*string
customerId*string|null
printJobId*string|null
fiscalRecordId*string|null
billingDetailsId*string|null
description*string|null
issueDate*string
dueDate*|

After this day the invoice is OVERDUE and its late fee, if any, applies.

expired*boolean
paidAt*string|null
voidedAt*string|null
planDate*|

For an invoice a plan issued: the cycle date it bills. null otherwise.

billingRunKey*string|null
lateFee*|

Added once dueDate has passed: a fixed amount, or a percentage of the items' subtotal, per lateFeeType.

fiscalInvoicing*boolean
createdAt*string
updatedAt*string
total*number

What the invoice is worth as of today, or as of paidAt once paid: items, plus the late fee and fees, minus the discounts that still apply on that date. In currency.

balance*number

What is still owed, in currency. Never negative.

feesTotals*array<>
customer*|

null only for a DRAFT order: it gets its customer at its first confirmed payment.

discounts*array<>
fees*array<>
items*array<>
transactions*array<>

The invoice's ledger: its issuance, the payments applied to it and any adjustments.

paymentMethods?array<>

The payment methods this invoice is limited to; empty means all of your account's methods. Only returned by GET and PUT /v1/invoices/{invoiceId}.

paymentLink?string

A link where the customer can pay. Absent once the invoice is PAID or VOIDED, and for a DRAFT (it is paid through its checkout session).

invoiceSequence?|

Same as fiscalInvoice.invoiceNumber.

fiscalInvoice*|

The order's live fiscal invoice from any provider, or null when it has none.

Ejemplo de solicitud
curl -X GET 'https://api.unopago.com/v1/invoices/string'
Ejemplo de respuesta
{  "lateFeeType": "PERCENTAGE",  "currency": "VES",  "pricingMode": "CURRENCY",  "status": "DRAFT",  "source": "STANDARD",  "id": "string",  "externalId": "string",  "accountId": "string",  "customerId": "string",  "printJobId": "string",  "fiscalRecordId": "string",  "billingDetailsId": "string",  "description": "string",  "issueDate": "string",  "dueDate": "string",  "expired": true,  "paidAt": "string",  "voidedAt": "string",  "planDate": "string",  "billingRunKey": "string",  "lateFee": 0,  "fiscalInvoicing": true,  "createdAt": "string",  "updatedAt": "string",  "total": 0,  "balance": 0,  "feesTotals": [    {      "type": "IGTF",      "rateBase": 0,      "rate": 0,      "total": 0    }  ],  "customer": {    "id": "string",    "accountId": "string",    "externalId": "string",    "mainContactId": "string",    "nationalId": "string",    "firstName": "string",    "lastName": "string",    "email": "string",    "phoneNumber": "string",    "address": "string",    "createdAt": "string",    "updatedAt": "string"  },  "discounts": [    {      "valueType": "PERCENTAGE",      "id": "string",      "accountId": "string",      "invoiceId": "string",      "fromPaymentId": "string",      "description": "string",      "value": 0,      "expiresAt": "string",      "expired": true,      "createdAt": "string",      "updatedAt": "string"    }  ],  "fees": [    {      "type": "IGTF",      "id": "string",      "accountId": "string",      "invoiceId": "string",      "fromPaymentId": "string",      "amount": 0,      "rate": 0,      "rateBase": 0,      "createdAt": "string",      "updatedAt": "string"    }  ],  "items": [    {      "discountValueType": "PERCENTAGE",      "id": "string",      "accountId": "string",      "invoiceId": "string",      "productId": "string",      "studentId": "string",      "description": "string",      "amount": 0,      "quantity": -9007199254740991,      "exento": true,      "isService": true,      "subscriptionId": "string",      "ivaRatePercent": -9007199254740991,      "discountValue": 0,      "discountExpiresAt": "string",      "discountExpired": true,      "createdAt": "string",      "updatedAt": "string"    }  ],  "transactions": [    {      "kind": "ITEMS",      "currency": "VES",      "id": "string",      "accountId": "string",      "customerId": "string",      "invoiceId": "string",      "statementId": "string",      "description": "string",      "transactionDate": "string",      "exchangeRate": 0,      "rateDate": "string",      "credit": 0,      "debit": 0,      "paymentId": "string",      "fromPaymentId": "string",      "retentionId": "string",      "createdAt": "string",      "updatedAt": "string"    }  ],  "paymentMethods": [    {      "id": "string",      "invoiceId": "string",      "accountPaymentMethodId": "string",      "createdAt": "string",      "updatedAt": "string"    }  ],  "paymentLink": "string",  "invoiceSequence": "string",  "fiscalInvoice": {    "source": "UNOPRINT",    "invoiceNumber": "string",    "controlNumber": "string",    "issuedAt": "string"  }}