MugglePay Docs
  • 🇺🇸Readme
  • 🇭🇰Readme-zh
  • API Status
    • Authentication
    • HTTP Response and Error Codes
    • Order Status
  • FAQs
    • Customer FAQ
    • Get started
    • Merchant FAQ
    • API Overview
    • 客户常见问题解答
  • API Order
    • Cancel Order
    • Checkout Order
    • Create Order
    • Get Order
    • Get Orders
    • Payment Callback (Webhook)
    • Refund
    • AI Prompts (Cursor, Lovable, Bolt etc)
  • Self-managed (Non-Custodian)
  • Media Kit
Powered by GitBook
On this page
  • Before Start
  • Prompts for AI:
  • Advanced Prompts for AI:
  1. API Order

AI Prompts (Cursor, Lovable, Bolt etc)

PreviousRefundNextSelf-managed (Non-Custodian)

Last updated 1 month ago

Before Start

  1. Register account with email / web3 address from

  2. Get server API Keys

Prompts for AI:

Create Order with the price

curl -X POST \
  https://api.mugglepay.com/v1/orders \
  -H 'content-type: application/json' \
  -H 'token: API_TOKEN_GET_FROM_ADMIN_PORTAL' \
  -d '{
  "merchant_order_id": 100388,
  "title": "Grand AI Services fee",
  "price_amount": 10,
  "price_currency": "USD"
}'    
Response Format 

{
    "status": 201,
    "order": {
    },
    "payment_url": "https://invoice.mugglepay.com/invoices?id=94be2b2a-2905-4857-b701-b04e57e84593"
}

Redirect the page to the payment_url. If the user finishes payments, it will shows the payment success.

Advanced Prompts for AI:

If you are familar with the callback, add the callback_url

curl -X POST \
  https://api.mugglepay.com/v1/orders \
  -H 'content-type: application/json' \
  -H 'token: API_TOKEN_GET_FROM_ADMIN_PORTAL' \
  -d '{
     merchant_order_id: '503a854998-6230-4338-adb7',
     title: "Monthly Program x 1",
     description: "Gaming for your family",
     price_amount: 1,
     price_currency: 'USD',
     pay_currency: 'USDT_ARBI',
     callback_url: "https://ecards.com/api/success",
     cancel_url: "https://ecards.com/ecardstatus?status=cancel",
     success_url: "https://ecards.com/ecardstatus?status=success",
}'

For the supported tokens:

it's the field pay_currency. pay_currency is optinal. If it's not set, user can select manually. Here are the supported pay_currency, and we support most of the stablecoins like USDT, USDC on Arbitrum, Solana, Base https://docs.mugglepay.com/order/createorder

For the callback:

If the payment is success, it will trigger a callback to your callback_url with the body info. Check this callback doc for more.

https://merchants.mugglepay.com/
https://docs.mugglepay.com/order/paymentcallback