Skip to main content
This example shows you how to add custom markup fees on top of Busha’s infrastructure costs.

Use Cases

  • Charging service fees on transactions
  • Adding profit margins to conversions

How Markups Work

To add your own fees, use a two-step approach:
  1. Customer Deposit: Create a quote for the total amount (base + markup) with a pay_in object
  2. Actual Conversion: After funds are received, create a second quote for only the base amount with a pay_out object
The difference between what the customer pays and what you spend on the conversion remains in your balance as profit.

Example: Markup on USDT Purchase

A customer wants to buy USDT worth 5,000 NGN. You want to charge a 10% markup (500 NGN profit).
1

Create Quote for Customer Deposit

Charge the customer 5,500 NGN (5,000 NGN + 500 NGN markup):
    curl -X POST https://api.sandbox.busha.so/v1/quotes \
      -H "Authorization: Bearer YOUR_SECRET_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "source_currency": "NGN",
        "target_currency": "NGN",
        "source_amount": "5500",
        "pay_in": {
          "type": "temporary_bank_account"
        }
      }'
Response:
{
  "status": "success",
  "message": "Created quote successfully",
  "data": {
    "id": "QUO_depositWith5500",
    "source_currency": "NGN",
    "target_currency": "NGN",
    "source_amount": "5500",
    "target_amount": "5500",
    "pay_in": {
      "type": "temporary_bank_account"
    },
    "status": "pending"
  }
}
2

Finalize Deposit Transfer

Generate the temporary bank account for customer deposit:
    curl -X POST https://api.sandbox.busha.so/v1/transfers \
      -H "Authorization: Bearer YOUR_SECRET_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "quote_id": "QUO_depositWith5500"
      }'
Response:
{
  "status": "success",
  "message": "Created transfer successfully",
  "data": {
    "id": "TRF_customerDeposit",
    "quote_id": "QUO_depositWith5500",
    "source_amount": "5500",
    "pay_in": {
      "recipient_details": {
        "account_name": "Payaza(Business 1 Business)",
        "account_number": "7000384620",
        "bank_name": "78 FINANCE COMPANY LIMITED"
      },
      "type": "temporary_bank_account"
    },
    "status": "pending"
  }
}
Customer deposits 5,500 NGN to this bank account.
3

Monitor Transfer Status

If webhooks is setup, you’ll receive a notification when the deposit is complete. The customer’s funds are now in your balance and ready for conversion.
    {
      "event": "transfer.funds_received",
      "data": {
        "transfer_id": "TRF_customerDeposit",
        "source_amount": "5500",
        "source_currency": "NGN",
        "status": "funds_received"
      }
    }
Your balance now has 5,500 NGN.
4

Create Quote for Actual Conversion

Convert only 5,000 NGN to USDT (keeping 500 NGN as profit):
    curl -X POST https://api.sandbox.busha.so/v1/quotes \
      -H "Authorization: Bearer YOUR_SECRET_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "source_currency": "NGN",
        "target_currency": "USDT",
        "source_amount": "5000",
        "pay_out": {
          "type": "balance"
        }
      }'
Response:
{
  "status": "success",
  "message": "Created quote successfully",
  "data": {
    "id": "QUO_actualConversion",
    "source_currency": "NGN",
    "target_currency": "USDT",
    "source_amount": "5000",
    "target_amount": "3.12",
    "rate": {
      "rate": "1602.56",
      "side": "buy",
      "source_currency": "NGN",
      "target_currency": "USDT"
    },
    "pay_out": {
      "type": "balance"
    }
  }
}
5

Execute Conversion Transfer

Finalize the conversion:
    curl -X POST https://api.sandbox.busha.so/v1/transfers \
      -H "Authorization: Bearer YOUR_SECRET_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "quote_id": "QUO_actualConversion"
      }'
Result:
  • Customer receives 3.12 USDT
  • You spent 5,000 NGN from your balance
  • 500 NGN remains in your balance as profit

Learn More