Solidgate invoicing handles one-time charges from creation to settlement in Billing 2.0. Configure products, prices, and customers once, then issue invoices. Set up webhook handling to track every status change.
Step 1. Get API credentials
To use the Solidgate API, you need API keys. Get your keys before proceeding with the integration:
- Solidgate API v1 keys: for products and prices
- Solidgate API v2 keys: for customers and invoices
Step 2. Create product
A product represents the goods or services you offer. Create a product before issuing an invoice. Products are shared across Billing 1.0 and Billing 2.0. You can create and manage products in the Hub or through the Solidgate API v1 .
Step 3. Create price
A price defines the cost of a product. Create a price before issuing an invoice. Prices are shared across Billing 1.0 and Billing 2.0. You can create and manage prices in the Hub or through the Solidgate API v1 .
Step 4. Create customer
An invoice requires a customer record to identify who is being charged.
A customer can be an existing record or created specifically for the invoice. You can create and manage customers in the Hub or through the Solidgate API v2 .
Step 5. Create invoice
Create an invoice in draft status, update it with checkout data, then finalize it to prepare for payment.
To create an invoice
- Go to Billing > Billing 2.0 > Invoices.
- Click on Create invoice.
- Select a Customer from the dropdown.
- Set the Due date for invoice payment.
- Optionally, select a Coupon to apply a discount.
- Select a Channel.
- Optionally, add a Note.
- Select a Currency value from the dropdown.
- In the line item section, select a Product, its Price, and set the Quantity.
- Click on Save to add the line item.
- Click on Create invoice.
Key information
- An invoice contains one product line item. Set the quantity to match the number of units purchased.
- Only one-time products can be added to an invoice.
- All monetary values are in minor units (cents). For example, 20000 represents $200.00.
- Tax is zero at creation if no address is present. Tax is calculated when you add an address to the invoice.
- Only draft invoices can be modified. After finalization, the invoice cannot be edited.
Update invoice
Update a draft invoice when checkout data changes, such as the customer address, coupon, quantity, or identity fields.
- Go to Billing > Billing 2.0 > Invoices.
- Click on the invoice ID to open the details page.
- Use the Edit buttons next to Customer, Billing address, or Items to modify the relevant fields and save changes as you make them.
Customer data is captured at finalization. If you update a customer record after an invoice is created, the change does not affect that invoice. You can update customer data through the invoice update endpoint. This changes only the data on that invoice and does not modify the customer object.
For finalization to succeed, the customer details on the invoice must include email, first name, last name, IP address, and at least a country in the address.
Step 6. Pay invoice
Payment Form
To collect payment through the Solidgate Payment Form, generate a payment intent and pass the invoice_id to link the charge to the invoice. Pass the invoice in DRAFT status. Do not finalize it first. The Payment Form updates the invoice with the customer's address and finalizes it automatically when the customer proceeds to pay.
Handle post-payment events
To track the invoice lifecycle and get updates about its status, subscribe to invoice-related webhook events. Solidgate sends an INVOICE_PAID event when payment completes. Listen for this event to trigger fulfillment.
- Go to Developers > Webhooks.
- Create an endpoint pointing to your server.
- Copy the signing secret ( wsec_… ) issued for your endpoint.
Invoice events
| Event | Description |
|---|---|
| INVOICE_CREATED | An invoice was created. Invoice created Webhook |
| INVOICE_UPDATED | An invoice was modified. Invoice updated Webhook |
| INVOICE_FINALIZED | An invoice moved from draft to open. Invoice finalized Webhook |
| INVOICE_PAID | Payment was captured: the primary signal for activating a purchase. Invoice paid Webhook |
| INVOICE_PAYMENT_FAILED | A payment attempt was declined. Invoice payment failed Webhook |
| INVOICE_PAYMENT_REFUNDED | A refund was issued. Invoice payment refunded Webhook |
| INVOICE_VOIDED | The invoice was canceled or expired. Invoice voided Webhook |
| INVOICE_DELETED | The invoice was deleted. Invoice deleted Webhook |
| INVOICE_FINALIZATION_FAILED | Finalization was rejected due to missing required data. Invoice finalization failed Webhook |
To receive events for customers, payment instruments, and payments from Billing 1.0, subscribe to the corresponding event types as well.
Invoice status transitions
Each action on an invoice triggers a status change and a corresponding webhook event. Your integration receives the outcome through the webhook with the corresponding status.
| Status | API endpoint | Webhook | Resulting status |
|---|---|---|---|
| DRAFT | Delete invoice API v2 | Invoice deleted Webhook | (Deleted) |
| DRAFT | Finalize invoice API v2 | Invoice finalization failed Webhook | DRAFT |
| DRAFT | Finalize invoice API v2 | Invoice finalized Webhook | OPEN |
| OPEN | Pay invoice API v2 | Invoice payment failed Webhook | OPEN |
| OPEN | Pay invoice API v2 | Invoice paid Webhook | PAID |
| OPEN | Void invoice API v2 | Invoice voided Webhook | VOIDED |