Create signup proforma preview
Creates a signup preview in the format of a proforma invoice to preview costs before a subscription's signup. This endpoint is only available for Relationship Invoicing sites and cannot be used to create consolidated proforma invoice previews or preview prepaid subscriptions. You have the option of previewing the first renewal's costs as well. The proforma invoice preview will not be persisted.
Pass a payload that resembles a subscription create or signup preview request. For example, you can specify components, coupons/a referral, offers, custom pricing, and an existing customer or payment profile to populate a shipping or billing address.
A product and customer first name, last name, and email are the minimum requirements.
Authorization
BasicAuth The username is a Maxio Chargify API key. The password is x.
In: header
Query Parameters
Choose to include a proforma invoice preview for the first renewal. Use in query include=next_proforma_invoice.
Value in
- "next_proforma_invoice"
Request Body
application/json
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/subscriptions/proforma_invoices/preview.json" \ -H "Content-Type: application/json" \ -d '{ "subscription": { "product_handle": "gold-plan", "customer_attributes": { "first_name": "first", "last_name": "last", "email": "flast@example.com" } } }'{ "proforma_invoice_preview": { "current_proforma_invoice": { "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" } } }, "next_proforma_invoice": { "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" } } } }}Create signup proforma invoice POST
Creates a proforma invoice to preview costs before a subscription's signup. This endpoint is only available for Relationship Invoicing sites and cannot be used to create consolidated proforma invoices or preview prepaid subscriptions. Like other proforma invoices, it can be emailed to the customer, voided, and publicly viewed on the chargifypay domain. Pass a payload that resembles a subscription create or signup preview request. For example, you can specify components, coupons/a referral, offers, custom pricing, and an existing customer or payment profile to populate a shipping or billing address. A product and customer first name, last name, and email are the minimum requirements. We recommend associating the proforma invoice with a customer_id to easily find their proforma invoices, since the subscription_id will always be blank.
List Segments for a Price Point GET
Lists segments created for a given price point, in order of creation. You can pass `page` and `per_page` parameters in order to access all of the segments. By default it will return `30` records. You can set `per_page` to `200` at most. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax.