Learn how to Setup Xsolla
Donation Store supports Xsolla through the use of their Paystation product. To get started, you will need to add the Xsolla gateway to your store, then pass a number of "Webhook Tests" that Xsolla will perform. These are setup to pass correctly by Donation Store, once configured correctly.
Navigate to your "Project Settings" in Xsolla. Click "Webooks" on the top of the menu. In the "Webhook URL" input, put the following:
- If you are on Cloud: https://cloud.donationstore.io/ipn/xsolla
- If you are on Self Hosted: https://store.yourdomain.com/ipn/xsolla
Copy the Merchant ID, Project ID & Secret Key into the "Payments > Gateways" Xsolla option in the Donation Store Control Panel.
The final parameter you are missing is the "API Key". To get this, navigate back to the "Main Menu" in Xsolla, click your Project Name in the top left. Then click "Company Settings" and finally "API Keys" on the top of the menu. Copy this value into the "API Key" field in the Donation Store Control Panel Xsolla setup like you did with the above information. Then hit save.
Ensure that in Pay Station > Settings > Additional Settings Transaction external ID is disabled
Xsolla requires an integration to pass a variety of different tests before it can be activated. One of these tests is to test for an "Existing User" in the Control Panel. So before running the tests, you must create a manual payment in the panel (you can set the value to 0) for a given username. You can use any username, but maybe use yours so that you can remember it easily.
Once created, navigate back to "Project Settings" in your project, then "Webhooks" in the top menu. At the bottom you should see options for "Store" and "Checkout". Click "Checkout". It will offer a variety of inputs that you can provide. Enter the following:
- User ID - The username you used when creating the manual payment
- Xsolla Invoice ID - 1
- Amount - Any value, for example 10
- Currency - Your store's selected currency (ensure the currency set on your store is matching, i.e. don't choose a currency in Xsolla that is not supported by Donation Store)
- Invoice ID - 1
Then hit test. Once all of the tests pass, scroll back to the top. You will now see a "Test successfully completed. You can now enable Checkout." above the input fields. Click the "Checkout" link.
Click the checkout slider to the on position, then scroll to the bottom of the page and click "Save".
Your integration is now ready.
If you proceed with a payment in Xsolla on Donation Store and you now receive an error code "0002-0004" it now means your Xsolla agreement is not signed. Please continue to do this with Xsolla. Once that is complete, you will be ready to accept payments.
Any other error codes can be found here:https://developers.xsolla.com/doc/pay-station/references/errors-list/