Overview
The "Order" entity closely resembles the existing "Invoice" entity, primarily serving as a key component in the hosted checkout process where all payments result in the creation of an order.
Through the Order creation at the hosted checkout, users gain the ability to apply various types of coupons, including trial coupons, when paying for one-time product charges (provided the payment link allows coupon usage). Additionally, the Order entity takes on the responsibility of consolidating both recurring and one-time product charges in one entity.
Within the platform interface, users can create, edit, delete, list, cancel, and pay for Orders. While much of the structure resembles that of an Invoice, there are some distinct actions a tenant user can perform using an Order that Invoices cannot accommodate, such as:
- On an Order, users can add both recurring and one-time product charges.
- Adding a recurring product to an Order generates a Subscription for that charge.
- Adding a one-time product charge to the Order allows the user to choose whether it should generate an Invoice or not.
- If both recurring and one-time products are added to the Order, users must pay separately for these charges. This separation is due to the system's discretion in creating Invoices for different types of product charges. For instance, a customer might want to purchase both recurring and one-time products in a single Order. Additionally, users have the option to prevent the system from generating an Invoice for one-time products. In such cases, the system will create a Subscription for the recurring product, leading to the creation of Invoices for that recurring charge, while the one-time charge may remain without an associated Invoice.
- There are six different scenarios for Order payments:
- When only one-time products are added, and the user opts not to generate Invoices.
- The Order requires payment.
- The Order is marked as "Paid" upon payment.
- The Order balance matches the total amount to be paid.
- Only the Order is created.
- When only one-time products are added, and the user chooses to generate an Invoice:
- Payment is not directly applied to the Order but to the Invoice.
- The Order is marked as "Paid" upon Invoice payment.
- The Order balance becomes zero.
- Both Order and Invoice are created.
- When only recurring products are added:
- Payment is not directly applied to the Order but to an Invoice from the Subscription.
- The Order is marked as "Paid" when the first Invoice from the Subscription, created by the Order, is paid.
- The Order balance becomes zero.
- Both Order and Subscription are created, and the Subscription generates an Invoice.
- When both recurring and one-time products are added, and the user opts not to generate Invoices:
- The portion of the Order related to one-time product charges must be paid.
- The Order balance equals the sum of all one-time product charges.
- The Order is marked as "Paid" when the Invoice from the Subscription, created by the Order, is paid along with the payment for the Order balance (one-time product charges).
- Both Order and Subscription are created, and the Subscription generates an Invoice.
- When both recurring and one-time products are added, and the user chooses to generate Invoices:
- Payment is not directly applied to the Order but to the Invoice for one-time charges and the Invoice from the Subscription.
- The Order balance becomes zero.
- The Order is marked as "Paid" when both the recurring and one-time Invoices are paid.
- Order, Invoice, and Subscription are created, and the Subscription generates an Invoice.
- In cases with no products, such as a "Price-only" payment link:
- The Order must be paid.
- The Order balance matches the total amount to be paid.
- Only the Order is created.
- The Order is marked as "Paid" upon payment.
- When only one-time products are added, and the user opts not to generate Invoices.
Billing options will be uniform for all entities created from an Order and Users will have the flexibility to apply trial coupons and other coupons containing trial components to all types of Product Prices, including one-time.
Possible status for an Order
- Draft: These are Orders initiated by administrators but left incomplete, they can be edited later on and/or deleted.
- Open: Open Orders include those that haven't been paid for yet. This status also encompasses Orders with an "Open" Invoice and Orders linked to an "Unpaid" Subscription where the Invoice remains "Open."
- Paid: Orders in this category have been completely settled. This includes Orders directly paid, associated Invoices that have been paid, and Invoices from linked Subscriptions that have been paid.
- Past due: Orders falling under this status still have outstanding payments that are overdue. This includes Orders that were meant to be directly paid but remain unpaid past their due date, Invoices directly linked to Orders with a "Past due" status, and Subscriptions linked to Orders with Invoices marked as "Past due".
- Void: Orders don't transition to this status automatically; they must be manually voided. Voiding an Order also voids linked Invoices and cancels linked Subscriptions. Only Orders without any direct or indirect payments can be voided.
- Trialing: Orders with this status indicate that the products (whether recurring or not) are currently in a trial period.
- Canceled: Orders need to be manually canceled. No payments are required for canceled Orders.Abandoned: This status applies when the payment process for an Order was initiated at the hosted checkout but left incomplete, indicating abandonment. It does not include when a Customer generates a PIX code or bank slip and does not pay for it or when a Credit Card payment is denied. It means that the Customer has passed through the "Personal Information" step at the hosted checkout but has not completed the "Payment" step and has left the page.
Updated 6 months ago