Proforma Invoices

Void Proforma Invoice

POST
/proforma_invoices/{proforma_invoice_uid}/void.json

Voids a proforma invoice that has the status "draft".

Restrictions

Proforma invoices are only available on Relationship Invoicing sites.

Only proforma invoices that have the appropriate status may be reopened. If the invoice identified by {uid} does not have the appropriate status, the response will have HTTP status code 422 and an error message.

A reason for the void operation is required to be included in the request body. If one is not provided, the response will have HTTP status code 422 and an error message.

Authorization

BasicAuth
AuthorizationBasic <token>

The username is a Maxio Chargify API key. The password is x.

In: header

Path Parameters

proforma_invoice_uid*string

The uid of the proforma invoice

Request Body

application/json

void*

Response Body

application/json

application/json

curl -X POST "https://example.com/proforma_invoices/string/void.json" \  -H "Content-Type: application/json" \  -d '{    "void": {      "reason": "string"    }  }'
{  "uid": "string",  "site_id": 0,  "customer_id": 0,  "subscription_id": 0,  "number": 0,  "sequence_number": 0,  "created_at": "2019-08-24T14:15:22Z",  "delivery_date": "2019-08-24",  "status": "draft",  "collection_method": "automatic",  "payment_instructions": "string",  "currency": "string",  "consolidation_level": "none",  "product_name": "string",  "product_family_name": "string",  "role": "unset",  "seller": {    "name": "string",    "address": {      "street": null,      "line2": null,      "city": null,      "state": null,      "zip": null,      "country": null    },    "phone": "string",    "logo_url": "string"  },  "customer": {    "chargify_id": 0,    "first_name": "string",    "last_name": "string",    "organization": null,    "email": "string",    "vat_number": "string",    "reference": "string"  },  "memo": "string",  "billing_address": {    "street": null,    "line2": null,    "city": null,    "state": null,    "zip": null,    "country": null  },  "shipping_address": {    "street": null,    "line2": null,    "city": null,    "state": null,    "zip": null,    "country": null  },  "subtotal_amount": "string",  "discount_amount": "string",  "tax_amount": "string",  "total_amount": "string",  "credit_amount": "string",  "paid_amount": "string",  "refund_amount": "string",  "due_amount": "string",  "line_items": [    {      "uid": "string",      "title": "string",      "description": "string",      "quantity": "string",      "unit_price": "string",      "subtotal_amount": "string",      "discount_amount": "string",      "tax_amount": "string",      "tax_included": true,      "total_amount": "string",      "tiered_unit_price": true,      "period_range_start": "2019-08-24",      "period_range_end": "2019-08-24",      "transaction_id": 0,      "product_id": 0,      "product_version": 0,      "component_id": 0,      "price_point_id": 0,      "billing_schedule_item_id": 0,      "hide": true,      "component_cost_data": null,      "product_price_point_id": null,      "custom_item": true,      "kind": "string",      "prepaid_allocation_expires_at": "2019-08-24"    }  ],  "discounts": [    {      "uid": "string",      "title": "string",      "code": "string",      "source_type": "Coupon",      "discount_type": "percentage",      "eligible_amount": "string",      "discount_amount": "string",      "line_item_breakouts": [        {          "uid": "string",          "eligible_amount": "string",          "discount_amount": "string"        }      ]    }  ],  "taxes": [    {      "uid": "string",      "title": "string",      "source_type": "Tax",      "percentage": "string",      "taxable_amount": "string",      "tax_amount": "string",      "line_item_breakouts": [        {          "uid": "string",          "taxable_amount": "string",          "tax_amount": "string",          "tax_exempt_amount": "string"        }      ]    }  ],  "credits": [    {      "uid": "string",      "memo": "string",      "original_amount": "string",      "applied_amount": "string"    }  ],  "payments": [    {      "memo": "string",      "original_amount": "string",      "applied_amount": "string",      "prepayment": true    }  ],  "custom_fields": [    {      "owner_id": 0,      "owner_type": "Customer",      "name": "string",      "value": "string",      "metadatum_id": 0    }  ],  "public_url": "string",  "available_actions": {    "send_email": {      "can_execute": true,      "url": "string"    }  }}

Deliver Proforma Invoice POST

Delivers a proforma invoice programmatically via email. Supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. If `recipient_emails` is omitted, the system will fall back to the primary recipient derived from the invoice or subscription. At least one recipient must be present, either via the request body or via this default behavior, so an empty body may still succeed when defaults are available.

Preview Proforma Invoice POST

Previews the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. The preview endpoint is subject to all the same conditions as the proforma invoice endpoint. For example, previews are only available on the Relationship Invoicing architecture, and previews cannot be made for end-of-life subscriptions. If all the data returned in the preview is as expected, you may then create a static proforma invoice and send it to your customer. The data within a preview will not be saved and will not be accessible after the call is made. Alternatively, if you have some proforma invoices already, you may make a preview call to determine whether any billing information for the subscription's upcoming renewal has changed.