How can I programmatically sell a Membership and create the Membership instance after payment?

Hi,

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:

makeMembershipPaymentV2(membershipId, clientId, startDate, sign)

However, I cannot find this method documented in the official API documentation or API Explorer.

Could you please clarify:

  1. Is makeMembershipPaymentV2 currently supported for third-party/custom integrations?
  2. If yes, how should the sign parameter be generated?
  3. Does this method initiate the SimplyBook payment process/Stripe checkout?
  4. After successful payment, what API method creates the Membership instance for the client?
  5. Is there a webhook/event that reliably confirms a Membership purchase?
  6. If a client purchases the same Membership multiple times, does each purchase create a separate Membership instance and credit balance?
  7. If a client has multiple Memberships covering the same service, how does book() determine which Membership credit to use?

I want to confirm the officially supported API flow before implementing the integration.

Thank you!

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