I’m building a custom frontend integration with SimplyBook and want SimplyBook to remain the source of truth for memberships, payments, credits, and bookings.
I found the following method in the live JSON-RPC API schema:
Hello,
this method is internal and is marked as deprecated, so I wouldn’t recommend using it.
We don’t have any suitable method in JSON-RPC API; you could consider using public REST API, POST /public/invoice/add-membership/id/{id}
Take into account that membership invoice must be paid in order for membership instance to be created before you can use it in a booking.
After successful payment, what API method creates the Membership instance for the client
The membership record isn’t created by this method at all. It’s only inserted once the generated invoice is confirmed paid. That happens internally
Is there a webhook/event that reliably confirms a Membership purchase
No specific event for a membership — but you can track when the invoice is paid, that would mean membership is created
If a client purchases the same Membership multiple times, does each purchase create a separate Membership instance and credit balance
Yes, they will be completely independent (although recurring memberships are also supported)
how does book() determine which Membership credit to use
it doesn’t determine it automatically — you pass it as “client_membership_id” element of $additional parameter of book(), and you can take possible values from getClientMembershipList — but not purchase a new one via JSON-RPC API
If this flow (purchase a membership - pay for it - book) doesn’t suit you, you could use admin REST API method POST /admin/memberships/make-membership-instance — it all depends on how you are building your app