NodeRingsDocs

Pay Invoice

PayInvoice charges the organization's default card for an open or past-due invoice and returns the updated invoice. Idempotent when the invoice is already paid.

POST
/v1/invoices/{invoiceId}:pay
Authorization<token>

Bearer token

In: header

X-Organization-ID<token>

Tenant or organization identifier

In: header

Path Parameters

invoiceIdstring

Response Body

application/json

curl -X POST "https://api.noderings.com/v1/invoices/{invoiceId}:pay" \  -H "Authorization: Bearer {your_token}" \  -H "X-Organization-ID: {your_org_id}" \  -H "Content-Type: application/json" \  -d 'null'
{
  "invoice": {
    "id": "string",
    "invoiceNumber": "string",
    "subscriptionId": "string",
    "subscriptionIds": [
      "string"
    ],
    "periodStart": "2019-08-24T14:15:22Z",
    "periodEnd": "2019-08-24T14:15:22Z",
    "dueDate": "2019-08-24T14:15:22Z",
    "paidAt": "2019-08-24T14:15:22Z",
    "status": "INVOICE_STATUS_UNSPECIFIED",
    "currency": "string",
    "subtotal": "string",
    "taxAmount": "string",
    "total": "string",
    "amountDue": "string",
    "transactionId": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "metadata": {},
    "issuer": {
      "name": "string",
      "legalName": "string",
      "taxId": "string",
      "vatId": "string",
      "email": "string",
      "phone": "string",
      "addressLine1": "string",
      "addressLine2": "string",
      "city": "string",
      "region": "string",
      "postalCode": "string",
      "country": "string",
      "address": "string",
      "website": "string",
      "isPlatform": true
    },
    "customer": {
      "name": "string",
      "legalName": "string",
      "taxId": "string",
      "vatId": "string",
      "email": "string",
      "phone": "string",
      "addressLine1": "string",
      "addressLine2": "string",
      "city": "string",
      "region": "string",
      "postalCode": "string",
      "country": "string",
      "address": "string",
      "website": "string",
      "isPlatform": true
    }
  },
  "invoiceLines": [
    {
      "id": "string",
      "invoiceId": "string",
      "subscriptionId": "string",
      "description": "string",
      "quantity": "string",
      "unitAmount": "string",
      "amount": "string"
    }
  ],
  "transactionId": "string",
  "paymentStatus": "string"
}