Solidgate Docs
Sign in

Integrate invoicing

Configure API access, create products and customers, issue invoices, process payments, and handle webhook events to integrate Solidgate invoicing

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:

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 SolidgateAPI 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 SolidgateAPI 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 SolidgateAPI v2.

Step 5. Create invoice

Create an invoice in draft status, update it with checkout data, then finalize it to prepare for payment.

Key information

  • An invoice can include one or more one-time product line items. Set the quantity on each item to match the number of units purchased.
  • 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.
  • Each invoice requires a unique merchant_reference within the channel. Use it to match invoices to records in your own system.

Update invoice

Update a draft invoice when checkout data changes, such as the customer address, coupon, quantity, or identity fields.


Step 6. Pay invoice

Handle 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.

Invoice events

EventDescription
INVOICE_CREATEDAn invoice was created.

Invoice createdWebhook
INVOICE_UPDATEDAn invoice was modified.

Invoice updatedWebhook
INVOICE_FINALIZEDAn invoice moved from draft to open.

Invoice finalizedWebhook
INVOICE_PAIDPayment was authorized and the purchase can be activated.

Invoice paidWebhook
INVOICE_PAYMENT_FAILEDA payment attempt was declined.

Invoice payment failedWebhook
INVOICE_DUNNING_STARTEDDunning started.

Invoice dunning startedWebhook
INVOICE_UNPAIDThe invoice was unpaid.

Invoice unpaidWebhook
INVOICE_VOIDEDThe invoice was canceled or expired.

Invoice voidedWebhook
INVOICE_DELETEDThe invoice was deleted.

Invoice deletedWebhook
INVOICE_FINALIZATION_FAILEDFinalization was rejected due to missing required data.

Invoice finalization failedWebhook

Every successful charge, whether it is the subscription’s first payment or a later renewal, triggers INVOICE_PAID. Use the billing_reason field in the event payload to identify the charge reason:

  • billing_reason is subscription_create for a subscription’s first (activation) invoice.
  • billing_reason is subscription_cycle for a renewal invoice.
  • billing_reason is manual for a manually created invoice.

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.

StatusAPI endpointWebhookResulting status
DRAFTDelete invoiceAPI v2Invoice deletedWebhook(Deleted)
DRAFTFinalize invoiceAPI v2Invoice finalization failedWebhookDRAFT
DRAFTFinalize invoiceAPI v2Invoice finalizedWebhookOPEN
OPENPay invoiceAPI v2Invoice payment failedWebhookOPEN
OPENPay invoiceAPI v2Invoice paidWebhookPAID
OPENVoid invoiceAPI v2Invoice voidedWebhookVOIDED
OPENPart of dunning processInvoice dunning startedWebhookDUNNING
DUNNINGPart of dunning processInvoice paidWebhookPAID
DUNNINGVoid invoiceAPI v2Invoice voidedWebhookVOIDED
DUNNINGPart of dunning processInvoice unpaidWebhookUNPAID
Looking for help? Contact us
Stay informed with Changelog