# Discord Bot

This integration lets you connect OxaPay with Discord using Make. By combining OxaPay’s payment and invoicing system with Discord bots or channels, you can automate payment alerts and order confirmations. It also enables real-time user interactions for a smoother and faster payment experience.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2F6X3iTK8bvamivWtipFYL%2F3.png?alt=media&#x26;token=36fcf80f-7796-4bbf-a210-fe8a9e23c1ef" alt=""><figcaption></figcaption></figure></div>

Using **OxaPay** and **Discord** together on **Make**, you can:

* Trigger real-time Discord alerts when a transaction is confirmed
* Create OxaPay invoices and send payment links automatically via Discord DM or channel
* Fulfill digital orders instantly (e.g., license keys, access links, roles) after successful payment
* Send reminder messages for pending invoices and notify users of failed or expired payments

### Example Automation Scenarios

{% stepper %}
{% step %}

#### **Scenario 1:** Customer Payment Confirmation Flow

When OxaPay marks a transaction as **Paid**, Make sends a personalized Discord DM to the customer with payment details, order ID, and next-step instructions.
{% endstep %}

{% step %}

#### **Scenario 2:** High Value Transaction Monitoring

If a payment exceeds a defined amount, an alert is posted instantly in a private Discord staff channel so admins can review and process priority orders faster.
{% endstep %}

{% step %}

#### **Scenario 3:** Invoice Reminder & Status Updates

After an invoice is created in OxaPay, the payment link is sent to the customer on Discord, followed by automatic reminders before expiry and a final status update (Paid/Expired/Failed).
{% endstep %}

{% step %}

#### **Scenario 4:** Digital Delivery After Verification

Once payment is confirmed, Make triggers automatic delivery of digital products (license key, download link, or access role) through Discord without manual intervention.
{% endstep %}
{% endstepper %}

### Discord Payment Bot with OxaPay Scenario

This scenario builds a Discord payment bot integrated with OxaPay through Make, allowing merchants to create payment requests directly inside Discord. With simple bot actions, users can generate invoice links, white-label payment addresses, and receive instant Discord notifications when a payment is confirmed.&#x20;

**You can download the scenario blueprint file below:**

{% file src="<https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2Fz61jkPZUhCPeyCV7CWmp%2FOxaPay%20Discord%20Bot.blueprint.json?alt=media&token=379d9908-d268-479b-9b16-dc58c0682654>" %}

### **Before starting, make sure you have:**

* An active OxaPay account with API access
* A **Discord bot token** created in the Discord Developer Portal
* A Make account with access to Data Store

### How to build and configure this **Discord** payment bot using **Make**?

