Ir al contenido
UnoPagoDocumentación
Referencia de la APIWebhook events

Invoice Created

Triggered when a new invoice is created, a checkout session's DRAFT order included: it is announced when the session is created, usually with customer: null, and its first payment sends invoice_updated.

application/json
  1. body
id*string
eventType*string
account?string

The connected account the event happened in, on events a platform receives on its Cuentas conectadas endpoints. Absent on your own account's events.

createdAt*string
data*

Cuerpo de la respuesta

Webhook received successfully

Ejemplos de solicitud
POST/invoice_created
Cuerpo de la solicitud
application/json
{  "id": "string",  "eventType": "string",  "createdAt": "string",  "data": {    "invoice": {      "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",      "fiscalInvoicing": true,      "createdAt": "string",      "updatedAt": "string",      "account": {        "type": "SCHOOL",        "status": "ACTIVE",        "mainCurrency": "VES",        "defaultPricingMode": "CURRENCY",        "id": "string",        "name": "string",        "description": "string",        "isTest": true,        "nationalId": "string",        "phoneNumber": "string",        "address": "string",        "image": "string",        "accountNotificationSettingId": "string",        "merchantId": "string",        "platformAccountId": "string",        "externalId": "string",        "createdAt": "string",        "updatedAt": "string"      },      "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"      },      "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,          "discountExpiresAt": "string",          "discountExpired": true,          "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"        }      ]    },    "checkoutSessionId": "string"  }}