Set up webhooks

  1. Go to Project settings > Webhooks and specify the webhook URL.
  2. Test webhooks:
    1. Open the Subscriptions tab.

    1. Enter information about the test purchase:
      • User ID
      • Xsolla Invoice ID
      • Amount
      • Currency
      • Plan ID
      • Subscription product (optional)
      • Invoice ID
      • Trial period

    1. Click Test.
    2. Make sure you received a message that the test was successful. If a test fails, check the errors that occured and fix them.

Note
The webhooks workflow with the processing examples is fully described in the API reference.

  1. Test the subscription purchase flow:
    1. Switch the Enable Subscription module toggle to On.

Note
Note that after you enable this toggle, all subscriptions will be available for purchase on your live site.

    1. Open the sandbox mode via the link below and purchase a subscription with your real or test bank card.

Note
To test a subscription that has a trial period, use a real card and real payment. Test cards are available if the trial period is 0 days as you can’t create a payment account in the test environment.
Was this article helpful?
Thank you!
Is there anything we can improve? Message
We're sorry to hear that
Please explain why this article wasn't helpful to you. Message
Thank you for your feedback!
We'll review your message and use it to help us improve your experience.

Continue reading