BazarExchange

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:

https://manager.bazarexchange.ltd/api

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

/order/b2l

Request Body

The body of the request must be in JSON format and include the following parameters:

ParameterTypeDescription
amountstringThe USD $ amount of the order.
keystringYour API key.
addressstringThe receiving Litecoin (LTC) address for the payment.
adjustmentChoicestringA string to specify amount adjusting decision. options 'buy_more_ltc', 'buy_less_ltc' , 'pay_extra'
callbackUrlstringA callbackUrl where payment updates will be forwarded to.

Example Request

Headers
{
  "Content-Type": "application/json"
}
Payload
{
  "amount": "1",
  "key": "your_api_key_here",
  "address": "abc",
  "adjustmentChoice": "buy_more_ltc",
  "callbackUrl": "https://yourwebsite.com/callback"
}

Response

The response will be in JSON format and include the following parameters:

FieldTypeDescription
paymentIdstringUnique identifier for the payment.
paymentRequestIdstringID for the payment request.
paymentLinkstringURL for the user to complete the payment.
amountUsdnumberThe amount to be paid in USD.
amountBdtstringThe equivalent amount in BDT (Bangladeshi Taka).
amountBdtWithFeesstringThe total amount in BDT including any fees.
extraAmountstringAny extra amount (if applicable).
extraUsdAmountstringAny extra USD amount (if applicable).
rateCalculationstringThe rate formula used to convert the amount.
countrystringThe country for the transaction (e.g., "bd" for Bangladesh).
currencystringThe currency used for the transaction (e.g., "BDT" for Bangladeshi Taka).
userIdstringThe ID of the user making the transaction.
guildIdstringA reference ID used for internal purposes.
channelIdstringAnother reference ID used for internal purposes.
addressstringThe address used for the transaction (same as in the request).
ticketIdstringThe ticket ID for this transaction, which can be used for tracking or support purposes.

Example Response

{
  "paymentId": "YVrVrc80xT",
  "paymentRequestId": "3600",
  "paymentLink": "https://payment.bazarexchange.ltd/checkout/agent/siyamhosan/pcf/irjmxbeEo4wZLQdVsRrv0AkfizJjs9Wh1qYscvQUS3c4g3sWcAV1KvmHEXlg9BF5E9dEjY11VFwxcVbRe5kaBNvgBem2v?callback=https://manager.bazarexchange.ltd/callbackverify/payment?payment_id=YVrVrc80xT&currency=BDT",
  "amountUsd": 1.01325019,
  "amountBdt": "130.00",
  "amountBdtWithFees": "130.00",
  "extraAmount": "0.00",
  "extraUsdAmount": "0.00",
  "rateCalculation": "((%amount%- 0) - ((%amount%- 0) * 0) / 100) / 128.3",
  "country": "bd",
  "currency": "BDT",
  "userId": "1155163910954037320",
  "guildId": "1271138054794379406",
  "channelId": "1289811422217371648",
  "address": "abc",
  "ticketId": "7238"
}

Example Callback Request

Http Method

POST

{
  "id": 1,
  "identifier": "1",
  "guildId": "1271138054794379406",
  "userId": "1155163910954037320",
  "ticketId": "7238",
  "amount": "130.00",
  "currency": "BDT",
  "country": "bd",
  "confirmationDetails": "confirmed",
  "confirmedBy": "admin",
  "confirmedAt": "2021-09-01T00:00:00Z",
  "type": "gateway",
  "proof": "",
  "proofImage": "",
  "confirmedAmount": "130.00",
  "inquiries": [],
  "state": "confirmed" | "waiting" | "inquiry" | "denied" | "rejected",
  "createdAt": "2021-09-01T00:00:00Z"
}

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].

On this page