Solidgate
Pingado reads trials, purchases and renewals from Solidgate Billing 2.0 webhooks, and links each one to the visitor who paid.
1. Add the webhook
Section titled “1. Add the webhook”- In Settings → Payment Providers, select Connect next to Solidgate. Pingado shows your webhook URL.
- In Solidgate Hub, go to Developers → Webhooks → Endpoints and select Create webhook endpoint. This is the Billing 2.0 endpoint list, not Channels.
- Paste the URL and select these events:
INVOICE_PAIDSUBSCRIPTION_CREATEDSUBSCRIPTION_ACTIVATEDSUBSCRIPTION_TRIAL_ACTIVATED
- Save, then activate the endpoint. Solidgate creates it inactive.
- Open the endpoint, copy its secret key (
wsec_…) and paste it into Pingado.
Pingado shows the connection as working once the first event arrives, when your next customer subscribes.
2. Pass the visitor ID through checkout
Section titled “2. Pass the visitor ID through checkout”Solidgate’s paid invoice carries no metadata of its own, so the visitor ID travels in the subscription’s metadata. Pingado reads it from the subscription events and gives it to the payment.
- Send the visitor ID from the browser when the customer starts checkout.
- Add it as
pg_vidto the metadata you send when you create the subscription, next to your own keys.
// In the browser, when the customer clicks your checkout buttonconst vid = window.pingado?.vid()await fetch('/api/checkout', { method: 'POST', body: JSON.stringify({ plan, vid }) })// On your server, in the subscription you create in Solidgateconst subscription = { customer_id: customerId, line_items: [{ product_price_id: priceId, quantity: 1 }], metadata: { ...yourMetadata, pg_vid: vid ?? '' },}Without the visitor ID, Pingado links a payment to an earlier lead with the same email. The visitor ID is more reliable: it also works when the customer pays with another email than the one they signed up with.
How Solidgate events become conversions
Section titled “How Solidgate events become conversions”| Solidgate event | Conversion |
|---|---|
SUBSCRIPTION_TRIAL_ACTIVATED, subscription in trial |
Trial started |
INVOICE_PAID, first invoice of a subscription (SUBSCRIPTION_CREATE) |
Purchase |
INVOICE_PAID, first charge after a trial |
Purchase |
INVOICE_PAID, later invoices |
Renewal |
INVOICE_PAID, invoice that charged nothing (a free trial’s first invoice) |
Not counted |
SUBSCRIPTION_CREATED, SUBSCRIPTION_ACTIVATED |
No conversion: Pingado reads the visitor ID from them |
Values are recorded without tax, after discounts. Customer, payment instrument and draft or open invoice events are ignored.
Refunds are not recorded: Billing 2.0 webhooks have no refund event.