Introduction Bazar Exchange API
Introduction
The Bazar Exchange API provides seamless integration for processing payments in various currencies, including USD and BDT. This API enables users to make purchases, adjust balances, and get payment links for checkout, which can be integrated into websites or applications.
Base URL
The base URL for the API is:
Authentication
API requests must include the key as a part of the payload. This key is used to verify the API call and must be provided in each request.
Contract ByteBender (CEO) for API Key
Endpoints
1. Create an Bdt to Ltc Order: /order/b2l
This endpoint is used to create an order for purchasing Litecoin (LTC) with BDT. The request returns a payment link for the user to complete the transaction.
HTTP Method
POST
Endpoint
Request Body
The body of the request must be in JSON format and include the following parameters:
| Parameter | Type | Description |
|---|---|---|
amount | string | The USD $ amount of the order. |
key | string | Your API key. |
address | string | The receiving Litecoin (LTC) address for the payment. |
adjustmentChoice | string | A string to specify amount adjusting decision. options 'buy_more_ltc', 'buy_less_ltc' , 'pay_extra' |
callbackUrl | string | A callbackUrl where payment updates will be forwarded to. |
Example Request
Headers
Payload
Response
The response will be in JSON format and include the following parameters:
| Field | Type | Description |
|---|---|---|
paymentId | string | Unique identifier for the payment. |
paymentRequestId | string | ID for the payment request. |
paymentLink | string | URL for the user to complete the payment. |
amountUsd | number | The amount to be paid in USD. |
amountBdt | string | The equivalent amount in BDT (Bangladeshi Taka). |
amountBdtWithFees | string | The total amount in BDT including any fees. |
extraAmount | string | Any extra amount (if applicable). |
extraUsdAmount | string | Any extra USD amount (if applicable). |
rateCalculation | string | The rate formula used to convert the amount. |
country | string | The country for the transaction (e.g., "bd" for Bangladesh). |
currency | string | The currency used for the transaction (e.g., "BDT" for Bangladeshi Taka). |
userId | string | The ID of the user making the transaction. |
guildId | string | A reference ID used for internal purposes. |
channelId | string | Another reference ID used for internal purposes. |
address | string | The address used for the transaction (same as in the request). |
ticketId | string | The ticket ID for this transaction, which can be used for tracking or support purposes. |
Example Response
Example Callback Request
Http Method
POST
Conclusion
This API provides a simple interface for handling cryptocurrency payments. Ensure to secure your API key and use the provided endpoints to create, manage, and validate orders. For further support, please contact us at [email protected].