1. After logging in to your Discord account, go to [**https://discord.com/developers/applications**](https://discord.com/developers/applications). Click **New Application**, enter your desired application name, and then click **Create**.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2Fa9JzEwhfAT2wzfN88Q1O%2FScreenshot%20(160).png?alt=media&#x26;token=b96c70b2-ad84-438d-980f-86a7231f469f" alt=""><figcaption></figcaption></figure></div>

2. After creating the application, click **Bot** in the left sidebar. In the bot settings, under **Privileged Gateway Intents**, enable **Message Content Intent**, then click **Save Changes**.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2F1oqkpON4QjPpGPxW1yts%2FScreenshot%20(194).png?alt=media&#x26;token=cbeb71fa-cd5c-49bd-8a91-8c72fa48d4c8" alt=""><figcaption></figcaption></figure></div>

3. On the same **Bot** page, go to **Token** section and copy your bot token. If the token is not visible, click **Reset Token** to generate and reveal a new one, then copy it immediately. Keep this token secure and never share it.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2FonGEvmAQNARLSIYdtott%2FScreenshot%20(195).png?alt=media&#x26;token=3d91a16c-40f4-4c3a-a309-e08d8a3c54a8" alt=""><figcaption></figcaption></figure></div>

4. In the left sidebar, click **Installation**. Under **Default Install Settings → Guild Install**, open **Scopes** and add **bot**. Then, in **Permissions**, select **Administrator**, and click **Save Changes**.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2F8K1eH9pfMxaSNBOg5IIb%2FScreenshot%20(197).png?alt=media&#x26;token=5a74ded4-46c2-4681-9e2f-43a44cbfbb25" alt=""><figcaption></figcaption></figure></div>

5. Use the generated **Install Link** to install your application on the target Discord server. Select the server, review the requested permissions, and click **Authorize**.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2FuVBLNPm3TKH7X22L1UvH%2FScreenshot%20(198).png?alt=media&#x26;token=3f194aaf-493d-48b6-a191-54ab4850736b" alt=""><figcaption></figcaption></figure></div>

6. In your Make dashboard, click **Create a new scenario** to start building the automation flow.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2F8r5RkJ6Rf49S6YqH75g2%2Fimage.png?alt=media&#x26;token=12c541bb-ca3f-4f30-a247-f53c34d1aa9d" alt=""><figcaption></figcaption></figure></div>

7. In the top-right corner, click the three-dot menu, then choose "**Import blueprint"** and upload the downloaded scenario file.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2Ffvuirlj3z3vaDrr11yV7%2Fimage.png?alt=media&#x26;token=209603a3-7826-4b99-b9f7-4fc9190c4e88" alt=""><figcaption></figcaption></figure></div>

8. Once the scenario canvas opens, add a **Discord** module and click it to configure. In the configuration window, click **Create a connection.**

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2FQVDpKOEjZcgYm4P2IElW%2FScreenshot%20(201).png?alt=media&#x26;token=2e0fc01e-492f-4cda-93ba-7dbefe88c22b" alt=""><figcaption></figcaption></figure></div>

9. In the window that opens, enable **Advanced Settings**. Enter your bot token, then under **Bot Permissions**, click **Select All** and press **Save**. On the authorization page, choose your target server and click **Authorize**.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2FP7VitJEWXKDppdGyeu3N%2FScreenshot%20(203).png?alt=media&#x26;token=62b77507-3da9-46a2-afc7-ca072ff883b5" alt=""><figcaption></figcaption></figure></div>

10. Now, click on each **module** one by one and complete the required **connection** and configuration steps.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2FxxUbj1qKimKWieFRhgp5%2FScreenshot%20(206).png?alt=media&#x26;token=8c18f268-c23f-4ae6-995d-552df008a8fc" alt=""><figcaption></figcaption></figure></div>

11. In the "**Data Store**" module, you need to connect it to a database with the following structure.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2FoRn9tHVAIqEKV0Ca5HY9%2FScreenshot%20(205).png?alt=media&#x26;token=e1af9531-cca9-4802-9c94-e56f9ff1ab99" alt=""><figcaption></figcaption></figure></div>

12. After configuring all modules, click **Save** to store the scenario. Then open the **Webhooks** module, copy the webhook URL, and keep this address. (you’ll need it in the next steps)

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2F7URCPjVWKR8dApSfB68F%2FScreenshot%20(100).png?alt=media&#x26;token=36f29d55-b370-466c-8cc6-5036d9a296f0" alt=""><figcaption></figcaption></figure></div>

13. Deploy the Python script on an active server. Before running it, replace:

    * `YOUR_DISCORD_BOT_TOKEN` with your actual Discord bot token
    * `YOUR_MAKE_WEBHOOK_URL` with your Make webhook URL

    For security, keep both values private and load them from environment variables instead of hardcoding them in the script.

{% file src="<https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2FQ5xCQqpCxUSTlEjQtbd0%2FDiscord%20Bot.py?alt=media&token=84f92150-1222-4d89-8771-ee87485eebe6>" %}

14. Whenever you want to create a new payment, simply send a message containing keywords like “**OxaPay**”, “**Invoice**”, or “**Crypto**” in a channel where the bot is active. The bot will automatically trigger and run the payment workflow.
15. For real-time payment status notifications, create a separate scenario and import the blueprint file below into a new scenario.

{% file src="<https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2Fjl82IIEBqUSwVeb5I2OE%2FDiscord%20Payment%20Webhook.blueprint.json?alt=media&token=5fd055db-d116-4f10-bb97-3bbf674089ca>" %}

16. In the "**Data Store**" module in this scenario, you need to connect it to a database with the following structure.

<div data-with-frame="true"><figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2Fn5X8DKd9TTR3eUWF3rlA%2Fimage.png?alt=media&#x26;token=a863f79d-044b-43c6-8530-c0e553d193c8" alt=""><figcaption></figcaption></figure></div>

17. Once all modules are configured, copy the webhook URL from the "**Watch Payment Webhook**" module and add it to the Callback URL of all OxaPay modules that create invoices or payment requests in the previous scenario. Finally, save and activate the scenario.

<figure><img src="https://2150865118-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cdQgWk1yvwE7MR49PSn%2Fuploads%2FBjW0UHhNDzA25xt5mkZN%2FScreenshot%20(208).png?alt=media&#x26;token=5b862ba8-d8e3-454b-ad49-af93f9dd0380" alt=""><figcaption></figcaption></figure>

### Conclusion and Next Steps

**With these two Make scenarios configured, you now have a fully functional Discord payment bot powered by OxaPay:**

* **Scenario 1** manages user interaction in Discord and creates payment invoices through OxaPay.
* **Scenario 2** listens for real-time OxaPay webhook updates and automatically posts payment status notifications in Discord.

#### **This setup can be extended even further by:**

* **Automatically delivering digital products or access credentials** after a successful payment confirmation
* **Recording transactions in external systems** such as Google Sheets, Airtable, or your CRM for reporting and reconciliation
* **Implementing retry and fallback logic** for expired, underpaid, or failed invoices to improve payment recovery rates

By combining **OxaPay, Discord, and Make**, you can build flexible, scalable crypto payment automations without writing custom backend code.<br>
