Skip to main content
Ask Hercules to set up Hercules Commerce and integrate it into your app. Use the example prompts below to get started.

SaaS

Ecommerce

Events & Tickets

Digital Products

Services & Consultations

Donations

Membership Communities

Track payments and subscriptions from the API

The Get Customer endpoint can return a customer’s subscriptions, invoices, and payments (with refunds, payment methods, entitlements, and balance) when you pass the expand query parameter. The typed Commerce SDK hides these fields, so read them from the endpoint response. There are no payment webhooks yet, so poll the endpoint to stay in sync. A fully discounted order (for example, a 100% promotion code) creates no payment, so it never appears here. To credit one-time purchases reliably, ask Hercules to confirm each checkout (the payment page your customer completes) from your app’s server instead. To build this, paste this prompt to your app’s Hercules agent:
Read each customer’s payments and subscriptions from the Commerce Get Customer endpoint using the expand detail. There are no payment webhooks yet, so poll on an interval. For credits or other one-time purchases, do not credit from payments: store each checkout session ID when checkout starts, verify it from the backend, and credit that customer’s wallet exactly once per checkout session.