Regenerate an invoice PDF

Regenerates the PDF for an invoice and returns the updated invoice and PDF. Refreshes billing details, PO number, and the denormalized customer / product fields from the source Charge. Preserves line items, amounts, taxes, fees, and status. The previous PDF is overwritten in place; the returned invoiceUrl is a freshly signed link.

POST/v1/invoices/:id/regenerate

Authorization

api_key_auth
AuthorizationBearer <token>

API key authentication. Use "Bearer YOUR_API_KEY" format.

In: header

Path Parameters

id*string

The ID of the invoice to regenerate.

Match^[0-9a-fA-F]{24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Empty body. The regeneration operation is parameter-less; the new PDF reflects current billing details on the source charge.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.checkoutpage.com/v1/invoices/:id/regenerate" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": "string",
    "sellerId": "string",
    "customerId": "65f4a1c2e4a9f3d2b1c0a9e8",
    "chargeId": "65f4a1c2e4a9f3d2b1c0a9e8",
    "livemode": true,
    "currency": "string",
    "amount": 0,
    "amountRefunded": 0,
    "amountUsd": 0,
    "amountPaid": 0,
    "amountDue": 0,
    "amountExcludingTax": 0,
    "taxAmount": 0,
    "taxBreakdown": [
      {
        "taxType": "string",
        "taxabilityReason": "string",
        "taxableAmount": 0,
        "taxAmount": 0,
        "taxRateDetails": {
          "country": "string",
          "percentageDecimal": 0,
          "state": "string",
          "taxType": "string"
        }
      }
    ],
    "taxSource": "fixed_tax_rate",
    "taxRates": [
      {
        "taxRate": "65f4a1c2e4a9f3d2b1c0a9e8",
        "stripeId": "string",
        "displayName": "VAT",
        "default": true,
        "active": true,
        "inclusive": true,
        "percentage": 0,
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    ],
    "status": "draft",
    "lineItems": [
      {
        "type": "product",
        "name": "string",
        "quantity": 0,
        "unitPrice": 0,
        "amount": 0,
        "bulkDiscountAmount": 0,
        "couponDiscountAmount": 0,
        "couponCode": "string"
      }
    ],
    "subtotal": 0,
    "subtotalAfterDiscount": 0,
    "bulkDiscount": {
      "minQuantity": 0,
      "maxQuantity": 0,
      "percentOff": 0,
      "amountOff": 0,
      "amount": 0
    },
    "fees": [
      {
        "name": "string",
        "amount": 0,
        "percentage": 0
      }
    ],
    "coupon": {
      "id": "65f4a1c2e4a9f3d2b1c0a9e8",
      "label": "string",
      "code": "string",
      "amountOff": 0,
      "percentOff": 0,
      "discount": 0
    },
    "poNumber": "string",
    "poNumberLabel": "string",
    "invoiceUuid": "string",
    "invoiceNumber": "string",
    "invoiceUrl": "string",
    "billing": {
      "name": "string",
      "email": "string",
      "phone": "string",
      "address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "state": "string",
        "postalCode": "string",
        "country": "string"
      },
      "taxId": "string",
      "taxIdType": "string"
    },
    "sellerBilling": {
      "name": "string",
      "email": "string",
      "taxId": "string",
      "address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "state": "string",
        "postalCode": "string",
        "country": "string"
      }
    },
    "customerName": "string",
    "customerEmail": "string",
    "productTitle": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
{
  "status": "error",
  "type": "error",
  "message": "Not Found",
  "errors": [
    {
      "param": "string",
      "message": "string",
      "value": null
    }
  ],
  "property1": null,
  "property2": null
}
{
  "status": "error",
  "type": "error",
  "message": "Not Found",
  "errors": [
    {
      "param": "string",
      "message": "string",
      "value": null
    }
  ],
  "property1": null,
  "property2": null
}
{
  "status": "error",
  "type": "error",
  "message": "Not Found",
  "errors": [
    {
      "param": "string",
      "message": "string",
      "value": null
    }
  ],
  "property1": null,
  "property2": null
}
{
  "status": "error",
  "type": "error",
  "message": "Not Found",
  "errors": [
    {
      "param": "string",
      "message": "string",
      "value": null
    }
  ],
  "property1": null,
  "property2": null
}
{
  "status": "error",
  "type": "error",
  "message": "Not Found",
  "errors": [
    {
      "param": "string",
      "message": "string",
      "value": null
    }
  ],
  "property1": null,
  "property2": null
}