The Flexprice–Whop integration is bidirectional and fully asynchronous. Invoice creation and finalization in Flexprice are never blocked by Whop sync.Documentation Index
Fetch the complete documentation index at: https://docs.flexprice.io/llms.txt
Use this file to discover all available pages before exploring further.
- Whop to Flexprice: When a customer pays through Whop, Flexprice is notified and marks the invoice paid automatically.
- Flexprice to Whop: Finalized invoices are pushed to Whop with one of two collection methods:
- Send Invoice (default): Customer receives a hosted checkout link and pays on their own timeline.
- Charge Automatically: After the first payment, subsequent invoices are charged automatically using the saved payment method.
Pushing Invoices to Whop
Every finalized Flexprice invoice is automatically pushed to Whop. This applies to all invoice types: subscription billing, one-off invoices, and credit topup invoices. Conditions for sync:- Invoice status transitions to finalized
- Whop connection is active
- Invoice Sync toggle is enabled on the connection
| Field | Value |
|---|---|
| Product | From connection config, or auto-created Flexprice Billing Product |
| Plan type | one_time |
| Amount | Invoice amount_due, rounded to 2 decimal places |
| Collection method | send_invoice or charge_automatically (see Charge Automatically) |
| Payment method | Only set when using charge_automatically; omitted otherwise |
| Due date | Invoice due date if in the future; defaults to 30 days from now |
| Customer name | Customer name from Flexprice |
| Customer email from Flexprice |
After the Whop invoice is created, Flexprice fetches the hosted checkout URL and stores it under
invoice.metadata["whop_checkout_url"]. Share this link with your customer for payment.Flexprice Billing Product (visibility: quick_link). Its ID is stored on the connection and reused for all future invoices.
Charge Automatically
For returning customers, Flexprice skips the checkout link and charges their saved payment method directly. First invoice: Customer receives a hosted checkout link and pays through Whop. All subsequent invoices: Whop charges the saved payment method automatically. No action required from the customer. If no saved payment method is found (e.g. customer has not paid through Whop before), the invoice falls back to a hosted checkout link.Reconciling Payments from Whop
On payment through Whop, aninvoice.paid webhook is fired to Flexprice. Flexprice identifies the corresponding invoice and, if not already paid, marks the payment status as succeeded.
For credit topup invoices, the customer’s wallet is credited immediately on reconciliation.
Marking an Invoice Paid Offline
When a Flexprice invoice is marked paid via an admin action or an offline payment, Flexprice automatically marks the corresponding Whop invoice as paid. If the Whop invoice is already paid, the call is skipped.Troubleshooting
| Scenario | Behavior |
|---|---|
| No Whop connection configured | Sync skipped silently |
| Invoice sync toggle off | Sync skipped silently |
| Customer has no email address | Sync fails immediately. Add an email to the customer and re-sync |
| Invoice already synced to Whop | Skipped; duplicate creation is prevented |
| Whop invoice already paid | Skipped; duplicate mark-paid call is prevented |
| First-time customer with no Whop payment history | Falls back to hosted checkout link |
| Customer has no saved payment methods | Falls back to hosted checkout link |
| Payment method fetch fails | Falls back to hosted checkout link; Whop API errors are retried with backoff |
| Whop API temporarily unavailable | Retried automatically with backoff |
Whop sync failures never block invoice creation or finalization in Flexprice. All sync happens asynchronously.
Related Documentation
- Connection Setup: Set up your Whop connection and configure the webhook

