# Create currency balance Source: https://docs.busha.io/api-reference/balances/create-currency-balance https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/balances Creates a new balance for managing funds in a specific currency. # Get balance details Source: https://docs.busha.io/api-reference/balances/get-balance-details https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/balances/{id_or_code} # List all balances Source: https://docs.busha.io/api-reference/balances/list-all-balances https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/balances Retrieves all account balances with their current status. # Retrieve details of a specific currency Source: https://docs.busha.io/api-reference/currencies/retrieve-details-of-a-specific-currency https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/currencies/{code} Fetches detailed information about a specific currency using its unique code. This includes details such as network support, decimal precision, and transaction limits. # Retrieve supported currencies Source: https://docs.busha.io/api-reference/currencies/retrieve-supported-currencies https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/currencies Retrieves a list of all supported currencies along with their basic details. This endpoint can be used to display available currencies in wallets or APIs requiring currency data. # Create a new customer Source: https://docs.busha.io/api-reference/customers/create-a-new-customer https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/customers Creates a new customer entry in the system. The required fields depend on the `type` of customer being created ('individual' or 'business'). # Delete a customer Source: https://docs.busha.io/api-reference/customers/delete-a-customer https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml delete /v1/customers/{id} Delete a customer by their unique ID # Export Customers Source: https://docs.busha.io/api-reference/customers/export-customers https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/customers/export Export customers to a csv file # Generate KYC link for a customer Source: https://docs.busha.io/api-reference/customers/generate-kyc-link-for-a-customer https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/customers/{id}/kyc-link Generate a KYC verification link for an individual customer # Get a customer by ID Source: https://docs.busha.io/api-reference/customers/get-a-customer-by-id https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/customers/{id} Retrieve a specific customer by their unique ID # List Business Industries Source: https://docs.busha.io/api-reference/customers/list-business-industries https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/customers/industries List all business industries # List Customers Source: https://docs.busha.io/api-reference/customers/list-customers https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/customers List all customers in created for the business # Share customer token Source: https://docs.busha.io/api-reference/customers/share-customer-token https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/customers/{id}/token-share Token sharing. # Update a customer Source: https://docs.busha.io/api-reference/customers/update-a-customer https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml put /v1/customers/{id} Update the details of an existing customer # Verify a customer Source: https://docs.busha.io/api-reference/customers/verify-a-customer https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/customers/{id}/verify Verify the identity and information provided by a customer # Generate presigned upload URL Source: https://docs.busha.io/api-reference/files/generate-presigned-upload-url https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/files Generates a presigned URL for uploading files directly to storage # Get customer growth Source: https://docs.busha.io/api-reference/insights/get-customer-growth https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/insights/customers/growth Returns the business customer growth trend: new and cumulative customer counts per interval bucket (UTC), plus a summary with the growth rate versus the immediately preceding period of equal length. # Get transaction breakdown Source: https://docs.busha.io/api-reference/insights/get-transaction-breakdown https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/insights/transactions/breakdown Returns transaction counts within the requested date range grouped by the requested dimension, with percentage shares. Currency is optional; when omitted, all currencies are counted. # Get transaction trends Source: https://docs.busha.io/api-reference/insights/get-transaction-trends https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/insights/transactions/trends Returns an inflow/outflow/net cash flow time series for completed transactions in the requested currency, bucketed by the requested interval (UTC). Buckets with no activity are zero-filled. # Introduction Source: https://docs.busha.io/api-reference/introduction Introductory essay for integrating with Busha The **Busha API** is designed to provide businesses with tools for borderless financial transactions and operations, enabling modern, global money management. It serves as the backbone for facilitating: * Creation and management of multi-currency balances * Retrieval of real-time cryptocurrency rates * Substantial data insights for business owners ## Authentication All API requests require a **Bearer Token** for authentication, passed in the `Authorization` header. Your authorization value is a base64 encoded value of your api key and your secret key. You can obtain API tokens via your Busha user or business account. Authentication is mandatory to ensure secure and authorized interactions with the API. The API keys from the dashboard provides a base64 encoding of the your authorization tokens. Your generated Key should look like this: `VURtNXhWcHueantkpaiewjo0S044MWsadfojienuoxRTiWDJaeWJaTGxxanZ3Ym10OU1RZnVWajVW=` Example Header: ```curl theme={null} Authorization: Bearer VURtNXhWcHueantkpaiewjo0S044MWsadfojienuoxRTiWDJaeWJaTGxxanZ3Ym10OU1RZnVWajVW= ``` ## Error Handling Standardized error responses ensure predictable interactions. Errors are detailed for easy debugging and understanding: | **Error Code** | **HTTP Status Code** | **Description** | | --------------------- | -------------------- | ---------------------------------- | | `bad_request` | 400 | Invalid input or malformed request | | `unauthorized` | 401 | Invalid or missing authentication | | `not_found` | 404 | Resource not found | | `service_unavailable` | 503 | Server error | Basic Error Example: ```json theme={null} { "error": { "name": "bad_request", "message": "Invalid input data" } } ``` Schema Error Body Example: ```json theme={null} { "error": { "name": "bad_request", "message": "Invalid input data" }, "schema": { "reason": "The request body is defined as an object. However, it does not meet the schema requirements of the specification", "fix": "Ensure that the object being submitted, matches the schema correctly" } } ``` Field Error Body Example: ```json theme={null} { "error": { "name": "bad_request", "message": "Invalid input data" }, "fields": { "field1": [ { "reason": "The request body is defined as an object. However, it does not meet the schema requirements of the specification", }, ], "field2": [ { "reason": "The request body is defined as an object. However, it does not meet the schema requirements of the specification", } ], } } ``` ## Pagination Pagination uses cursors provided as: The API supports **cursor-based pagination** for endpoints with large datasets. Pagination uses a `next_cursor` and `previous_cursor` returned in the response. Example Response Format: ```json theme={null} { "current_entries_size": 10, "next_cursor": "base64_cursor_value", "previous_cursor": "base64_previous_cursor_value" } ``` ## Rate Limiting Rate limits determine how many API calls can be made in a rolling minute. This ensures fair and optimized use of system resources. The rate limits allowed by each resource will be provided with the header: ```curl theme={null} x-rate-limit 100 ``` If this header does not exist, then the rate limit is set at a default 100 req/min Requests exceeding the allocated quota will receive a `429 Too Many Requests` response. ## Common Parameters Common parameters enhance consistency across endpoints: | **Parameter Name** | **Location** | **Description** | **Example** | | ------------------ | ------------ | ------------------------ | ------------------------ | | `X-BU-PROFILE-ID` | Header | User profile identifier | `BUS_qwejinoiuiqw93ejjw` | | `id` | Path | Unique NanoID identifier | `dpt_jweqafajsndiun34fd` | | `cursor` | Query | Pagination cursor | `base64_cursor_string` | #### Paginated Response Example ```json theme={null} { "status": "success", "message": "Data retrieved", "pagination": { "next_cursor": "value_for_next_page", "current_entries_size": 20 }, "data": [...] } ``` # Get a merchant by public key Source: https://docs.busha.io/api-reference/miscellaneous/get-a-merchant-by-public-key https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/merchants Get a merchant # Get deposit address Source: https://docs.busha.io/api-reference/miscellaneous/get-deposit-address https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/addresses/{code} Get an address for a currency # Get virtual bank account Source: https://docs.busha.io/api-reference/miscellaneous/get-virtual-bank-account https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/virtual_bank_accounts/{code} Get a virtual bank account for a currency # Get virtual bank account terms Source: https://docs.busha.io/api-reference/miscellaneous/get-virtual-bank-account-terms https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/virtual_bank_accounts/{code}/terms Get the terms and conditions for a virtual bank account by currency code # List banks resource Source: https://docs.busha.io/api-reference/miscellaneous/list-banks-resource https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/banks Returns a list of all banks and their bank codes # Look up users addresses Source: https://docs.busha.io/api-reference/miscellaneous/look-up-users-addresses https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/pay/{username} Returns a user's addresses based on currency and network # Regenerate deposit address Source: https://docs.busha.io/api-reference/miscellaneous/regenerate-deposit-address https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/addresses/regenerate Regenerate an address for a network # Returns a list of countries Source: https://docs.busha.io/api-reference/miscellaneous/returns-a-list-of-countries https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/countries Returns a list of countries and their supported payment channels # Validate payment destination Source: https://docs.busha.io/api-reference/miscellaneous/validate-payment-destination https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/validate validates a payment destination is valid # List trading pairs Source: https://docs.busha.io/api-reference/pairs/list-trading-pairs https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/pairs Retrieves all available trading pairs with their current rates. # Activate a draft invoice Source: https://docs.busha.io/api-reference/paymentlinks/activate-a-draft-invoice https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/payments/links/{id}/activate Transitions an invoice from draft status to active and sends email notification to customer # Create a payment link Source: https://docs.busha.io/api-reference/paymentlinks/create-a-payment-link https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/payments/links Create a payment link # Create a payment request for payment link Source: https://docs.busha.io/api-reference/paymentlinks/create-a-payment-request-for-payment-link https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/payments/links/{id}/requests Create a payment request for payment link # Delete a payment link Source: https://docs.busha.io/api-reference/paymentlinks/delete-a-payment-link https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml delete /v1/payments/links/{id} Delete a payment link # List payment links Source: https://docs.busha.io/api-reference/paymentlinks/list-payment-links https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/payments/links List payment links # List payment requests for payment link Source: https://docs.busha.io/api-reference/paymentlinks/list-payment-requests-for-payment-link https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/payments/links/{id}/requests List payment requests for payment link # Retrieve a payment link Source: https://docs.busha.io/api-reference/paymentlinks/retrieve-a-payment-link https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/payments/links/{id} Retrieve a payment link # Update a payment link Source: https://docs.busha.io/api-reference/paymentlinks/update-a-payment-link https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml patch /v1/payments/links/{id} Update a payment link # Create a payment request Source: https://docs.busha.io/api-reference/paymentrequests/create-a-payment-request https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/payments/requests Create a payment request # Finalize a payment request Source: https://docs.busha.io/api-reference/paymentrequests/finalize-a-payment-request https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/payments/requests/{id}/finalize Finalize a payment request # List payment requests Source: https://docs.busha.io/api-reference/paymentrequests/list-payment-requests https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/payments/requests List payment requests # Retrieve a payment request Source: https://docs.busha.io/api-reference/paymentrequests/retrieve-a-payment-request https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/payments/requests/{id} Retrieve a payment request # Activate pledge Source: https://docs.busha.io/api-reference/pledges/activate-pledge https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/pledges/{id}/activate Confirm that the beneficiary credit agreement is active. Requires an OAuth pledge grant with beneficiary context. # Add pledge items Source: https://docs.busha.io/api-reference/pledges/add-pledge-items https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/pledges/{id}/items Add more customer-authorized assets to an active pledge. Requires an OAuth pledge grant with beneficiary context. # Cancel pledge liquidation Source: https://docs.busha.io/api-reference/pledges/cancel-pledge-liquidation https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/pledges/{id}/liquidations/{liquidation_id}/cancel Cancel a pending liquidation before processing starts. Requires an OAuth pledge grant with beneficiary context. # Create pledge Source: https://docs.busha.io/api-reference/pledges/create-pledge https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/pledges Create a pledge from a valid quote and lock the quoted items. Requires an OAuth pledge grant with beneficiary context. # Create pledge quote Source: https://docs.busha.io/api-reference/pledges/create-pledge-quote https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/pledges/quotes Preflight a multi-asset pledge lock without moving funds. Requires an OAuth pledge grant with beneficiary context. # Get pledge Source: https://docs.busha.io/api-reference/pledges/get-pledge https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/pledges/{id} Retrieve pledge state, items, and lifecycle events visible to the selected profile or OAuth pledge grant. # List pledges Source: https://docs.busha.io/api-reference/pledges/list-pledges https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/pledges List pledges visible to the selected profile, or to the authenticated OAuth pledge grant when beneficiary context is present. # Release pledge items Source: https://docs.busha.io/api-reference/pledges/release-pledge-items https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/pledges/{id}/release Release all or part of the pledged assets back to the customer. Requires an OAuth pledge grant with beneficiary context. # Request pledge liquidation Source: https://docs.busha.io/api-reference/pledges/request-pledge-liquidation https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/pledges/{id}/liquidations Request notice-period liquidation under the stored pledge mandate. Requires an OAuth pledge grant with beneficiary context. # Create a new Quote Source: https://docs.busha.io/api-reference/quotes/create-a-new-quote https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/quotes Create Quote # Create Unauthenticated Quotes Source: https://docs.busha.io/api-reference/quotes/create-unauthenticated-quotes https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/quotes/unauthenticated Create Unauthenticated Quote # Get Quote Source: https://docs.busha.io/api-reference/quotes/get-quote https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/quotes/{id} Returns a single quote by it's unique ID # List Payment Options Source: https://docs.busha.io/api-reference/quotes/list-payment-options https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/quote/payment_options List Fiat Payment Options # List Quotes Source: https://docs.busha.io/api-reference/quotes/list-quotes https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/quotes List Quotes # Create a recipient Source: https://docs.busha.io/api-reference/recipients/create-a-recipient https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/recipients Create a new recipient for transfers. # Delete a recipient Source: https://docs.busha.io/api-reference/recipients/delete-a-recipient https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml delete /v1/recipients/{id} Delete a specific recipient # List recipients Source: https://docs.busha.io/api-reference/recipients/list-recipients https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/recipients Retrieve a list of all recipients # Resolves a bank account Source: https://docs.busha.io/api-reference/recipients/resolves-a-bank-account https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/recipients/resolve-bank-account Resolves a bank account for bank transfers # Retrieve a recipient Source: https://docs.busha.io/api-reference/recipients/retrieve-a-recipient https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/recipients/{id} Get details of a specific recipient # List stocks Source: https://docs.busha.io/api-reference/stocks/list-stocks https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/stocks # Market status Source: https://docs.busha.io/api-reference/stocks/market-status https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/stocks/market-status # Stock activity Source: https://docs.busha.io/api-reference/stocks/stock-activity https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/stocks/activities A page of the authenticated profile's stock fills (buys and sells) across every symbol, newest first. Optionally narrowed to one action and/or a set of symbols. # Stock detail Source: https://docs.busha.io/api-reference/stocks/stock-detail https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/stocks/{symbol} # Stock holdings Source: https://docs.busha.io/api-reference/stocks/stock-holdings https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/stocks/portfolio Every open stock position for the authenticated profile, valued at the current display (mid) token price. The spread is what a trade costs, not part of what is owned, so it is not applied here. # Stock OHLC candles Source: https://docs.busha.io/api-reference/stocks/stock-ohlc-candles https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/stocks/{symbol}/ohlc # Stock position detail Source: https://docs.busha.io/api-reference/stocks/stock-position-detail https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/stocks/portfolio/{symbol} One position for the authenticated profile plus a page of the fills behind it, newest first. # Top movers Source: https://docs.busha.io/api-reference/stocks/top-movers https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/stocks/movers Top gainers and losers by 24h percent change over listed symbols with a fresh enough price to rank. # Get transaction Source: https://docs.busha.io/api-reference/transactions/get-transaction https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/transactions/{id} Retrieves a transactions # List transactions Source: https://docs.busha.io/api-reference/transactions/list-transactions https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/transactions Returns a list of transactions # Create transfer Source: https://docs.busha.io/api-reference/transfers/create-transfer https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml post /v1/transfers Create a transfer object # Get transfer Source: https://docs.busha.io/api-reference/transfers/get-transfer https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/transfers/{id} Retrieves a transfer # List transfers Source: https://docs.busha.io/api-reference/transfers/list-transfers https://raw.githubusercontent.com/bushaHQ/openapi/refs/heads/main/openapi-spec.yaml get /v1/transfers Gets all transfers # Changelog Source: https://docs.busha.io/changelog/index Review historical changes and latest updates to the Busha Developer Documentation. ## August 2026 ### 2026/08/27 Added a new endpoint to generate a hosted KYC verification link for an individual customer, letting the customer complete their own identity verification without you needing to collect and submit documents on their behalf. **New endpoint:** `POST /v1/customers/{customer_id}/kyc-link` **Example request:** ```bash theme={null} curl -X POST "https://api.busha.so/v1/customers/CUS_xxx/kyc-link" \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" ``` **Example response:** ```json theme={null} { "status": "success", "message": "KYC link generated successfully", "data": { "url": "https://in.sumsub.com/websdk/p/sbx_j0t47nDxjmWDw503" } } ``` Share the returned `url` with your customer to let them complete verification directly. Once submitted, the customer's status updates the same way as document-based verification, moving from `inactive` to `in_review` and then `active` or `rejected`. ### 2026/08/24 Individual customers can now have a Bank Verification Number (BVN) added as part of `identifying_information` when creating or updating a customer. **What's new:** * New `bvn` type available in the `identifying_information` array * BVN is optional for standard KYC, but required if you want to generate a virtual NGN bank account for the customer via `GET /v1/virtual_bank_accounts/{code}` **Example payload:** ```json theme={null} "identifying_information": [ { "type": "bvn", "number": "12345678901", "country": "NG" } ] ``` If a virtual bank account is requested for a customer without a BVN on file, the API returns `err_bvn_verification_required`. Add a BVN at customer creation, or afterward via `PUT /v1/customers/{customer_id}`. **Updated guide:** * [`Create an individual customer`](/guides/customers/create-individual) ## July 2026 ### 2026/07/06 NIN verification is now a non-document flow. When verifying customers with a Nigerian National Identification Number (NIN), you no longer need to upload ID document images only the NIN number and a selfie are required. **What changed:** * **Removed:** `image_front` and `image_back` from the `national-id` object in `identifying_information` * **Unchanged:** Passport verification and selfie requirements remain the same **Updated guides:** * [`Create an individual customer`](/guides/customers/create-individual) * [`Verify identity`](/guides/customers/verify-identity) **Reference payload:** ```json theme={null} "identifying_information": [ { "type": "national-id", "number": "12345678901", "country": "NG" }, { "type": "selfie", "image_front": "{{base64 encoded selfie image}}", "number": "", "country": "NG" } ] ``` ## May 2026 ### 2026/05/22 Busha Pay is now available as a native mobile SDK for React Native, iOS (Swift), Android (Kotlin), and Flutter, enabling crypto checkout directly within your mobile app. * **React Native** — `@busha/pay-react-native` via npm or GitHub releases * **iOS (Swift)** — `BushaPay` via Swift Package Manager * **Android (Kotlin)** — `pay-android` via JitPack * **Flutter** — `busha_pay` via pub.dev **New guide:** [Accept Stablecoin with Mobile SDK](/guides/accepting-stablecoin-payments/mobile-sdk) ### 2026/05/06 * **Page:** [`guides/payment-requests/create-first-payment`](/guides/payment-requests/create-first-payment) * Removed the `dry_run` parameter from the `POST /v1/payments/requests` endpoint. The field is no longer accepted or documented. Developers previously using `dry_run: true` to preview payment request calculations should remove the field from their request bodies requests will now be created and persisted regardless. ## April 2026 ### 2026/04/26 Added `quote_id` as a query parameter on the `GET /v1/transfers` endpoint, allowing you to retrieve the transfer associated with a specific quote. **New query parameter:** * `quote_id`: Filter transfers by the quote used to create them. **Example:** ```bash theme={null} curl -X GET "https://api.busha.io/v1/transfers?quote_id=QUO_xxxxxxxxxx" \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` **Example response:** ```json theme={null} { "status": "success", "message": "Fetched transfers successfully", "data": [ { "id": "TRF_xxxxxxxxxx", "quote_id": "QUO_xxxxxxxxxx", ... } ] } ``` ## March 2026 ### 2026/03/27 Introduced the `kyc_status` field in the `GET /customers` and `GET /customers/{id}` endpoints to allow businesses to check the KYC verification status of their customers. New field: * `kyc_status`: Returns the current KYC verification state of the customer. Possible values: `pending`, `in_review`, `verified`, `rejected`. For example: ```json theme={null} { "id": "CUS_9z8y7x6w5v4u3t2s1r", "email": "john@example.com", "first_name": "John", "last_name": "Doe", "phone_number": "+234 8012345678", "kyc_status": "verified", // customer has completed KYC verification "created_at": "2026-03-15T10:30:00Z" } ``` In the response above, the `kyc_status` field shows that the customer has successfully completed KYC verification, allowing you to programmatically gate features or transaction limits based on their verification level. ### 2026/03/06 Introduced `deposit.success` webhook event to notify you when deposits are made to your static bank account. **Use case:** This event enables you to automatically convert incoming fiat deposits to your preferred stablecoin using the Quotes and Transfers endpoints. **How it works:** 1. Customer deposits funds to your static bank account 2. `deposit.success` webhook event is triggered 3. Your system receives the webhook notification 4. You can automatically create a quote and transfer to convert the deposited amount to crypto **Event payload example:** ```json theme={null} { "business_id": "bus_1a2b3c4d5e6f7g8h9i0j", "event": "deposit.success", "data": { "id": "289bb2c1-b4fc-46df-b313-6945a8d23615", "profile_id": "CUS_9z8y7x6w5v4u3t2s1r", "amount": "5900.00", "fee": "100.00", "total": "6000.00", "currency": "NGN", "reference": "Resf12dx3c333333", "channel": "bank_transfer", "status": "COMPLETED", "source_account_name": "Test Oluwatoni", "source_bank_name": "Bank of World", "source_account_number": "1234567890", "reserved_account_id": "8d1c58b0-9143-410b-be61-805e8421c466", "account_name": "ARTAX DIGITAL / Oluwatoni Test", "account_number": "4051483002", "created_at": "2025-02-26T11:29:02.336285+01:00" } } ``` **Key fields:** * `amount`: The deposited amount (after fees) * `fee`: The deposit fee charged * `total`: The total amount deposited (before fees) * `currency`: The currency of the deposit (e.g., NGN, KES) * `status`: Deposit status (COMPLETED) * `profile_id`: The customer ID who made the deposit **Important:** To start receiving this event, you must re-register your webhook: * Navigate to Settings → Developer Tools → Webhooks in your Busha dashboard * Delete your existing webhook endpoint * Create a new webhook and select the deposit event along with any other events you want to subscribe to * Save your new webhook configuration ### 2026/03/04 Updated KYC requirements for individual customers. The `identifying_information` field now requires a selfie image instead of a selfie video. **What changed:** * **Removed:** `documents` array with selfie video requirement * **Added:** Selfie image object in `identifying_information` array * **Required combinations:** Customers must provide ONE of the following: * Passport + number + image\_front + selfie image * National ID + number + image\_front + image\_back + selfie image **Identifying information object structure:** ```json theme={null} "identifying_information": [ { "type": "passport", "number": "passport-number", "country": "NG", "image_front": "", "image_back": "" }, { "type": "selfie", "image_front": "", "number": "", "country": "NG" } ] ``` ## February 2026 ### 2026/02/27 Added request logs feature to help businesses monitor and debug API activity. View detailed logs of API requests made to Busha directly from your dashboard. **What you can see:** * **Status code:** HTTP response status * **HTTP method:** Request type * **Endpoint:** The specific API endpoint called * **Request ID:** Unique identifier for each request * **Timestamp:** Date of each request **Features:** * **Search by Request ID:** Quickly find specific requests using the search bar * **Filter options:** Narrow down logs by various criteria * **Pagination:** Browse through your request history * **Auto-refresh:** Logs update automatically as new requests are made **How to access:** Navigate to **Settings → Developer Tools → Request Logs** in your Busha dashboard. ### 2026/02/24 Introduced the `reversal_policy` field in quote object to control how cancelled/failed transfers are refunded. **New field:** * **`reversal_policy`**: An optional field set to `"conversion_only"` to refund the original source amount to the source balance in the event of a transfer failure. The field accepts `conversion_only` value for now. For example: ```json theme={null} { "source_currency": "USDT", "target_currency": "NGN", "source_amount": "100", "reversal_policy": "conversion_only", // refund the transfer back to USDT if the quote transfer fails. "pay_in": { "type": "address", "network": "SOL" }, "pay_out": { "type": "bank_transfer", "recipient_id": "625syssysts8388" } } ``` In the quote above, the originating transfer will refund the source amount of 100 to the business source (USDT) balance if the transfer goes into a refunded state either from cancellation or failure to complete its lifecycle. ### 2026/02/23 Added webhook event history and replay functionality in the Busha dashboard. Businesses can now view, monitor, and resend past webhook events for the last 21 days. **Key features:** * **Event History:** View all webhook events from the last 21 days with full request/response details * **Manual Replay:** Resend failed or missed webhook events directly from the dashboard * **Search & Filter:** Find specific events by reference ID, status, category, or date * **Delivery Tracking:** Monitor webhook delivery success and failure rates * **Debugging Tools:** Inspect exact payloads sent for troubleshooting integration issues **How to access:** Navigate to **Settings** → **Developer Tools** → **Webhooks** in your Busha dashboard, then click on a webhook to view its activity log. ### 2026/02/18 All API endpoints now return a unique request identifier in the response headers under `X-Request-Id`. Request IDs help track specific API calls and expedite issue resolution when contacting Busha support. **Key details:** * **Header name:** `X-Request-Id` * **Format:** `req_` prefix followed by alphanumeric string (e.g., `req_JfPBXEC5rLHc`) * **Availability:** All endpoints * **Retention:** 21 days **New guide:** [`guides/request-id/request-id`](/guides/request-id/request-id) explains how to capture request IDs in your code and when to use them for debugging. Use request IDs to provide precise details when reporting API errors or unexpected behavior to Busha support. ### 2026/02/10 * **Page:** [`guides/recipients/create-and-manage`](/guides/recipients/create-and-manage) * Deleted legacy code examples that no longer match the current API surface. - Removed the deprecated `X-BU-VERSION` header from sample requests so developers copying the guide use headers the API actually accepts. ### 2026/02/04 Added the `transfer.funds_refunded` event in [`guides/webhooks/webhook-events`](/guides/webhooks/webhook-events). This event fires when funds are returned to the sender's balance after a transfer fails (for example, an invalid payout destination or network delivery issue). | Event | Trigger | Key Payload Fields | | ------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `transfer.funds_refunded` | Funds are refunded to the balance following a failed transfer. | `status: "funds_refunded"`, `fees` (array with refund-related fees), `pay_out` (original destination details), `updated_at` | Use this event to automatically reconcile balances, notify users that their funds have been returned, or trigger retry logic. Introduced token sharing capability to enable seamless customer onboarding across platforms using Sumsub. Businesses can now import pre-verified KYC data from partner platforms, eliminating duplicate verification processes. **Key details:** * **Endpoint:** `POST /v1/customers/{id}/token-share` * **Integration:** Requires Sumsub account with Reusable KYC feature enabled * **Supported:** Individual customers only (not business customers) **New guide:** [`guides/token-sharing/token-sharing`](/guides/token-sharing/token-sharing) covers the complete flow from Sumsub token generation to importing verified customer data into Busha. This feature significantly reduces customer onboarding friction for businesses operating across multiple platforms. * **Page:** [`overview/transfers`](/overview/transfers) - Added `funds_refunded` to the list of possible transfer statuses so integrators know this terminal state exists. ## January 2026 ### 2026/01/30 * **Page:** [`guides/getting-started/setup-sandbox`](/guides/getting-started/setup-sandbox) * Updated the sandbox account registration link to point to the current developer console URL. - Refreshed the onboarding steps so new integrators land on the correct dashboard and can generate API keys without confusion. ### 2026/01/28 * **Page:** [`guides/customers/transactions-on-behalf`](/guides/customers/transactions-on-behalf) * Adjusted usage scenarios and parameter descriptions to stay accurate for delegated (on-behalf-of) transaction flows. - Ensured code samples reflect the latest required headers and request body shape. ### 2026/01/27 The following guides under `guides/customers/` have been completely rewritten to improve clarity and align with current API behavior: | Page | Summary of Changes | | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`Create business`](/guides/customers/create-business) | Expanded KYB (Know Your Business) workflow documentation, added field-by-field explanations for required business registration data, and included sample request/response payloads that match the live API. | | [`Create individual`](/guides/customers/create-individual) | Overhauled KYC (Know Your Customer) instructions with step-by-step guidance, clearer document-upload requirements, and updated example payloads reflecting actual field names and validation rules. | | [`Verify identity`](/guides/customers/verify-identity) | Clarified the verification lifecycle (from `inactive` → `in_review` → `active` or `rejected`), documented each possible status transition, and explained how to interpret verification outcomes programmatically. | Added comprehensive webhook coverage in [`guides/webhooks/webhook-events`](/guides/webhooks/webhook-events). The following four events are now documented with full sample payloads, trigger conditions, and recommended handling patterns: | Event | Trigger | Key Payload Fields | | --------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------- | | `customer.verification.in_review` | Customer submits verification documents and review begins. | `status: "in_review"`, `level: "0"`, `updated_at` | | `customer.verification.active` | Review succeeds; customer is fully verified. | `status: "active"`, `level: "1"`, `updated_at` | | `customer.verification.rejected` | Review fails due to invalid or incomplete documents. | `status: "rejected"`, `rejection_reason`, `level: "0"`, `updated_at` | | `customer.verification.inactive` | Verification reverted (compliance issue, suspension, etc.). | `status: "inactive"`, `level: "0"`, `updated_at` | Each event follows the standard webhook envelope (`business_id`, `event`, `data`) and can be used to automate customer onboarding workflows, surface rejection reasons to end-users, or trigger compliance alerts. # USD Conversions Source: https://docs.busha.io/examples/buy-usd Buy and sell USD with fiat or cryptocurrency using Busha's API. This example shows you how to buy and sell USD with either fiat currency or cryptocurrency using Busha's API. ## Use Cases * Convert local currency to USD * Convert stablecoins to USD * Convert USD to local currency * International payments * USD savings and liquidity management *** ## Buy USD ### Buy USD with Fiat ### Buy USD with 50,000 NGN via Bank Transfer Create a quote with temporary bank account funding: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "NGN", "target_currency": "USD", "source_amount": "50000", "pay_in": { "type": "temporary_bank_account" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_gCcLjJ0P0uEc", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "NGN", "target_currency": "USD", "source_amount": "50000", "target_amount": "33.48543819", "rate": { "product": "USDNGN", "rate": "1490.2", "side": "buy", "type": "FIXED", "source_currency": "NGN", "target_currency": "USD" }, "fees": [ { "amount": { "amount": "100", "currency": "NGN" }, "name": "payment gateway fee", "type": "FIXED" } ], "pay_in": { "type": "temporary_bank_account" }, "pay_out": { "type": "balance" }, "reference": "QUO_gCcLjJ0P0uEc", "status": "pending", "expires_at": "2026-01-23T11:34:17.175170741Z", "created_at": "2026-01-23T11:04:17.175146315Z", "updated_at": "2026-01-23T11:04:17.175146315Z" } } ``` Use the quote ID to get temporary bank details: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_gCcLjJ0P0uEc" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_JSaOYnl7Sla0", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_gCcLjJ0P0uEc", "description": "Bought USD", "sub_description": "With NGN", "source_currency": "NGN", "target_currency": "USD", "source_amount": "50000", "target_amount": "33.48543819", "trade": "buy", "rate": { "product": "USDNGN", "rate": "1490.2", "side": "buy", "type": "FIXED", "source_currency": "NGN", "target_currency": "USD" }, "fees": [ { "amount": { "amount": "100", "currency": "NGN" }, "name": "payment gateway fee", "type": "FIXED" } ], "pay_in": { "expires_at": "2026-01-23T11:37:32.289498887Z", "recipient_details": { "account_name": "BIBAGE TECHNOLOGIES LTD || Liverppol Business", "account_number": "0327318166", "bank_code": "090614", "bank_name": "Aella Microfinance Bank", "email": "ajibola@busha.co" }, "type": "temporary_bank_account" }, "pay_out": { "type": "balance" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2026-01-23T11:07:31.197428968Z", "updated_at": "2026-01-23T11:07:31.197429043Z" } } ``` **Important:** Transfer exactly ₦50,000 to the provided bank account before the expiration time. The USD will be credited to your balance once payment is confirmed. Monitor the transfer to confirm the purchase completed successfully: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_JSaOYnl7Sla0 \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` ```json theme={null} { "status": "success", "message": "Fetched transfer successfully", "data": { "id": "TRF_JSaOYnl7Sla0", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_gCcLjJ0P0uEc", "description": "Bought USD", "sub_description": "With NGN", "source_currency": "NGN", "target_currency": "USD", "source_amount": "50000", "target_amount": "33.48543819", "trade": "buy", "rate": { "product": "USDNGN", "rate": "1490.2", "side": "buy", "type": "FIXED", "source_currency": "NGN", "target_currency": "USD" }, "fees": [ { "amount": { "amount": "100", "currency": "NGN" }, "name": "payment gateway fee", "type": "FIXED" } ], "pay_in": { "expires_at": "2026-01-23T11:37:32.289498887Z", "recipient_details": { "account_name": "BIBAGE TECHNOLOGIES LTD || Liverppol Business", "account_number": "0327318166", "bank_code": "090614", "bank_name": "Aella Microfinance Bank", "email": "ajibola@busha.co" }, "type": "temporary_bank_account" }, "pay_out": { "type": "balance" }, "status": "funds_converted", "timeline": { "total_steps": 3, "current_step": 3, "transfer_status": "funds_converted", "events": [ { "step": 1, "done": true, "status": "pending", "title": "Transfer Started", "description": "Waiting for your NGN payment", "timestamp": "2026-01-23T11:07:34.553579Z" }, { "step": 2, "done": true, "status": "funds_received", "title": "Payment Received", "description": "We received your NGN Payment", "timestamp": "2026-01-23T11:07:34.553579Z" }, { "step": 3, "done": true, "status": "funds_converted", "title": "Funds Converted", "description": "Your USD has been added to your wallet.", "timestamp": "2026-01-23T11:07:34.65765Z" } ] }, "created_at": "2026-01-23T11:07:31.197428Z", "updated_at": "2026-01-23T11:07:35.404245Z" } } ``` #### Other Examples **Buy USD with NGN from Balance** ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "NGN", "target_currency": "USD", "source_amount": "50000", "pay_in": { "type": "balance" } }' ``` *** ### Buy USD with Crypto ### Convert 100 USDT to USD from Balance Create a quote to see the exchange rate: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDT", "target_currency": "USD", "source_amount": "100", "pay_in": { "type": "balance" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_zqGjq5VI4Dyu", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "USDT", "target_currency": "USD", "source_amount": "100", "target_amount": "99.6", "rate": { "product": "USDTUSD", "rate": "0.996", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "USD" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "reference": "QUO_zqGjq5VI4Dyu", "status": "pending", "expires_at": "2026-01-20T09:48:40.822804422Z", "created_at": "2026-01-20T09:18:40.822779472Z", "updated_at": "2026-01-20T09:18:40.822779472Z" } } ``` Use the quote ID to finalize the conversion: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_zqGjq5VI4Dyu" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_O7MHNJocNQaN", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_zqGjq5VI4Dyu", "description": "Sold USDT", "sub_description": "For USD", "source_currency": "USDT", "target_currency": "USD", "source_amount": "100", "target_amount": "99.6", "trade": "sell", "rate": { "product": "USDTUSD", "rate": "0.996", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "USD" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2026-01-20T09:33:01.915628818Z", "updated_at": "2026-01-20T09:33:01.915628873Z" } } ``` Monitor the transfer to confirm completion: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_O7MHNJocNQaN \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` ```json theme={null} { "status": "success", "message": "Fetched transfer successfully", "data": { "id": "TRF_O7MHNJocNQaN", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_zqGjq5VI4Dyu", "description": "Sold USDT", "sub_description": "For USD", "source_currency": "USDT", "target_currency": "USD", "source_amount": "100", "target_amount": "99.6", "trade": "sell", "rate": { "product": "USDTUSD", "rate": "0.996", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "USD" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "funds_converted", "timeline": { "total_steps": 2, "current_step": 2, "transfer_status": "funds_converted", "events": [ { "step": 1, "done": true, "status": "funds_received", "title": "Crypto Received", "description": "Funded from Balance" }, { "step": 2, "done": true, "status": "funds_converted", "title": "Funds Converted", "description": "Your USD has been added to your wallet." } ] }, "created_at": "2026-01-20T09:33:01.915628Z", "updated_at": "2026-01-20T09:33:02.456789Z" } } ``` ### Convert 100 USDC to USD via Crypto Deposit Create a quote with crypto deposit address: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDC", "target_currency": "USD", "source_amount": "100", "pay_in": { "type": "address", "network": "TRX" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_7so9hb74wusK", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "USDC", "target_currency": "USD", "source_amount": "100", "target_amount": "99.6", "rate": { "product": "USDCUSD", "rate": "0.996", "side": "sell", "type": "FIXED", "source_currency": "USDC", "target_currency": "USD" }, "fees": [], "pay_in": { "network": "TRX", "type": "address" }, "pay_out": { "type": "balance" }, "reference": "QUO_7so9hb74wusK", "status": "pending", "expires_at": "2026-01-20T15:38:44.561315603Z", "created_at": "2026-01-20T15:08:44.56129334Z", "updated_at": "2026-01-20T15:08:44.56129334Z" } } ``` Use the quote ID to get the deposit address: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_7so9hb74wusK" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_UELotkEEfes6", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_7so9hb74wusK", "description": "Sold USDC", "sub_description": "For USD", "source_currency": "USDC", "target_currency": "USD", "source_amount": "100", "target_amount": "99.6", "trade": "sell", "rate": { "product": "USDCUSD", "rate": "0.996", "side": "sell", "type": "FIXED", "source_currency": "USDC", "target_currency": "USD" }, "fees": [], "pay_in": { "address": "TTc5HBAEETmqPTarVUU3xLB3fY7b1YxNzm", "expires_at": "2026-01-20T16:10:01.640438Z", "network": "TRX", "type": "address" }, "pay_out": { "type": "balance" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2026-01-20T15:10:01.555002867Z", "updated_at": "2026-01-20T15:10:01.555002935Z" } } ``` **Important:** Send exactly 100 USDC (TRC20) to the address `TTc5HBAEETmqPTarVUU3xLB3fY7b1YxNzm` before the expiration time. The USD will be credited to your balance once the deposit is confirmed on-chain. #### Other Examples **Buy USD with USDC from Balance** ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDC", "target_currency": "USD", "source_amount": "100", "pay_in": { "type": "balance" } }' ``` *** ## Sell USD ### Sell USD for Fiat ### Convert 50 USD to NGN Create a quote to see the exchange rate: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USD", "target_currency": "NGN", "source_amount": "50", "pay_in": { "type": "balance" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_6T9lPmqMSPPt", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "USD", "target_currency": "NGN", "source_amount": "50", "target_amount": "80363.5", "rate": { "product": "USDNGN", "rate": "1607.27", "side": "sell", "type": "FIXED", "source_currency": "USD", "target_currency": "NGN" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "reference": "QUO_6T9lPmqMSPPt", "status": "pending", "expires_at": "2026-01-20T09:56:01.045425406Z", "created_at": "2026-01-20T09:26:01.045403632Z", "updated_at": "2026-01-20T09:26:01.045403632Z" } } ``` Use the quote ID to finalize the conversion: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_6T9lPmqMSPPt" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_qaZ4QmI5ahSw", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_6T9lPmqMSPPt", "description": "Sold USD", "sub_description": "For NGN", "source_currency": "USD", "target_currency": "NGN", "source_amount": "50", "target_amount": "80363.5", "trade": "sell", "rate": { "product": "USDNGN", "rate": "1607.27", "side": "sell", "type": "FIXED", "source_currency": "USD", "target_currency": "NGN" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2026-01-20T09:33:40.957016939Z", "updated_at": "2026-01-20T09:33:40.957017017Z" } } ``` Monitor the transfer to confirm completion: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_qaZ4QmI5ahSw \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` ```json theme={null} { "status": "success", "message": "Fetched transfer successfully", "data": { "id": "TRF_qaZ4QmI5ahSw", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_6T9lPmqMSPPt", "description": "Sold USD", "sub_description": "For NGN", "source_currency": "USD", "target_currency": "NGN", "source_amount": "50", "target_amount": "80363.5", "trade": "sell", "rate": { "product": "USDNGN", "rate": "1607.27", "side": "sell", "type": "FIXED", "source_currency": "USD", "target_currency": "NGN" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "funds_converted", "timeline": { "total_steps": 2, "current_step": 2, "transfer_status": "funds_converted", "events": [ { "step": 1, "done": true, "status": "funds_received", "title": "Payment Received", "description": "Funded from Balance" }, { "step": 2, "done": true, "status": "funds_converted", "title": "Funds Converted", "description": "Your NGN has been added to your wallet." } ] }, "created_at": "2026-01-20T09:33:40.957016Z", "updated_at": "2026-01-20T09:33:42.123456Z" } } ``` *** ### Sell USD for Crypto ### Convert 50 USD to USDT Create a quote to see the exchange rate: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USD", "target_currency": "USDT", "source_amount": "50", "pay_in": { "type": "balance" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_g0k6EIlv4ZH6", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "USD", "target_currency": "USDT", "source_amount": "50", "target_amount": "49.800796", "rate": { "product": "USDTUSD", "rate": "1.004", "side": "buy", "type": "FIXED", "source_currency": "USD", "target_currency": "USDT" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "reference": "QUO_g0k6EIlv4ZH6", "status": "pending", "expires_at": "2026-01-20T10:00:31.485131911Z", "created_at": "2026-01-20T09:30:31.485109051Z", "updated_at": "2026-01-20T09:30:31.485109051Z" } } ``` Use the quote ID to finalize the conversion: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_g0k6EIlv4ZH6" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_4vpxeM3IzcuV", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_g0k6EIlv4ZH6", "description": "Bought USDT", "sub_description": "With USD", "source_currency": "USD", "target_currency": "USDT", "source_amount": "50", "target_amount": "49.800796", "trade": "buy", "rate": { "product": "USDTUSD", "rate": "1.004", "side": "buy", "type": "FIXED", "source_currency": "USD", "target_currency": "USDT" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2026-01-20T09:34:13.772974486Z", "updated_at": "2026-01-20T09:34:13.772974539Z" } } ``` Monitor the transfer to confirm completion: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_4vpxeM3IzcuV \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` ```json theme={null} { "status": "success", "message": "Fetched transfer successfully", "data": { "id": "TRF_4vpxeM3IzcuV", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_g0k6EIlv4ZH6", "description": "Bought USDT", "sub_description": "With USD", "source_currency": "USD", "target_currency": "USDT", "source_amount": "50", "target_amount": "49.800796", "trade": "buy", "rate": { "product": "USDTUSD", "rate": "1.004", "side": "buy", "type": "FIXED", "source_currency": "USD", "target_currency": "USDT" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "funds_converted", "timeline": { "total_steps": 2, "current_step": 2, "transfer_status": "funds_converted", "events": [ { "step": 1, "done": true, "status": "funds_received", "title": "Payment Received", "description": "Funded from Balance" }, { "step": 2, "done": true, "status": "funds_converted", "title": "Funds Converted", "description": "Your USDT has been added to your wallet." } ] }, "created_at": "2026-01-20T09:34:13.772974Z", "updated_at": "2026-01-20T09:34:15.456789Z" } } ``` ### Convert 50 USD to USDC Create a quote to see the exchange rate: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USD", "target_currency": "USDC", "source_amount": "50", "pay_in": { "type": "balance" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_HAouYZS608yv", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "USD", "target_currency": "USDC", "source_amount": "50", "target_amount": "49.800796", "rate": { "product": "USDCUSD", "rate": "1.004", "side": "buy", "type": "FIXED", "source_currency": "USD", "target_currency": "USDC" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "reference": "QUO_HAouYZS608yv", "status": "pending", "expires_at": "2026-01-20T10:00:55.785832316Z", "created_at": "2026-01-20T09:30:55.785806405Z", "updated_at": "2026-01-20T09:30:55.785806405Z" } } ``` Use the quote ID to finalize the conversion: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_HAouYZS608yv" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_5ALpSQdyQlpO", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_HAouYZS608yv", "description": "Bought USDC", "sub_description": "With USD", "source_currency": "USD", "target_currency": "USDC", "source_amount": "50", "target_amount": "49.800796", "trade": "buy", "rate": { "product": "USDCUSD", "rate": "1.004", "side": "buy", "type": "FIXED", "source_currency": "USD", "target_currency": "USDC" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2026-01-20T09:34:50.233122674Z", "updated_at": "2026-01-20T09:34:50.233122727Z" } } ``` Monitor the transfer to confirm completion: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_5ALpSQdyQlpO \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` ```json theme={null} { "status": "success", "message": "Fetched transfer successfully", "data": { "id": "TRF_5ALpSQdyQlpO", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_HAouYZS608yv", "description": "Bought USDC", "sub_description": "With USD", "source_currency": "USD", "target_currency": "USDC", "source_amount": "50", "target_amount": "49.800796", "trade": "buy", "rate": { "product": "USDCUSD", "rate": "1.004", "side": "buy", "type": "FIXED", "source_currency": "USD", "target_currency": "USDC" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "funds_converted", "timeline": { "total_steps": 2, "current_step": 2, "transfer_status": "funds_converted", "events": [ { "step": 1, "done": true, "status": "funds_received", "title": "Payment Received", "description": "Funded from Balance" }, { "step": 2, "done": true, "status": "funds_converted", "title": "Funds Converted", "description": "Your USDC has been added to your wallet." } ] }, "created_at": "2026-01-20T09:34:50.233122Z", "updated_at": "2026-01-20T09:34:51.789456Z" } } ``` *** ## Learn More * [Understanding Quotes](/overview/quotes) - Deep dive into how quotes work * [Create Your First Quote](/guides/quotes/create-first-quote) - Step-by-step guide * [Supported Currencies](/guides/reference/supported-currencies) - See all available currency pairs * [Transfer Status Reference](/guides/reference/transfer-status) - All possible transfer statuses # Sell Crypto for Fiat Source: https://docs.busha.io/examples/crypto-to-fiat Sell cryptocurrency for fiat currency using Busha's API. This example shows you how to sell cryptocurrency (USDT, BTC, ETH, etc.) for fiat currency (NGN, KES) using Busha's API. ## Use Cases * Cash out crypto to local bank account * Pay vendors in local currency from crypto balance * Sell stablecoins for local currency to cover expenses ## Example: Sell Crypto for Fiat ### Sell 100 USDT for NGN Create a quote to see the exchange rate and how much fiat you'll receive: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDT", "target_currency": "NGN", "source_amount": "100", "pay_in": { "type": "address", "network": "TRX" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_KfCZEaXJD10W", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "USDT", "target_currency": "NGN", "source_amount": "100", "target_amount": "147386", "rate": { "product": "USDTNGN", "rate": "1473.86", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "NGN" }, "fees": [], "pay_in": { "network": "TRX", "type": "address" }, "pay_out": { "type": "balance" }, "reference": "QUO_KfCZEaXJD10W", "status": "pending", "expires_at": "2026-01-23T11:35:48.561357552Z", "created_at": "2026-01-23T11:05:48.561332107Z", "updated_at": "2026-01-23T11:05:48.561332107Z" } } ``` Use the quote ID to get the crypto deposit address: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_KfCZEaXJD10W" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_6qPeJdrePrj6", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_KfCZEaXJD10W", "description": "Sold USDT", "sub_description": "For NGN", "source_currency": "USDT", "target_currency": "NGN", "source_amount": "100", "target_amount": "147386", "trade": "sell", "rate": { "product": "USDTNGN", "rate": "1473.86", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "NGN" }, "fees": [], "pay_in": { "address": "TDbX2dG8s9fLNg4YBGPsoAHFzzYgY5df57", "expires_at": "2026-01-23T12:08:54.983548Z", "network": "TRX", "type": "address" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2026-01-23T11:08:54.912314446Z", "updated_at": "2026-01-23T11:08:54.912314516Z" } } ``` **Important:** Send exactly 100 USDT (TRC20) to the address `TDbX2dG8s9fLNg4YBGPsoAHFzzYgY5df57` before the expiration time. The NGN will be credited to your balance once the deposit is confirmed on-chain. Monitor the transfer to confirm the sale completed successfully: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_6qPeJdrePrj6 \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` ```json theme={null} { "status": "success", "message": "Fetched transfer successfully", "data": { "id": "TRF_6qPeJdrePrj6", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_KfCZEaXJD10W", "description": "Sold USDT", "sub_description": "For NGN", "source_currency": "USDT", "target_currency": "NGN", "source_amount": "100", "target_amount": "147386", "trade": "sell", "rate": { "product": "USDTNGN", "rate": "1473.86", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "NGN" }, "fees": [], "pay_in": { "address": "TDbX2dG8s9fLNg4YBGPsoAHFzzYgY5df57", "expires_at": "2026-01-23T12:08:54.983548Z", "network": "TRX", "type": "address" }, "status": "pending", "timeline": { "total_steps": 3, "current_step": 1, "transfer_status": "pending", "events": [ { "step": 1, "done": true, "status": "pending", "title": "Transfer Started", "description": "Waiting for your USDT deposit", "timestamp": "2026-01-23T11:08:54.9123Z" }, { "step": 2, "done": false, "status": "funds_received", "title": "Crypto Received", "description": "We received your USDT Deposit", "timestamp": "2026-01-23T11:08:54.9123Z" }, { "step": 3, "done": false, "status": "funds_converted", "title": "Funds Converted", "description": "Money has been added to your wallet.", "timestamp": "2026-01-23T11:08:54.912309Z" } ] }, "created_at": "2026-01-23T11:08:54.912314Z", "updated_at": "2026-01-23T11:08:54.912314Z" } } ``` ### Sell 10 USDT for KES Create a quote to see the exchange rate and how much fiat you'll receive: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDT", "target_currency": "KES", "source_amount": "10", "pay_in": { "type": "balance" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_VmvpRemZACRy", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "USDT", "target_currency": "KES", "source_amount": "10", "target_amount": "1305", "rate": { "product": "USDTKES", "rate": "130.5", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "KES" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "reference": "QUO_VmvpRemZACRy", "status": "pending", "expires_at": "2025-11-20T15:37:26.674151054Z", "created_at": "2025-11-20T15:07:26.67398174Z" } } ``` Use the quote ID to finalize the sale: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_VmvpRemZACRy" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_5d7yGiWuNUZP", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_VmvpRemZACRy", "description": "Sold USDT", "sub_description": "For KES", "source_currency": "USDT", "target_currency": "KES", "source_amount": "10", "target_amount": "1305", "trade": "sell", "rate": { "product": "USDTKES", "rate": "130.5", "side": "sell", "type": "FIXED" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2025-11-20T15:11:04.27887877Z", "updated_at": "2025-11-20T15:11:04.27887877Z" } } ``` Monitor the transfer to confirm the sale completed successfully: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_5d7yGiWuNUZP \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` ```json theme={null} { "status": "success", "message": "Fetched transfer successfully", "data": { "id": "TRF_5d7yGiWuNUZP", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_VmvpRemZACRy", "description": "Sold USDT", "sub_description": "For KES", "source_currency": "USDT", "target_currency": "KES", "source_amount": "10", "target_amount": "1305", "trade": "sell", "rate": { "product": "USDTKES", "rate": "130.5", "side": "sell", "type": "FIXED" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "funds_converted", "timeline": { "total_steps": 2, "current_step": 2, "transfer_status": "funds_converted", "events": [ { "step": 1, "done": true, "status": "funds_received", "title": "Crypto Received", "description": "Funded from Balance" }, { "step": 2, "done": true, "status": "funds_converted", "title": "Funds Converted", "description": "Money has been added to your wallet." } ] }, "created_at": "2025-11-20T15:11:04.27887Z", "updated_at": "2025-11-20T15:11:05.456789Z" } } ``` *** ## Other Currency Combinations **Sell BTC for NGN** ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "BTC", "target_currency": "NGN", "source_amount": "0.001", "pay_in": { "type": "balance" } }' ``` **Sell ETH for KES** ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "ETH", "target_currency": "KES", "source_amount": "0.01", "pay_in": { "type": "address", "network": "ETH" } }' ``` *** ## Learn More * [Understanding Quotes](/overview/quotes) - Deep dive into how quotes work * [Process Payouts](/guides/payouts/process-payouts) - Step-by-step payout guide * [Supported Currencies](/guides/reference/supported-currencies) - See all available currency pairs * [Transfer Status Reference](/guides/reference/transfer-status) - All possible transfer statuses # Customer Deposits Source: https://docs.busha.io/examples/customer-deposits Accept fiat and crypto deposits using temporary bank accounts and addresses. This example shows you how to accept deposits into your Busha account via fiat (temporary bank accounts) or crypto (deposit addresses). ## Use Cases * Customer funding their wallet * Accepting payments from users * Processing incoming transfers * Topping up account balances ## Fiat Deposit via Temporary Bank Account Create a quote to generate a temporary bank account: ```bash theme={null} 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": "50000", "pay_in": { "type": "temporary_bank_account" } }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_vxcF2svmjMbxDp4T5dcD8", "profile_id": "BUS_tg6yujbZ1nMu5BLQkPGGO", "source_currency": "NGN", "target_currency": "NGN", "source_amount": "50000", "target_amount": "49500", "rate": { "rate": "1", "side": "sell", "type": "FIXED", "source_currency": "NGN", "target_currency": "NGN" }, "fees": [ { "amount": { "amount": "500", "currency": "NGN" }, "name": "payment gateway fee", "type": "FIXED" } ], "pay_in": { "type": "temporary_bank_account" }, "status": "pending", "expires_at": "2025-02-21T10:46:56.232278869Z", "created_at": "2025-02-21T10:16:54.40130914Z", "updated_at": "2025-02-21T10:16:54.401309215Z" } } ``` Use the quote ID to generate the temporary bank account: ```bash theme={null} 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_vxcF2svmjMbxDp4T5dcD8" }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_LJB2GQb55Cs98LbpqgRMx", "profile_id": "BUS_tg6yujbZ1nMu5BLQkPGGO", "quote_id": "QUO_vxcF2svmjMbxDp4T5dcD8", "source_currency": "NGN", "target_currency": "NGN", "source_amount": "50000", "target_amount": "49500", "rate": { "rate": "1", "side": "sell", "type": "FIXED", "source_currency": "NGN", "target_currency": "NGN" }, "fees": [ { "amount": { "amount": "500", "currency": "NGN" }, "name": "payment gateway fee", "type": "FIXED" } ], "pay_in": { "expires_at": "2025-02-21T10:46:56.232278869Z", "recipient_details": { "account_name": "Payaza(Business 1 Business)", "account_number": "7000384620", "bank_name": "78 FINANCE COMPANY LIMITED", "email": "support@busha.co" }, "type": "temporary_bank_account" }, "status": "pending", "created_at": "2025-02-21T10:16:54.40130914Z", "updated_at": "2025-02-21T10:16:54.401309215Z" } } ``` Show the temporary bank account details to your customer: **Account Details:** * Bank Name: 78 FINANCE COMPANY LIMITED * Account Number: 7000384620 * Account Name: Payaza(Business 1 Business) * Amount to Send: 50,000 NGN * Expires: 2025-02-21 at 10:46 AM Customer transfers money to this account from their bank app. Check the transfer status to confirm when funds are received: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_LJB2GQb55Cs98LbpqgRMx \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" ``` **Possible Statuses:** * `pending` - Awaiting customer's bank transfer * `processing` - Funds received, being processed * `funds_received` - Successfully credited to your balance * `cancelled` - Transfer cancelled *** ## Crypto Deposit via Address Create a quote to generate a crypto deposit address: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDT", "target_currency": "USDT", "source_amount": "100", "pay_in": { "type": "address", "network": "TRX" } }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_GxYibGxTIN5c", "profile_id": "BUS_9rDAqqREdmMQcQj3zsRlL", "source_currency": "USDT", "target_currency": "USDT", "source_amount": "100", "target_amount": "100", "rate": { "product": "", "rate": "1", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "USDT" }, "fees": [], "pay_in": { "network": "TRX", "type": "address" }, "pay_out": { "type": "balance" }, "reference": "QUO_GxYibGxTIN5c", "status": "pending", "created_at": "2025-10-30T14:35:16.487382045Z", "updated_at": "2025-10-30T14:35:16.487382045Z" } } ``` Use the quote ID to generate the crypto deposit address: ```bash theme={null} 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_GxYibGxTIN5c" }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_abc123xyz", "profile_id": "BUS_9rDAqqREdmMQcQj3zsRlL", "quote_id": "QUO_GxYibGxTIN5c", "source_currency": "USDT", "target_currency": "USDT", "source_amount": "100", "target_amount": "100", "rate": { "product": "", "rate": "1", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "USDT" }, "fees": [], "pay_in": { "type": "address", "address": "TXYZabc123def456ghi789jkl", "network": "TRX", "memo": null }, "status": "pending", "created_at": "2025-10-30T14:35:20.123456Z", "updated_at": "2025-10-30T14:35:20.123456Z" } } ``` Show the crypto deposit details to your customer: **Deposit Instructions:** * Network: TRX (Tron) * Address: TXYZabc123def456ghi789jkl * Asset: USDT * Amount: 100 USDT (minimum) Customer sends USDT to this address from their wallet. Check the transfer status to confirm when crypto is received: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_abc123xyz \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" ``` **Possible Statuses:** * `pending` - Awaiting blockchain confirmation * `processing` - Transaction confirmed, processing deposit * `funds_received` - Crypto credited to balance * `cancelled` - Deposit cancelled *** ## Deposit for a Customer To process deposits on behalf of a customer, include the customer's profile ID in the header: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "X-BU-PROFILE-ID: CUSTOMER_PROFILE_ID" \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "NGN", "target_currency": "NGN", "source_amount": "50000", "pay_in": { "type": "temporary_bank_account" } }' ``` The deposit will be credited to the customer's account instead of your business account. *** ## Supported Networks for Crypto Deposits * **USDT**: TRX (Tron), ERC20 (Ethereum), BEP20 (BSC), POLYGON * **BTC**: BTC (Bitcoin) * **ETH**: ETH (Ethereum) * **Other cryptos**: Check supported networks via the Pairs API *** ## Important Notes ### Fiat Deposits * Temporary bank accounts expire after 30 minutes * Always check the `expires_at` field * If expired, create a new quote and transfer * Fees are deducted from the deposited amount ### Crypto Deposits * Always specify the correct network * Deposits require blockchain confirmations * Minimum deposit amounts apply per asset * Wrong network = lost funds (unrecoverable) *** ## Learn More * [Process Fiat Deposits Guide](/guides/deposits/process-fiat-deposits) - Detailed fiat deposit guide * [Process Crypto Deposits Guide](/guides/deposits/process-crypto-deposits) - Detailed crypto deposit guide * [Understanding Quotes](/overview/quotes) - How quotes work * [Webhooks Setup](/guides/webhooks/setup) - Monitor deposits in real-time * [Initiate Transactions on Behalf of Customers](/guides/customers/transactions-on-behalf) - Customer transactions # Customer Payouts Source: https://docs.busha.io/examples/customer-payouts Process crypto-to-fiat payouts to bank accounts and mobile money. This example shows you how to process payouts from crypto to fiat bank accounts or mobile money wallets. ## Use Cases * Vendor payments from marketplace * Salary disbursements in local currency * Cash out crypto to bank account * Mobile money withdrawals ## Crypto to Fiat Payout ### Bank Transfer Payout First, create a recipient for the Nigerian bank account: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/recipients \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" \ -H "X-BU-VERSION: 2025-07-11" \ -H "Content-Type: application/json" \ -d '{ "currency": "NGN", "country_code": "NG", "type": "ngn_bank", "bank_name": "UNITED BANK FOR AFRICA", "bank_code": "033", "account_number": "2109328188", "account_name": "SOSANYA DICKSON OLUMIDE" }' ``` Save the `recipient_id` from the response. Create a quote specifying how much crypto to convert and send: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDT", "target_currency": "NGN", "source_amount": "100", "pay_out": { "type": "bank_transfer", "recipient_id": "677bbf9c7cf061f23784555a" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_mprvCPMCfm3K2qSnzbWj7", "source_currency": "USDT", "target_currency": "NGN", "source_amount": "100", "target_amount": "168876", "rate": { "product": "USDTNGN", "rate": "1690.76", "side": "sell", "type": "FIXED" }, "fees": [ { "amount": { "amount": "200", "currency": "NGN" }, "name": "Fees", "type": "FIXED" } ], "pay_out": { "recipient_details": { "account_name": "SOSANYA DICKSON OLUMIDE", "account_number": "2109328188", "bank_name": "UNITED BANK FOR AFRICA", "country": "NG" }, "recipient_id": "677bbf9c7cf061f23784555a", "type": "bank_transfer" }, "expires_at": "2025-02-20T10:58:19.540052923Z" } } ``` Finalize the payout using the quote ID: ```bash theme={null} 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_mprvCPMCfm3K2qSnzbWj7" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_tYZ1y5bmXv4N5IhXSMbWJ", "source_currency": "USDT", "target_currency": "NGN", "source_amount": "100", "target_amount": "168876", "pay_out": { "recipient_details": { "account_name": "SOSANYA DICKSON OLUMIDE", "account_number": "2109328188", "bank_name": "UNITED BANK FOR AFRICA", "country": "NG" }, "type": "bank_transfer" }, "status": "pending" } } ``` Check the transfer status to confirm delivery: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_tYZ1y5bmXv4N5IhXSMbWJ \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" ``` **Possible Statuses:** * `pending` - Payout initiated * `processing` - Funds being processed * `funds_delivered` - Successfully delivered to bank account * `cancelled` - Payout cancelled ### M-Pesa Mobile Money Payout First, create a recipient for the M-Pesa mobile money wallet: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/recipients \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" \ -H "X-BU-VERSION: 2025-07-11" \ -H "Content-Type: application/json" \ -d '{ "type": "mpesa_mobile_money", "account_name": "Samuel Kiprotich", "phone_number": "254712345678" }' ``` Save the `recipient_id` from the response. Create a quote specifying how much crypto to convert and send: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDT", "target_currency": "KES", "source_amount": "10", "pay_out": { "type": "mobile_money", "recipient_id": "6923ca7f32faa00bb0932c78" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_F5I5r0Mhnrpa", "source_currency": "USDT", "target_currency": "KES", "source_amount": "10", "target_amount": "1236.3", "rate": { "product": "USDTKES", "rate": "129.63", "side": "sell", "type": "FIXED" }, "fees": [ { "amount": { "amount": "60", "currency": "KES" }, "name": "Fees", "type": "TIERED" } ], "pay_out": { "recipient_details": { "account_name": "Samuel Kiprotich", "country_code": "KE", "currency": "KES", "phone_number": "254712345678" }, "recipient_id": "6923ca7f32faa00bb0932c78", "type": "mobile_money" }, "expires_at": "2025-11-24T03:32:06.233668598Z" } } ``` Finalize the payout using the quote ID: ```bash theme={null} 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_F5I5r0Mhnrpa" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_GbqoYfHekk9f", "source_currency": "USDT", "target_currency": "KES", "source_amount": "10", "target_amount": "1236.3", "pay_out": { "recipient_details": { "account_name": "Samuel Kiprotich", "country_code": "KE", "currency": "KES", "phone_number": "254712345678" }, "type": "mobile_money" }, "status": "pending" } } ``` Check the transfer status to confirm delivery: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_GbqoYfHekk9f \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" ``` **Possible Statuses:** * `pending` - Payout initiated * `processing` - Funds being processed * `funds_delivered` - Successfully delivered to M-Pesa wallet * `cancelled` - Payout cancelled *** ## Payout for a Customer To process payouts on behalf of a customer, include the customer's profile ID: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "X-BU-PROFILE-ID: CUSTOMER_PROFILE_ID" \ -H "Authorization: Bearer YOUR_SECRET_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDT", "target_currency": "NGN", "source_amount": "100", "pay_out": { "type": "bank_transfer", "recipient_id": "677bbf9c7cf061f23784555a" } }' ``` The payout will be processed from the customer's balance. *** ## Payout Methods by Country
Country Currency Method Recipient Type
Nigeria NGN Bank transfer ngn\_bank
Kenya KES M-Pesa mobile money mpesa\_mobile\_money
*** ## Important Notes * Recipients must be created before payouts * Quotes expire after 30 minutes * Fees are deducted from the payout amount * Use webhooks for real-time status updates * Bank transfers typically complete within minutes * Mobile money transfers are usually instant *** ## Learn More * [Process Payouts Guide](/guides/payouts/process-payouts) - Detailed payout guide * [Create Recipients](/guides/recipients/create-and-manage) - Recipient management * [Understanding Quotes](/overview/quotes) - How quotes work * [Webhooks Setup](/guides/webhooks/setup) - Monitor payouts in real-time * [Initiate Transactions on Behalf of Customers](/guides/customers/transactions-on-behalf) - Customer transactions # Buy Crypto with Fiat Source: https://docs.busha.io/examples/fiat-to-crypto Buy cryptocurrency with fiat currency using Busha's API. This example shows you how to buy cryptocurrency (USDT, BTC, etc.) with fiat currency (NGN, KES) using Busha's API. ## Use Cases * Buy Bitcoin with local currency * Buy stablecoins for international payments * Purchase crypto from local currency balance ## Example: Buy Crypto with Fiat ### Buy USDT with 50,000 NGN via Bank Transfer Create a quote with temporary bank account funding: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "NGN", "target_currency": "USDT", "source_amount": "50000", "pay_in": { "type": "temporary_bank_account" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_gCcLjJ0P0uEc", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "NGN", "target_currency": "USDT", "source_amount": "50000", "target_amount": "33.48543819", "rate": { "product": "USDTNGN", "rate": "1490.2", "side": "buy", "type": "FIXED", "source_currency": "NGN", "target_currency": "USDT" }, "fees": [ { "amount": { "amount": "100", "currency": "NGN" }, "name": "payment gateway fee", "type": "FIXED" } ], "pay_in": { "type": "temporary_bank_account" }, "pay_out": { "type": "balance" }, "reference": "QUO_gCcLjJ0P0uEc", "status": "pending", "expires_at": "2026-01-23T11:34:17.175170741Z", "created_at": "2026-01-23T11:04:17.175146315Z", "updated_at": "2026-01-23T11:04:17.175146315Z" } } ``` Use the quote ID to get temporary bank details: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_gCcLjJ0P0uEc" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_JSaOYnl7Sla0", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_gCcLjJ0P0uEc", "description": "Bought USDT", "sub_description": "With NGN", "source_currency": "NGN", "target_currency": "USDT", "source_amount": "50000", "target_amount": "33.48543819", "trade": "buy", "rate": { "product": "USDTNGN", "rate": "1490.2", "side": "buy", "type": "FIXED", "source_currency": "NGN", "target_currency": "USDT" }, "fees": [ { "amount": { "amount": "100", "currency": "NGN" }, "name": "payment gateway fee", "type": "FIXED" } ], "pay_in": { "expires_at": "2026-01-23T11:37:32.289498887Z", "recipient_details": { "account_name": "BIBAGE TECHNOLOGIES LTD || Liverppol Business", "account_number": "0327318166", "bank_code": "090614", "bank_name": "Aella Microfinance Bank", "email": "ajibola@busha.co" }, "type": "temporary_bank_account" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2026-01-23T11:07:31.197428968Z", "updated_at": "2026-01-23T11:07:31.197429043Z" } } ``` **Important:** Transfer exactly ₦50,000 to the provided bank account before the expiration time. The USDT will be credited to your balance once payment is confirmed. Monitor the transfer to confirm the purchase completed successfully: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_JSaOYnl7Sla0 \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` ```json theme={null} { "status": "success", "message": "Fetched transfer successfully", "data": { "id": "TRF_JSaOYnl7Sla0", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_gCcLjJ0P0uEc", "description": "Bought USDT", "sub_description": "With NGN", "source_currency": "NGN", "target_currency": "USDT", "source_amount": "50000", "target_amount": "33.48543819", "trade": "buy", "rate": { "product": "USDTNGN", "rate": "1490.2", "side": "buy", "type": "FIXED", "source_currency": "NGN", "target_currency": "USDT" }, "fees": [ { "amount": { "amount": "100", "currency": "NGN" }, "name": "payment gateway fee", "type": "FIXED" } ], "pay_in": { "expires_at": "2026-01-23T11:37:32.289498887Z", "recipient_details": { "account_name": "BIBAGE TECHNOLOGIES LTD || Liverppol Business", "account_number": "0327318166", "bank_code": "090614", "bank_name": "Aella Microfinance Bank", "email": "ajibola@busha.co" }, "type": "temporary_bank_account" }, "status": "funds_converted", "timeline": { "total_steps": 3, "current_step": 3, "transfer_status": "funds_converted", "events": [ { "step": 1, "done": true, "status": "pending", "title": "Transfer Started", "description": "Waiting for your NGN payment", "timestamp": "2026-01-23T11:07:34.553579Z" }, { "step": 2, "done": true, "status": "funds_received", "title": "Payment Received", "description": "We received your NGN Payment", "timestamp": "2026-01-23T11:07:34.553579Z" }, { "step": 3, "done": true, "status": "funds_converted", "title": "Funds Converted", "description": "Your USDT has been added to your wallet.", "timestamp": "2026-01-23T11:07:34.65765Z" } ] }, "created_at": "2026-01-23T11:07:31.197428Z", "updated_at": "2026-01-23T11:07:35.404245Z" } } ``` ### Buy BTC with 1,000 KES First, create a quote to see the exchange rate and how much crypto you'll receive: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "KES", "target_currency": "BTC", "source_amount": "1000", "pay_in": { "type": "balance" } }' ``` ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_a5D3oflYiz78", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "source_currency": "KES", "target_currency": "BTC", "source_amount": "1000", "target_amount": "0.00008471", "rate": { "product": "BTCKES", "rate": "11803984.7", "side": "buy", "type": "FIXED", "source_currency": "KES", "target_currency": "BTC" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "reference": "QUO_a5D3oflYiz78", "status": "pending", "expires_at": "2025-11-20T16:00:35.039961155Z", "created_at": "2025-11-20T15:30:35.039935771Z" } } ``` Use the quote ID to finalize the purchase: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_a5D3oflYiz78" }' ``` ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_vvTf73YOwNFD", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_a5D3oflYiz78", "description": "Bought BTC", "sub_description": "With KES", "source_currency": "KES", "target_currency": "BTC", "source_amount": "1000", "target_amount": "0.00008471", "trade": "buy", "rate": { "product": "BTCKES", "rate": "11803984.7", "side": "buy", "type": "FIXED" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "pending", "timeline": { "total_steps": 0, "current_step": 0, "transfer_status": "", "events": [] }, "created_at": "2025-11-20T15:33:06.12036014Z", "updated_at": "2025-11-20T15:33:06.12036014Z" } } ``` Monitor the transfer to confirm the purchase completed successfully: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/transfers/TRF_vvTf73YOwNFD \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` ```json theme={null} { "status": "success", "message": "Fetched transfer successfully", "data": { "id": "TRF_vvTf73YOwNFD", "profile_id": "BUS_CQr0jPzGGzmn1uW5W7OVs", "quote_id": "QUO_a5D3oflYiz78", "description": "Bought BTC", "sub_description": "With KES", "source_currency": "KES", "target_currency": "BTC", "source_amount": "1000", "target_amount": "0.00008471", "trade": "buy", "rate": { "product": "BTCKES", "rate": "11803984.7", "side": "buy", "type": "FIXED" }, "fees": [], "pay_in": { "type": "balance" }, "pay_out": { "type": "balance" }, "status": "funds_converted", "timeline": { "total_steps": 2, "current_step": 2, "transfer_status": "funds_converted", "events": [ { "step": 1, "done": true, "status": "funds_received", "title": "Payment Received", "description": "Funded from Balance" }, { "step": 2, "done": true, "status": "funds_converted", "title": "Funds Converted", "description": "Your BTC has been added to your wallet." } ] }, "created_at": "2025-11-20T15:33:06.12036Z", "updated_at": "2025-11-20T15:33:07.456789Z" } } ``` *** ## Other Currency Combinations **Buy ETH with NGN** ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "NGN", "target_currency": "ETH", "source_amount": "100000", "pay_in": { "type": "balance" } }' ``` **Buy ETH with KES** ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "KES", "target_currency": "ETH", "source_amount": "5000", "pay_in": { "type": "balance" } }' ``` *** ## Learn More * [Understanding Quotes](/overview/quotes) - Deep dive into how quotes work * [Create Your First Quote](/guides/quotes/create-first-quote) - Step-by-step guide * [Supported Currencies](/guides/reference/supported-currencies) - See all available currency pairs * [Transfer Status Reference](/guides/reference/transfer-status) - All possible transfer statuses # Introduction to Examples Source: https://docs.busha.io/examples/introduction Explore practical code examples and integration patterns for common Busha use cases. Welcome to the Busha Examples section. Here you'll find **production-ready code snippets** for the most common integration patterns. Each example is designed to be copied and adapted to your use case. **What You'll Achieve:** * Get working code examples you can copy and use immediately in your application * See complete end-to-end implementations with real API requests and responses * Learn best practices through practical, production-ready patterns * Quickly integrate Busha features without reading through lengthy documentation ## Prerequisites Before using these examples, ensure you have: * A Busha Business Account ([Sign up here](https://dash.busha.io/business/signup)) * [API Keys (Secret and Public) from your dashboard](/guides/getting-started/generate-api-key) ## How to Use These Examples 1. **Copy the code** - Each example is complete and ready to use 2. **Replace credentials** - Update `YOUR_SECRET_KEY`, `YOUR_BASE_URL`, etc. with your actual values 3. **Test in sandbox** - Always test in the sandbox environment first 4. **Adapt to your needs** - Modify parameters to fit your specific use case 5. **Read the guides** - Each example links to detailed guides for deeper understanding ## Quick Links Convert NGN/KES to USDT, BTC, and other cryptocurrencies Cash out crypto to bank accounts or mobile money Process crypto-to-fiat payouts to bank accounts and mobile money Create shareable payment links for invoices and products ## Need More Help? * **Detailed Guides:** Check our [Guides section](/guides) for step-by-step tutorials * **API Reference:** See the [API Reference](/api-reference) for complete endpoint documentation * **Support:** Contact us at [developers@busha.co](mailto:developers@busha.co) All examples use sandbox URLs and test data. Remember to switch to production URLs and real API keys when going live. # Payment Links Source: https://docs.busha.io/examples/payment-links Create payment links to accept crypto payments from customers. This example shows you how to create and manage payment links for accepting crypto payments. ## Use Cases * E-commerce product checkout * Invoice payments * Donation campaigns * Subscription billing * Service payments ## Reusable Payment Links Reusable payment links can be used multiple times by different customers. They're ideal for ongoing sales, subscriptions, or recurring donations. ### Create a Fixed Amount Reusable Link Create a payment link for a specific amount that can be used multiple times: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/payments/links \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "fixed": true, "one_time": false, "name": "Product Payment Example", "title": "Buy Premium Package", "description": "Payment for premium subscription", "quote_amount": "10000", "quote_currency": "NGN", "target_currency": "USDT", "require_extra_info": [ { "field_name": "email", "required": true } ], "dry_run": false }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Payment link created successfully", "data": { "id": "YgFdIGWCWY3G", "profile_id": "BUS_9rDAqqREdmMQcQj3zsRlL", "fixed": true, "one_time": false, "name": "Product Payment Example", "title": "Buy Premium Package", "description": "Payment for premium subscription", "quote_amount": "10000", "quote_currency": "NGN", "target_currency": "USDT", "meta": { "require_extra_info": [ { "field_name": "email", "required": true } ] }, "status": "active", "created_at": "2025-10-30T11:29:42.842496434Z", "updated_at": "2025-10-30T11:29:42.842496434Z", "link": "YgFdIGWCWY3G" } } ``` ### Create a Variable Amount Reusable Link Create a payment link where customers choose their own amount: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/payments/links \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "fixed": false, "one_time": false, "name": "Donation Link", "title": "Support Our Project", "description": "Donate any amount you wish", "quote_currency": "NGN", "target_currency": "USDT", "require_extra_info": [ { "field_name": "email", "required": true } ], "dry_run": false }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Payment link created successfully", "data": { "id": "AAuHvoU6NkKs", "profile_id": "BUS_9rDAqqREdmMQcQj3zsRlL", "fixed": false, "one_time": false, "name": "Donation Link", "title": "Support Our Project", "description": "Donate any amount you wish", "quote_currency": "NGN", "target_currency": "USDT", "meta": { "require_extra_info": [ { "field_name": "email", "required": true } ] }, "status": "active", "created_at": "2025-10-30T11:30:29.223574773Z", "updated_at": "2025-10-30T11:30:29.223574773Z", "link": "AAuHvoU6NkKs" } } ``` ## One-Time Payment Links One-time payment links are designed for single-use scenarios like invoices or unique transactions. Once paid, the link becomes inactive. ### Create a One-Time Fixed Amount Link ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/payments/links \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "fixed": true, "one_time": true, "name": "Invoice #12345", "title": "Pay Invoice", "description": "One-time invoice payment", "quote_amount": "50000", "quote_currency": "NGN", "target_currency": "USDT", "require_extra_info": [ { "field_name": "email", "required": true } ] }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Payment link created successfully", "data": { "id": "XyZ123AbC", "profile_id": "BUS_9rDAqqREdmMQcQj3zsRlL", "fixed": true, "one_time": true, "name": "Invoice #12345", "title": "Pay Invoice", "description": "One-time invoice payment", "quote_amount": "50000", "quote_currency": "NGN", "target_currency": "USDT", "meta": { "require_extra_info": [ { "field_name": "email", "required": true } ] }, "status": "active", "created_at": "2025-10-30T11:35:42.842496434Z", "updated_at": "2025-10-30T11:35:42.842496434Z", "link": "XyZ123AbC" } } ``` ## Retrieve a Payment Link Get details of an existing payment link: ```bash theme={null} curl -X GET https://api.sandbox.busha.so/v1/payments/links/YgFdIGWCWY3G \ -H "Authorization: Bearer YOUR_SECRET_KEY" ``` **Response:** ```json theme={null} { "status": "success", "message": "Payment link retrieved successfully", "data": { "id": "YgFdIGWCWY3G", "profile_id": "BUS_9rDAqqREdmMQcQj3zsRlL", "fixed": true, "one_time": false, "name": "Product Payment Example", "title": "Buy Premium Package", "description": "Payment for premium subscription", "quote_amount": "10000", "quote_currency": "NGN", "target_currency": "USDT", "meta": { "require_extra_info": [ { "field_name": "email", "required": true } ] }, "status": "active", "created_at": "2025-10-30T11:29:42.842496Z", "updated_at": "2025-10-30T11:29:42.842496Z", "link": "YgFdIGWCWY3G", "pub_key": "pub_iSQAgqGFoVZOaVjYM8ZeW" } } ``` ## Update a Payment Link Modify an existing payment link: ```bash theme={null} curl -X PATCH https://api.sandbox.busha.so/v1/payments/links/YgFdIGWCWY3G \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Updated Product Payment", "description": "Updated: Premium subscription - now 15,000 NGN", "quote_amount": "15000" }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Payment link updated successfully", "data": { "id": "YgFdIGWCWY3G", "profile_id": "BUS_9rDAqqREdmMQcQj3zsRlL", "fixed": true, "one_time": false, "name": "Updated Product Payment", "title": "Buy Premium Package", "description": "Updated: Premium subscription - now 15,000 NGN", "quote_amount": "15000", "quote_currency": "NGN", "target_currency": "USDT", "meta": { "require_extra_info": [ { "field_name": "email", "required": true } ] }, "status": "active", "created_at": "2025-10-30T11:29:42.842496Z", "updated_at": "2025-10-30T11:33:05.58691Z", "link": "YgFdIGWCWY3G" } } ``` ## Learn More * [Payment Requests Guide](/guides/payment-requests/create-first-payment) - Create payment requests from links * [Accepting Stablecoins Guide](/guides/accepting-stablecoin-payments/payment-links) - How to accept USDT and other stablecoins with payment links * [Accepting Stablecoin Payments with the Widget](/guides/accepting-stablecoin-payments/payment-widget) - How to add stablecoin checkout to your website or app * [Webhooks Setup](/guides/webhooks/setup) - Monitor payment link transactions * [API Reference](/api-reference) - Complete payment links API documentation # Processing Markups Source: https://docs.busha.io/examples/processing-markups Add custom markup fees to transactions and generate revenue. 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). Charge the customer 5,500 NGN (5,000 NGN + 500 NGN markup): ```bash theme={null} 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:** ```json theme={null} { "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" } } ``` Generate the temporary bank account for customer deposit: ```bash theme={null} 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:** ```json theme={null} { "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. 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. ```json theme={null} { "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. Convert only 5,000 NGN to USDT (keeping 500 NGN as profit): ```bash theme={null} 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:** ```json theme={null} { "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" } } } ``` Finalize the conversion: ```bash theme={null} 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 *** ## Example: Sell USDT for NGN with Markup A customer wants to sell 50 USDT for NGN. You want to charge a 5% markup. Create a quote to see how much NGN the customer will receive: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDT", "target_currency": "NGN", "source_amount": "50" }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_8xTKmNpR2vWq", "profile_id": "BUS_9rDAqqREdmMQcQj3zsRlL", "source_currency": "USDT", "target_currency": "NGN", "source_amount": "50", "target_amount": "74487", "rate": { "product": "USDTNGN", "rate": "1489.74", "side": "sell", "type": "FIXED", "source_currency": "USDT", "target_currency": "NGN" }, "fees": [], "reference": "QUO_8xTKmNpR2vWq", "status": "pending", "expires_at": "2025-11-27T14:43:26.906019648Z", "created_at": "2025-11-27T14:13:26.905993939Z" } } ``` **Calculate your markup:** * Base amount: ₦74,487 * 5% markup: ₦3,724 * Customer receives: ₦70,763 (₦74,487 - ₦3,724) * You keep: ₦3,724 as profit Use the quote ID to finalize the conversion: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_8xTKmNpR2vWq" }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_2mKpVxNzQwYr", "profile_id": "BUS_9rDAqqREdmMQcQj3zsRlL", "quote_id": "QUO_8xTKmNpR2vWq", "description": "Sold USDT", "sub_description": "For NGN", "source_currency": "USDT", "target_currency": "NGN", "source_amount": "50", "target_amount": "74487", "trade": "sell", "rate": { "product": "USDTNGN", "rate": "1489.74", "side": "sell", "type": "FIXED" }, "fees": [], "status": "pending", "created_at": "2025-11-27T14:14:06.134616492Z" } } ``` **Your transaction breakdown:** * 50 USDT converted to ₦74,487 (from Busha) * Customer paid: ₦70,763 (after your 5% markup) * Your profit: ₦3,724 You would then send ₦70,763 to the customer via bank transfer or their preferred payout method, keeping ₦3,724 as your service fee. ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "NGN", "target_currency": "NGN", "target_amount": "70763", "pay_out": { "type": "bank_transfer", "recipient_id": "63837bdybd3783bd" } }' ``` *** ## Example: Crypto Payout with Markup A customer wants to withdraw 100 USDT to their external wallet. You want to charge a 2% markup (withdrawal fee). **Customer request:** Withdraw 100 USDT **Your calculation:** * Gross amount: 100 USDT * 2% markup: 2 USDT * Net payout: 98 USDT (amount customer actually receives) * You keep: 2 USDT as profit Create a crypto recipient for the customer's external wallet address: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/recipients \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "crypto", "currency": "USDT", "network": "TRX", "address": "TTc5HBAEETmqPTarVUU3xLB3fY7b1YxNzm", "account_name": "Customer Wallet" }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Recipient created successfully", "data": { "id": "6996cd8c772863763d64f3e3", "type": "crypto", "currency": "USDT", "network": "TRX", "address": "TTc5HBAEETmqPTarVUU3xLB3fY7b1YxNzm", "account_name": "Customer Wallet" } } ``` Create a quote for the net amount (98 USDT) that the customer will actually receive: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "USDT", "target_currency": "USDT", "source_amount": "98", "pay_in": { "type": "balance" }, "pay_out": { "type": "address", "recipient_id": "6996cd8c772863763d64f3e3" } }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_payoutNet98USDT", "source_currency": "USDT", "target_currency": "USDT", "source_amount": "98", "target_amount": "98", "pay_in": { "type": "balance" }, "pay_out": { "type": "address", "recipient_id": "6996cd8c772863763d64f3e3", "network": "TRX" }, "status": "pending" } } ``` Finalize the payout: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_payoutNet98USDT" }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_cryptoPayout", "quote_id": "QUO_payoutNet98USDT", "source_amount": "98", "source_currency": "USDT", "target_amount": "98", "target_currency": "USDT", "pay_out": { "type": "address", "address": "TTc5HBAEETmqPTarVUU3xLB3fY7b1YxNzm", "network": "TRX" }, "status": "pending" } } ``` **Result:** * Customer receives: 98 USDT in their external wallet * You spent: 98 USDT from your balance * You keep: 2 USDT as profit (from the original 100 USDT customer paid you) If webhooks are set up, you'll receive notifications as the payout progresses: ```json theme={null} { "event": "transfer.completed", "data": { "transfer_id": "TRF_cryptoPayout", "source_amount": "98", "source_currency": "USDT", "status": "completed", "pay_out": { "type": "address", "address": "TTc5HBAEETmqPTarVUU3xLB3fY7b1YxNzm", "network": "TRX" } } } ``` **Transaction Summary:** * Customer paid you: 100 USDT * Customer received: 98 USDT * Your markup profit: 2 USDT * Network fee: Covered by Busha *** ## Example: Bank Payout with Markup A customer wants to withdraw 50,000 NGN to their bank account. You charge a 1% markup (500 NGN). **Customer request:** Withdraw 50,000 NGN **Your calculation:** * Gross amount: 50,000 NGN * 1% markup: 500 NGN * Net payout: 49,500 NGN * You keep: 500 NGN as profit Create a recipient for the customer's bank account: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/recipients \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "currency": "NGN", "country_code": "NG", "type": "ngn_bank", "bank_name": "GUARANTY TRUST BANK", "bank_code": "000013", "account_number": "0123456789", "account_name": "John Doe" }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Recipient created successfully", "data": { "id": "69980a2c70586e72bb718d1aa", "type": "ngn_bank", "currency": "NGN", "bank_name": "GUARANTY TRUST BANK", "bank_code": "000013", "account_number": "0123456789", "account_name": "John Doe" } } ``` Create a quote for 49,500 NGN (after your 1% markup): ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/quotes \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_currency": "NGN", "target_currency": "NGN", "source_amount": "49500", "pay_in": { "type": "balance" }, "pay_out": { "type": "bank_transfer", "recipient_id": "69980a2c70586e72bb718d1aa" } }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created quote successfully", "data": { "id": "QUO_bankPayout49500", "source_currency": "NGN", "target_currency": "NGN", "source_amount": "49500", "target_amount": "49500", "pay_out": { "type": "bank_transfer", "recipient_id": "69980a2c70586e72bb718d1aa" }, "fees": [ { "name": "Transfer Fee", "amount": "107.50", "type": "FIXED", "currency": "NGN" } ], "status": "pending" } } ``` Finalize the bank transfer: ```bash theme={null} curl -X POST https://api.sandbox.busha.so/v1/transfers \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "quote_id": "QUO_bankPayout49500" }' ``` **Response:** ```json theme={null} { "status": "success", "message": "Created transfer successfully", "data": { "id": "TRF_bankPayout", "quote_id": "QUO_bankPayout49500", "source_amount": "49500", "target_amount": "49500", "pay_out": { "type": "bank_transfer", "recipient_details": { "account_name": "John Doe", "account_number": "0123456789", "bank_name": "GUARANTY TRUST BANK" } }, "status": "pending" } } ``` **Result:** * Customer receives: ₦49,500 in their bank account * You spent: ₦49,607.50 from your balance (₦49,500 + ₦107.50 transfer fee) * Your markup profit: ₦500 (before transfer fee) * Net profit: ₦392.50 (after ₦107.50 transfer fee) *** ## Learn More * [Customer Deposits](/examples/customer-deposits) - Accept fiat and crypto deposits * [Sell Crypto for Fiat](/examples/crypto-to-fiat) - Sell cryptocurrency for fiat * [Webhooks Setup](/guides/webhooks/setup) - Monitor transaction status * [Understanding Quotes](/overview/quotes) - How quotes work # Accept Stablecoin with Mobile SDK Source: https://docs.busha.io/guides/accepting-stablecoin-payments/mobile-sdks Add Busha crypto checkout to your iOS, Android, or Flutter app using the Busha Pay mobile SDKs. The Busha Pay mobile SDKs let you embed a crypto checkout experience directly into your mobile app. Users can pay with their Busha wallet or externally without leaving your app. Four SDKs are available; React Native, iOS (Swift), Android (Kotlin), and Flutter. **What You'll Achieve:** 1. Install the Busha Pay SDK for your platform 2. Initialize the SDK with your public key 3. Launch checkout and handle payment results 4. Configure platform-specific deep link callbacks ## Prerequisites Before you begin, ensure you have: * A Busha Business Account and Public API Key (from the [Quick Start Tutorial](../getting-started/quick-start)). * A React Native, iOS, Android, or Flutter mobile application. **Important Note:** The mobile SDKs use your Public API Key, not your Secret API Key. 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**. ## Installation View the full React Native SDK source, releases, and changelog on GitHub. **Requirements:** React Native 0.68+, Node.js 18+ Install the SDK and its peer dependencies: ```bash theme={null} npm install @busha/pay-react-native react-native-webview expo-application # or yarn add @busha/pay-react-native react-native-webview expo-application ``` **Installing from GitHub releases** Each release ships an npm-installable tarball on GitHub under tags shaped `react-native/v`. You can install directly without going through the npm registry: ```bash theme={null} npm install https://github.com/bushaHQ/pay/releases/download/react-native/v0.0.1/busha_pay_react_native-0.0.1.tgz # or with yarn: yarn add https://github.com/bushaHQ/pay/releases/download/react-native/v0.0.1/busha_pay_react_native-0.0.1.tgz ``` Then install the peer dependencies separately: ```bash theme={null} npm install react-native-webview expo-application ``` **Bare React Native setup** If your app is bare React Native (not Expo), run this once to enable Expo modules: ```bash theme={null} npx install-expo-modules@latest ``` Expo managed, Expo dev client, and Expo Go users can skip this step. View the full iOS SDK source, releases, and Swift Package Manager setup on GitHub. **Requirements:** iOS 14+, Swift 5.9+, Xcode 15+ **Installing via Swift Package Manager (recommended)** In Xcode, go to **File → Add Package Dependencies…** and enter: [https://github.com/bushaHQ/pay-ios](https://github.com/bushaHQ/pay-ios) Select your version, choose the `BushaPay` library, and add it to your app target. For `Package.swift`: ```swift theme={null} .package(url: "https://github.com/bushaHQ/pay-ios", from: "0.0.1"), ``` Then add `BushaPay` as a dependency to your target: ```swift theme={null} .target( name: "YourApp", dependencies: ["BushaPay"] ) ``` The SDK is authored in the [bushaHQ/pay](https://github.com/bushaHQ/pay) monorepo under `ios/`. Each release is mirrored to the standalone [bushaHQ/pay-ios](https://github.com/bushaHQ/pay-ios) repository so Swift Package Manager can resolve it correctly. Issues, PRs, and source code live in the monorepo. View the full Android SDK source, releases, and changelog on GitHub. **Requirements:** Android 5.0 (API 21)+, Kotlin 1.9+, AndroidX **Installing via JitPack** Add the JitPack repository to your `settings.gradle.kts`: ```kotlin theme={null} dependencyResolutionManagement { repositories { google() mavenCentral() maven { url = uri("https://jitpack.io") } } } ``` Then add the dependency to your module's `build.gradle.kts`: ```kotlin theme={null} dependencies { implementation("com.github.bushaHQ.pay-android:pay-android:0.0.1") } ``` The SDK is authored in the [bushaHQ/pay](https://github.com/bushaHQ/pay) monorepo under `android/`. Each release is mirrored to the standalone [bushaHQ/pay-android](https://github.com/bushaHQ/pay-android) repository that JitPack builds from. Issues, PRs, and source code live in the monorepo. The SDK ships with a single runtime dependency — `androidx.webkit` — which it uses to inject the checkout bridge reliably across WebView versions. View the full Flutter SDK package, documentation, and changelog on pub.dev. **Requirements:** Flutter 3.0+, Dart 3.0+ **Installing from pub.dev (recommended)** Add `busha_pay` to your `pubspec.yaml`: ```yaml theme={null} dependencies: busha_pay: ^0.0.1 ``` Then run: ```bash theme={null} flutter pub get ``` **Installing from GitHub** Each release ships as a zipped artifact on GitHub under tags shaped `flutter/v`. To install directly from the monorepo without going through pub.dev: ```yaml theme={null} dependencies: busha_pay: git: url: https://github.com/bushaHQ/pay ref: flutter/v0.0.1 path: flutter ``` Replace `v0.0.1` with the version you want. Every git checkout re-resolves from the tagged commit, so your lockfile stays reproducible. ## Initialize the SDK Initialize once at app startup before any checkout is triggered. Wrap your root component with `BushaPayProvider`. The provider calls `BushaPay.init()` on mount and auto-detects your app's bundle ID. ```javascript theme={null} import { BushaPayProvider } from '@busha/pay-react-native' export default function App() { return ( ) } ``` Use `environment="live"` for production. Call `BushaPay.initialize` in your `AppDelegate` or `@main` app before any views load: ```swift theme={null} import BushaPay BushaPay.initialize( publicKey: "pub_xxx", environment: .sandbox // or .live ) ``` Call `BushaPay.initialize` once from your `Application` class: ```kotlin theme={null} import android.app.Application import co.busha.pay.BushaEnvironment import co.busha.pay.BushaPay class MyApp : Application() { override fun onCreate() { super.onCreate() BushaPay.initialize( context = this, publicKey = "pub_xxx", environment = BushaEnvironment.SANDBOX, // or BushaEnvironment.LIVE ) } } ``` Call `BushaPay.init` in `main()` before `runApp`: ```dart theme={null} import 'package:busha_pay/busha_pay.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); await BushaPay.init( publicKey: 'pub_xxx', environment: BushaEnvironment.sandbox, // or .live ); runApp(const MyApp()); } ``` ## Launch Checkout ```javascript theme={null} import { Button } from 'react-native' import { useBushaPay } from '@busha/pay-react-native' function PayButton() { const { checkout } = useBushaPay() const onPress = async () => { const result = await checkout({ quoteAmount: '10000', quoteCurrency: 'NGN', targetCurrency: 'NGN', sourceCurrency: 'USDT', metaName: 'John Doe', metaEmail: 'john@example.com', }) switch (result.type) { case 'success': console.log('Payment completed:', result.paymentId) break case 'cancelled': console.log('Cancelled:', result.reason) break case 'error': console.log('Error:', result.message) break } } return