💸Setting up the tebex api
Last updated
Last updated
To begin with the integration of Tebex payments
, you will need to have an account. Remember, using Discord is more advisable for the software. Once you have your Tebex services
, look for and enter 'Integrations' > 'API Keys'
.
You will need to have a 'Public Token'
which you should copy and paste into.
Once you've pasted the public token
, enable the option for tebex_payment
, which will enable purchases in your software and allow the Tebex
API-related tabs like 'basket and product'
to be enabled and function correctly. In case it's enabled and the public token doesn't work, it will cause issues in the software. Before making it public, verify that it works.
What is 'TEBEX_PAYMENT_RETURN'
and how does it work or what functions does it contain? This function simply returns the user to a designated site, in this case, your site, once they complete the purchase. It specifically returns them to the completed purchase section where they will be congratulated for the purchase. Also, if it is disabled, the user can return by clicking on a button called 'Return to Site'
, which will take them to the designated URL
. You can decide whether to enable it ('true
') or simply disable it ('false
').
Let's proceed to have Tebex send responses
upon completing a purchase. To do this, we'll utilize the webhook
feature offered by Tebex.
First, let's locate:
Now, simply click on 'Setup webhooks'
Copy the secret key and navigate to your config.php
file. Search for:
And paste the secret into 'PUT_YOUR_SECRET'
Now, return to Tebex and click on the 'Add EndPoint'
button. In the endpoint URL, simply place our site URL and append '/parent/tebex/webhook.php'
Example:
Click on the 'Payment Completed'
checkbox and then the 'Add'
button.
Is it indicating that you need to validate?
For example:
The secret key in config.php is incorrect. (Verify it correctly.)
The endpoint URL was not found.
Your website is blocking external requests.
Have you addressed all three options? Click on validate, and if everything is correct, you simply won't see anything other than 'Edit, Delete' buttons.
Done.
Regards, Vuhp