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. 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. Whenever a payment is succeeded, credit that customer’s wallet exactly once, keyed on the payment id so re-polling never credits the same payment twice.