Skip to main content
This guide will show you how to create a Payment Request on Busha. Use this feature to easily collect payments from your customers in both crypto and fiat, simplifying your payment process.
What You’ll Achieve:
  1. Create payment requests that generate crypto payment addresses
  2. Handle common errors when creating requests
  3. Learn the different essential parameters of a payment request

Prerequisites

Before you begin, ensure you have:
  • A Busha Business Account and Public API Key.
  • An understanding of API Environments (Sandbox vs. Production) and their base URLs (from the Make Your First Request Guide).
Important Note: Payment Requests use your Public API Key, not your Secret API Key, as they’re designed for customer-facing payment flows. Your Public API Key is automatically generated for your account, you do not need to create a new token to access it. You can find it in Settings → Developer Tools → API Tokens.

How to create your First Payment Request

1

Understand Payment Request Parameters

Payment Requests are fundamentally different from Quotes because they’re fiat-first: you specify the fiat amount you want to collect, and Busha calculates the equivalent crypto amount at current market rates.Essential Parameters
ParameterData TypeRequired/OptionalDescription
quote_currencystringRequiredThe fiat currency for the payment amount
quote_amountstringRequiredThe fiat amount you’re collecting from the customer
source_currencystringRequiredThe cryptocurrency the customer will pay with
target_currencystringRequiredThe cryptocurrency you’ll receive
pay_inobjectRequiredDetails about how the customer will pay
additional_infoobjectRequiredCustomer contact information
2

Create Your First Payment Request

Let’s create a payment request where a customer pays 50000 NGN worth of USDT.To create a payment request:
  1. Open your terminal or command prompt
  2. Use the POST request below to the /v1/payments/requests endpoint
  3. Replace YOUR_BASE_URL with your chosen environment’s URL
  4. Replace {YOUR_PUBLIC_KEY} with your actual Public API Key
Expected ResponseA successful response will return a Payment Request object with a unique crypto address for the customer to pay into:
Key Response Fields:
  • id: The unique payment request ID
  • pay_in.address: The crypto address where customers send payment
  • source_amount: The calculated crypto amount customer must pay
  • expires_at: When the payment request expires

Understanding the Payment Timeline

Payment Requests include a timeline object showing the payment progress:
  • Step 1: “Transfer Started” - Payment request created, waiting for customer payment
  • Step 2: “Payment Received” - Customer has sent the cryptocurrency to the provided address
Monitor the timeline.current_step to track payment progress using a Webhook.

Troubleshooting

  • Offline Product: “This pair is currently unavailable to trade.” Try a different source_currency or check the Pairs API for currently available pairs.
  • 401 Unauthorized: Double-check that your public API key is correct.

What’s Next?

Now that you have successfully created a payment request, check out the following guides: