### POST /auth/signin Source: https://docs.ibexmercado.com/reference/quick-start-1 Authenticates a user with their email and password to receive an access token and a refresh token for subsequent API requests. ```APIDOC ## POST /auth/signin ### Description Authenticates a user and returns a set of tokens required for authorized API requests. ### Method POST ### Endpoint https://api-sandbox.poweredbyibex.io/auth/signin ### Parameters #### Request Body - **email** (string) - Required - The user's registered email address. - **password** (string) - Required - The user's password. ### Request Example { "email": "user@example.com", "password": "yourpassword" } ### Response #### Success Response (200) - **accessToken** (string) - JWT token for API authorization. - **refreshToken** (string) - Token used to refresh access. - **accessTokenExpiresAt** (integer) - Expiration timestamp for access token. - **refreshTokenExpiresAt** (integer) - Expiration timestamp for refresh token. #### Response Example { "accessToken": "eyJhbGci...", "refreshToken": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...", "accessTokenExpiresAt": 1647365307, "refreshTokenExpiresAt": 1647365307 } #### Error Response (400) - **error** (string) - Detailed error message explaining the failure. ``` -------------------------------- ### LNURL-Withdraw Request (Python) Source: https://docs.ibexmercado.com/reference/withdraw-from-a-lnurl-withdraw This Python code snippet demonstrates how to initiate a withdrawal using LNURL. It involves decoding the LNURL, making a GET request to the callback URL, and then a POST request to the withdrawal endpoint with the necessary parameters like callback, k1, and amountMsat. Ensure you have the 'requests' and 'lnurl' libraries installed. ```python import requests from lnurl import Lnurl, LnurlResponse, decode decoded = decode("xxx") # Put the LNURL-withdraw here. account_id = "xxx" r = requests.get(decoded.host + decoded.path + "?" + decoded.query) res = LnurlResponse.from_dict(r.json()) print(res) body = { "callback": res.callback, "k1": res.k1, "amountMsat": 999, # The amount to withdraw from a LNURL-withdraw } response = requests.post( "https://ibexhub.ibexmercado.com/lnurl/withdraw/account/" + account_id, headers={"Authorization": "xxx"}, json=body) print(response.status_code) print(response.json()) ``` -------------------------------- ### Making Authenticated GET Request with cURL Source: https://docs.ibexmercado.com/reference/making-authenticated-requests This example demonstrates how to make an authenticated GET request to the /account/all endpoint using cURL. It requires the HUB_URL and YOUR_ACCESS_TOKEN to be substituted with actual values. The Authorization header is used to pass the access token. ```bash curl --request GET \ --url '/account/all' \ --header 'Authorization: ' ``` -------------------------------- ### GET /currency/all Source: https://docs.ibexmercado.com/reference/get-all Retrieves a list of all available currencies supported by the Ibex Mercado system. ```APIDOC ## GET /currency/all ### Description Retrieves a list of all available currencies supported by the Ibex Mercado system. ### Method GET ### Endpoint /currency/all ### Parameters #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **currencies** (array) - A list of currency objects. - **id** (integer) - The unique identifier for the currency. - **name** (string) - The name of the currency. - **isFiat** (boolean) - Indicates if the currency is a fiat currency. - **symbol** (string) - The symbol representing the currency. - **accountEnabled** (boolean) - Indicates if the account for this currency is enabled. #### Response Example ```json { "currencies": [ { "id": 0, "name": "MSAT", "isFiat": false, "symbol": "MSAT", "accountEnabled": true } ] } ``` #### Error Response (400) - **error** (string) - A message describing the error. #### Error Response Example ```json { "error": "" } ``` ``` -------------------------------- ### Sign in to IBEXHub API (JSON) Source: https://docs.ibexmercado.com/reference/quick-start-1 This snippet demonstrates the JSON payload required to sign in to the IBEXHub API. It requires the user's email and password. The response includes an accessToken, refreshToken, and their expiration times. ```JSON { "email": "", "password": "" } ``` ```JSON { "accessToken": "", "refreshToken": "", "accessTokenExpiresAt": 1647365307, "refreshTokenExpiresAt": 1647365307 } ``` ```JSON { "error" : "" // error message } ``` -------------------------------- ### GET /lnurl/pay/all/{account} Source: https://docs.ibexmercado.com/reference/get-all-lnurl-pay Retrieves a list of all LNURL-pay configurations associated with a specific account identifier. ```APIDOC ## GET /lnurl/pay/all/{account} ### Description Retrieves all LNURL-pay strings associated with the specified account. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/lnurl/pay/all/{account} ### Parameters #### Path Parameters - **account** (string) - Required - Account associated with the LNURL-pay strings ### Request Example N/A (No request body required) ### Response #### Success Response (200) - **chargesRemaining** (integer) - Number of charges remaining - **amount** (integer) - The payment amount - **currency** (string) - The currency code - **expirationTime** (integer) - The timestamp for expiration #### Response Example [ { "chargesRemaining": 0, "amount": 0, "currency": "", "expirationTime": 0 } ] ``` -------------------------------- ### GET /crypto/receive-infos/options Source: https://docs.ibexmercado.com/reference/get-options Retrieves the available cryptocurrency receive options, allowing filtering by currency ID. ```APIDOC ## GET /crypto/receive-infos/options ### Description Retrieves a list of available network and currency options for receiving cryptocurrency. If no currency_id is provided, it returns options for all supported currencies. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/crypto/receive-infos/options ### Parameters #### Query Parameters - **currency_id** (integer) - Optional - ID of currency to filter when querying Crypto Receive Options. Default value 0 returns all options of all currencies. ### Request Example GET /crypto/receive-infos/options?currency_id=0 ### Response #### Success Response (200) - **network** (string) - The supported network for the transaction. - **currencyId** (string) - The identifier for the currency. #### Response Example { "network": "bitcoin", "currencyId": "0" } ``` -------------------------------- ### GET /splits Source: https://docs.ibexmercado.com/reference/get-configured-splits Retrieves a list of all payment splits configured for the IBEXHub account. ```APIDOC ## GET /splits ### Description Returns a list of all payment splits currently configured for the IBEXHub account. ### Method GET ### Endpoint /splits ### Response #### Success Response (200) - **splits** (array) - A list of split configuration objects. #### Response Example { "splits": [ { "id": "split_123", "percentage": 50 }, { "id": "split_456", "percentage": 50 } ] } ``` -------------------------------- ### GET /beneficiaries Source: https://docs.ibexmercado.com/reference/get-all-beneficiaries Retrieves a paginated list of beneficiaries from the system. ```APIDOC ## GET /beneficiaries ### Description Retrieves a list of beneficiaries. Supports pagination using page and limit query parameters. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/beneficiaries ### Parameters #### Query Parameters - **page** (string) - Optional - Default: 0. 0 is the first page. - **limit** (string) - Optional - Default: 10. ### Request Example GET /beneficiaries?page=0&limit=10 ### Response #### Success Response (200) - **id** (string) - The unique identifier of the beneficiary. - **name** (string) - The name of the beneficiary. #### Response Example { "id": "12345", "name": "John Doe" } ``` -------------------------------- ### GET /withdrawal-destinations/requirements Source: https://docs.ibexmercado.com/reference/get-requirements Retrieves a list of available off-ramp combinations, optionally filtered by a specific currency ID. ```APIDOC ## GET /withdrawal-destinations/requirements ### Description Fetches a list of available withdrawal destinations and off-ramp combinations. Use the currency_id parameter to filter results; a value of 0 returns all combinations for all currencies. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/withdrawal-destinations/requirements ### Parameters #### Query Parameters - **currency_id** (integer) - Optional - ID of currency to filter when querying Off Ramp Combinations. Default value 0 returns all combinations of all currencies. ### Request Example GET /withdrawal-destinations/requirements?currency_id=0 ### Response #### Success Response (200) - **id** (string) - Unique identifier for the destination - **name** (string) - Name of the destination - **type** (string) - Type of the off-ramp - **countryId** (integer) - Country identifier - **currencyId** (integer) - Currency identifier #### Response Example [ { "id": "dest_123", "name": "Bank Transfer", "type": "bank", "countryId": 1, "currencyId": 0 } ] ``` -------------------------------- ### GET /account/all Source: https://docs.ibexmercado.com/reference/get-all-the-accounts-of-the-user Retrieves a list of all IBEXHub accounts associated with the authenticated user. ```APIDOC ## GET /account/all ### Description Get all IBEXHub accounts. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/account/all ### Parameters #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **id** (string) - The unique identifier for the account. - **name** (string) - The name of the account. - **currencyId** (integer) - The identifier for the account's currency. #### Response Example ```json [ { "id": "", "name": "", "currencyId": 0 } ] ``` #### Error Response (400) - **error** (string) - A message describing the error. #### Error Response Example (400) ```json { "error": "" } ``` #### Error Response (401) - (object) - Details about the authentication error. #### Error Response Example (401) ```json { // Response } ``` ``` -------------------------------- ### GET /lightning-address/all Source: https://docs.ibexmercado.com/reference/get-all-lightning-adresses Retrieves a list of all Lightning Addresses linked to a specific account ID. ```APIDOC ## GET /lightning-address/all ### Description Retrieves all Lightning Addresses associated with a specific account. This endpoint requires authentication via an API key in the header. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/lightning-address/all?account-id={account-id} ### Parameters #### Path Parameters - **account-id** (string) - Required - The unique identifier of the account to retrieve addresses for. ### Request Example GET /lightning-address/all?account-id=fd Authorization: [Your-API-Key] ### Response #### Success Response (200) - **id** (string) - The unique identifier of the Lightning Address. - **username** (string) - The Lightning Address username (e.g., user@domain.com). - **accountId** (string) - The ID of the account owning the address. #### Response Example [ { "id": "", "username": "kanye.west@ibexhub.ibexmercado.com", "accountId": "fd" } ] ``` -------------------------------- ### GET /payment/from-bolt11/{bolt11} Source: https://docs.ibexmercado.com/reference/get-payment-infos-from-bolt11 Retrieves detailed information about a payment invoice using its Bolt11 string. ```APIDOC ## GET /payment/from-bolt11/{bolt11} ### Description Get invoices information using the Bolt11 string. This endpoint returns the status, amount, and metadata associated with the provided payment request. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/payment/from-bolt11/{bolt11} ### Parameters #### Path Parameters - **bolt11** (string) - Required - The Bolt11 payment request string. ### Request Example GET /payment/from-bolt11/lnbc1... ### Response #### Success Response (200) - **bolt11** (string) - The original Bolt11 string. - **hash** (string) - The payment hash. - **preImage** (string) - The payment pre-image. - **amountMsat** (integer) - The requested amount in millisatoshis. - **status** (object) - The current status of the payment. #### Response Example { "bolt11": "", "hash": "", "preImage": "", "memo": "", "amountMsat": 1, "feeMsat": 0, "paidMsat": 1, "creationDateUtc": "", "settleDateUtc": "", "statusId": 1, "failureId": 0, "failureReason": { "id": 0, "name": "", "description": "" }, "status": { "id": 1, "name": "", "description": "" } } ``` -------------------------------- ### Create Withdrawal Destination Request Body Source: https://docs.ibexmercado.com/reference/create-withdrawal-destination Example JSON structure for creating a withdrawal destination. The 'data' field must match the requirements returned by the get requirement by ID endpoint. ```json { "data" : { "clabe": "1235468789465" } } ``` -------------------------------- ### POST /account/create Source: https://docs.ibexmercado.com/reference/create-account Creates a new IBEXHub account with a specified name and optional currency ID. Fiat accounts allow transactions over the lightning network. ```APIDOC ## POST /account/create ### Description Create an IBEXHub account with a name. You can optionally specify a `currencyId`. If creating an account in BTC or Sats, it will be an MSAT account. Fiat accounts allow you to send and receive fiat currency through the lightning network. ### Method POST ### Endpoint https://api-sandbox.poweredbyibex.io/account/create ### Parameters #### Request Body - **name** (string) - Required - The name of the account. - **currencyId** (integer) - Optional - The ID of the currency for the account. Defaults to 0. Use the get all currencies endpoint to find available currency IDs. ### Request Example ```json { "name": "My New Account", "currencyId": 1 } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier for the created account. - **userId** (string) - The identifier of the user associated with the account. - **name** (string) - The name of the account. - **currencyId** (integer) - The ID of the currency associated with the account. #### Response Example ```json { "id": "acc_12345", "userId": "user_abcde", "name": "My New Account", "currencyId": 1 } ``` #### Error Response (400) - **error** (string) - A message describing the error. #### Error Response Example ```json { "error": "Invalid currency ID provided." } ``` ``` -------------------------------- ### OpenAPI Definition for Invoice Requirements Source: https://docs.ibexmercado.com/reference/invoice-requirements This OpenAPI 3.1.0 definition outlines the 'invoice-requirements' GET endpoint. It specifies the request parameters, including a 'k1' string for client identification, and details the possible responses for successful requests (200) and errors (400). The definition includes example request and response payloads. ```json { "openapi": "3.1.0", "info": { "title": "sandbox-hub", "version": "1.0" }, "servers": [ { "url": "https://api-sandbox.poweredbyibex.io" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "in": "header", "name": "Authorization" } } }, "security": [ { "sec0": [] } ], "paths": { "/lnurl/withdraw/invoice-requirements?k1={k1}": { "get": { "summary": "Invoice requirements", "description": "Decoded on the LNURL string", "operationId": "invoice-requirements", "parameters": [ { "name": "k1", "in": "path", "description": "String to identify the client", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n\t\"tag\": \"withdrawRequest\",\n \"callback\": \"string\",\n\t\"k1\": \"string\",\n\t\"defaultDescription\": \"string\",\n\t\"minWithdrawable\": 1,\n\t\"maxWithdrawable\": 1\n}" } }, "schema": { "type": "object", "properties": { "tag": { "type": "string", "example": "withdrawRequest" }, "callback": { "type": "string", "example": "string" }, "k1": { "type": "string", "example": "string" }, "defaultDescription": { "type": "string", "example": "string" }, "minWithdrawable": { "type": "integer", "example": 1, "default": 0 }, "maxWithdrawable": { "type": "integer", "example": 1, "default": 0 } } } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"status\": \"ERROR\",\n \"reason\": \"error details...\"\n}" } }, "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "ERROR" }, "reason": { "type": "string", "example": "error details..." } } } } } } }, "deprecated": false, "security": [] } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### GET /countries Source: https://docs.ibexmercado.com/reference/get-all-countries Retrieves a list of all available countries supported by the platform. ```APIDOC ## GET /countries ### Description Retrieves a list of all available countries from the Ibex Mercado sandbox environment. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/countries ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **countries** (array) - A list of country objects. #### Response Example { "countries": [ { "code": "US", "name": "United States" }, { "code": "CA", "name": "Canada" } ] } ``` -------------------------------- ### GET /deposit-infos/combinations Source: https://docs.ibexmercado.com/reference/get-deposit-combinations Retrieves available on-ramp combinations, optionally filtered by currency ID. The default behavior returns all combinations for all currencies. ```APIDOC ## GET /deposit-infos/combinations ### Description Retrieves available on-ramp combinations. This endpoint can be filtered by a specific currency ID to narrow down the results. If no `currency_id` is provided, it defaults to 0, returning all available combinations across all currencies. ### Method GET ### Endpoint `/deposit-infos/combinations` ### Parameters #### Query Parameters - **currency_id** (integer) - Optional - ID of currency to filter when querying On Ramp Combinations. Default value 0 returns all combinations of all currencies. ### Request Example ```json { "currency_id": 123 } ``` ### Response #### Success Response (200) - **name** (string) - The name of the on-ramp combination. - **id** (string) - The unique identifier for the on-ramp combination. - **type** (string) - The type of the on-ramp combination. - **data** (string) - Additional data related to the on-ramp combination. #### Response Example ```json { "name": "Example On Ramp", "id": "onramp_123", "type": "example_type", "data": "some_data" } ``` ``` -------------------------------- ### GET /crypto/send/requirements Source: https://docs.ibexmercado.com/reference/requirements Retrieves the requirements for sending cryptocurrency. This endpoint allows you to get necessary information before initiating a cryptocurrency send operation. ```APIDOC ## GET /crypto/send/requirements ### Description Retrieves the requirements for sending cryptocurrency. This endpoint allows you to get necessary information before initiating a cryptocurrency send operation. ### Method GET ### Endpoint /crypto/send/requirements ### Parameters #### Query Parameters - **network** (string) - Required - The network for the cryptocurrency transaction. - **currency-id** (integer) - Required - The ID of the currency for which to retrieve requirements. ### Response #### Success Response (200) - **requirementsId** (string) - The unique identifier for the requirements. - **type** (string) - The type of requirement. - **currencyId** (integer) - The ID of the currency. - **data** (string) - Additional data related to the requirements, often in JSON format. #### Response Example ```json { "requirementsId": "req_12345", "type": "standard", "currencyId": 1, "data": "{\"field1\": \"value1\", \"field2\": \"value2\"}" } ``` ``` -------------------------------- ### GET /websites/ibexmercado/invoice/from-hash Source: https://docs.ibexmercado.com/reference/invoice-from-hash Retrieves invoice information if the invoice was created by IBEX HUB. Returns a 404 error if the invoice is not found or not created by IBEX HUB. ```APIDOC ## GET /websites/ibexmercado/invoice/from-hash ### Description Retrieves invoice information using a hash. This endpoint will return the invoice information only if it was created by IBEX HUB. A 404 error is returned otherwise. ### Method GET ### Endpoint /websites/ibexmercado/invoice/from-hash ### Parameters #### Query Parameters - **hash** (string) - Required - The hash of the invoice to retrieve. ### Request Example ``` GET /websites/ibexmercado/invoice/from-hash?hash=your_invoice_hash ``` ### Response #### Success Response (200) - **invoice_id** (string) - The unique identifier of the invoice. - **status** (string) - The current status of the invoice (e.g., 'PAID', 'PENDING'). Refer to the [invoice-states-table](https://docs.ibexmercado.com/reference/flow#invoice-states-table) for possible states. - **amount** (number) - The total amount of the invoice. - **currency** (string) - The currency of the invoice amount. - **created_at** (string) - The timestamp when the invoice was created. #### Error Response (404 Not Found) - **error** (string) - A message indicating that the invoice was not found or not created by IBEX HUB. #### Response Example (Success) ```json { "invoice_id": "inv_12345abcde", "status": "PAID", "amount": 150.75, "currency": "USD", "created_at": "2023-10-27T10:30:00Z" } ``` #### Response Example (404 Not Found) ```json { "error": "Invoice not found or not created by IBEX HUB." } ``` ``` -------------------------------- ### Website Project Details Source: https://docs.ibexmercado.com/reference/invoice-from-hash Retrieves details about the Ibex Mercado website project. ```APIDOC ## GET /websites/ibexmercado ### Description Retrieves the configuration and details for the Ibex Mercado website project. ### Method GET ### Endpoint /websites/ibexmercado ### Parameters #### Query Parameters None #### Path Parameters None ### Request Example ``` (No request body for GET request) ``` ### Response #### Success Response (200) - **content** (object) - Contains the website configuration details. - **x-readme** (object) - Readme-specific configurations. - **headers** (array) - List of headers. - **explorer-enabled** (boolean) - Indicates if the explorer is enabled. - **proxy-enabled** (boolean) - Indicates if the proxy is enabled. - **x-readme-fauxas** (boolean) - Fauxas flag for Readme. #### Response Example ```json { "content": { "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } } ``` #### Error Response (404) - **description** (string) - "404" - **content** (object) - Error content. - **text/plain** (object) - Plain text error details. - **examples** (object) - Error examples. - **Result** (object) - Specific error result. - **value** (string) - Empty string for this error. #### Response Example (404) ```text "" ``` ``` -------------------------------- ### GET /account/{account_id}/splits/destinations Source: https://docs.ibexmercado.com/reference/get-split-destination Retrieves a list of valid split destinations available for a specific IBEXHub account. ```APIDOC ## GET /account/{account_id}/splits/destinations ### Description Get the available split destinations for the specified account. Note that Onchain Address is not a valid destination for fiat accounts. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/account/{account_id}/splits/destinations ### Parameters #### Path Parameters - **account_id** (string) - Required - The unique identifier (UUID) of the IBEXHub account. ### Request Example N/A (No request body required) ### Response #### Success Response (200) - **id** (integer) - The unique ID of the destination type. - **name** (string) - The name of the destination type. - **description** (string) - A brief description of the destination type. #### Response Example [ { "id": 1, "name": "IBEXHub Account", "description": "Split to an IBEXHub account." }, { "id": 2, "name": "Lightning Address", "description": "Split to a Lightning Address." }, { "id": 3, "name": "Onchain Address", "description": "Split to an Onchain Address." } ] ``` -------------------------------- ### OpenAPI Definition for Creating Crypto Receive Info Source: https://docs.ibexmercado.com/reference/create-receive-info This OpenAPI 3.0.0 definition outlines the structure for the POST request to create cryptocurrency receive information. It includes details on the server URL, request body schema (name and network), path parameters (account_id), and the response schema for a successful operation. ```json { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Hub Sandbox" }, "servers": [ { "url": "https://api-sandbox.poweredbyibex.io" } ], "paths": { "/accounts/{account_id}/crypto/receive-infos": { "post": { "description": "", "operationId": "post_accounts{account_id}cryptoreceive-infos", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "id": { "type": "string" }, "type": { "type": "string" }, "data": { "type": "string" } }, "required": [ "name" ] } } } } }, "parameters": [ { "in": "path", "name": "account_id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "network": { "type": "string" } }, "required": [ "name", "network" ] } } } } } } }, "x-readme": { "explorer-enabled": false, "proxy-enabled": true } } ``` -------------------------------- ### GET /deposit-infos/{id}-1 Source: https://docs.ibexmercado.com/reference/get-by-id-1 Retrieves a list of deposit information objects associated with the provided ID. ```APIDOC ## GET /deposit-infos/{id}-1 ### Description Retrieves deposit information details based on the specified unique identifier. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/deposit-infos/{id}-1 ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier for the deposit information. ### Request Example N/A (No request body required) ### Response #### Success Response (200) - **name** (string) - The name of the deposit information. - **id** (string) - The ID of the deposit. - **type** (string) - The type of deposit. - **data** (string) - Additional data related to the deposit. #### Response Example [ { "name": "example-deposit", "id": "12345", "type": "wire", "data": "sample-data" } ] ``` -------------------------------- ### OpenAPI Definition for Get Deposit Info by ID Source: https://docs.ibexmercado.com/reference/get-by-id-1 This JSON object defines the OpenAPI 3.0.0 specification for the Hub Sandbox API. It details the '/deposit-infos/{id}-1' GET endpoint, including its parameters, responses, and the schema for the returned deposit information. This definition is crucial for understanding and interacting with the API. ```json { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Hub Sandbox" }, "servers": [ { "url": "https://api-sandbox.poweredbyibex.io" } ], "paths": { "/deposit-infos/{id}-1": { "get": { "description": "", "operationId": "get_deposit-infos{id}-1", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "id": { "type": "string" }, "type": { "type": "string" }, "data": { "type": "string" } }, "required": [ "name" ] } } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "summary": "Copy of " } } }, "x-readme": { "explorer-enabled": false, "proxy-enabled": true } } ``` -------------------------------- ### GET /crypto/send/infos/{id} Source: https://docs.ibexmercado.com/reference/get-info-by-id Retrieves detailed information about a specific cryptocurrency send operation by its unique identifier. ```APIDOC ## GET /crypto/send/infos/{id} ### Description Retrieves detailed information for a specific cryptocurrency send operation using the provided ID. ### Method GET ### Endpoint https://api-sandbox.poweredbyibex.io/crypto/send/infos/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the crypto send info. ### Request Example N/A (GET request) ### Response #### Success Response (200) - **id** (string) - The unique identifier. - **name** (string) - The name of the operation. - **currencyId** (integer) - The ID of the associated currency. - **network** (string) - The blockchain network used. - **data** (string) - JSON formatted data containing specific operation details. #### Response Example { "id": "12345", "name": "BTC Transfer", "currencyId": 1, "network": "mainnet", "data": "{\"fee\": \"0.0001\"}" } ``` -------------------------------- ### Get Split Destinations OpenAPI Definition Source: https://docs.ibexmercado.com/reference/get-split-destination This OpenAPI 3.1.0 definition describes the API endpoint for retrieving split destinations. It specifies the request parameters, response structure, and authentication method. ```json { "openapi": "3.1.0", "info": { "title": "sandbox-hub", "version": "1.0" }, "servers": [ { "url": "https://api-sandbox.poweredbyibex.io" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "in": "header", "name": "Authorization" } } }, "security": [ { "sec0": [] } ], "paths": { "/account/{account_id}/splits/destinations": { "get": { "summary": "Get Split Destinations", "description": "Get split destinations available to the account", "operationId": "get-split-destination", "parameters": [ { "name": "account_id", "in": "path", "description": "Ibexhub Account UUID", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "[ { "id": 1, "name": "IBEXHub Account", "description": "Split to an IBEXHub account." }, { "id": 2, "name": "Lightning Address", "description": "Split to a Lightning Address." }, { "id": 3, "name": "Onchain Address", "description": "Split to an Onchain Address." } ]" } }, "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "default": 0 }, "name": { "type": "string", "example": "IBEXHub Account" }, "description": { "type": "string", "example": "Split to an IBEXHub account." } } } } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### OpenAPI Definition for Countries Endpoint Source: https://docs.ibexmercado.com/reference/get-all-countries This OpenAPI 3.1.0 definition specifies the '/countries' endpoint, which allows retrieval of all available countries. It includes server details, security scheme (API key in header), and the GET operation details. ```json { "openapi": "3.1.0", "info": { "title": "sandbox-hub", "version": "1.0" }, "servers": [ { "url": "https://api-sandbox.poweredbyibex.io" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "in": "header", "name": "Authorization" } } }, "security": [ { "sec0": [] } ], "paths": { "/countries": { "get": { "description": "", "operationId": "get_countries", "responses": { "200": { "description": "" } }, "parameters": [] } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### POST /invoice/pay Source: https://docs.ibexmercado.com/reference/flow-1 Executes a payment for a provided Lightning Network invoice. ```APIDOC ## POST /invoice/pay ### Description Initiates the payment process for a BOLT11 invoice. If the payment is successful, the response will contain the payment status. ### Method POST ### Endpoint /invoice/pay ### Request Body - **bolt11** (string) - Required - The encoded BOLT11 invoice string. - **amount_msat** (integer) - Optional - Amount in millisatoshis if the invoice amount is zero. ### Request Example { "bolt11": "lnbc1...", "amount_msat": 1000 } ### Response #### Success Response (200) - **status** (integer) - The current payment status (1: IN_FLIGHT, 2: SUCCEEDED, 3: FAILED). #### Response Example { "status": 1 } ``` -------------------------------- ### Retrieve all IBEXHub accounts via OpenAPI definition Source: https://docs.ibexmercado.com/reference/get-all-the-accounts-of-the-user This OpenAPI specification defines the structure for the /account/all endpoint. It requires an API key for authorization and returns a list of account objects containing ID, name, and currency information. ```json { "openapi": "3.1.0", "info": { "title": "sandbox-hub", "version": "1.0" }, "servers": [ { "url": "https://api-sandbox.poweredbyibex.io" } ], "paths": { "/account/all": { "get": { "summary": "All Accounts v1", "operationId": "get-all-the-accounts-of-the-user", "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "[\n {\n \"id\": \"\",\n \"name\": \"\",\n \"currencyId\": 0\n },\n]" } } } } } } } } } } ``` -------------------------------- ### Get All LNURL-withdraws (OpenAPI) Source: https://docs.ibexmercado.com/reference/get-all-lnurl-withdraws This OpenAPI definition describes the GET endpoint for retrieving all LNURL-withdraws for a specified account ID. It requires an 'accountId' as a path parameter and returns an array of withdraw objects on success or an error object on failure. Authentication is handled via an API key in the header. ```json { "openapi": "3.1.0", "info": { "title": "sandbox-hub", "version": "1.0" }, "servers": [ { "url": "https://api-sandbox.poweredbyibex.io" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "in": "header", "name": "Authorization" } } }, "security": [ { "sec0": [] } ], "paths": { "/lnurl/withdraw/all/{accountId}": { "get": { "summary": "All LNURL-withdraws", "description": "Get all of an accounts LNURL-withdraws", "operationId": "get-all-lnurl-withdraws", "parameters": [ { "name": "accountId", "in": "path", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": " [ { "chargesRemaining": 0, "amount": 0, "currency": "", "expirationTime": 0 } ]" } }, "schema": { "type": "array", "items": { "type": "object", "properties": { "chargesRemaining": { "type": "integer", "example": 0, "default": 0 }, "amount": { "type": "integer", "example": 0, "default": 0 }, "currency": { "type": "string", "example": "" }, "expirationTime": { "type": "integer", "example": 0, "default": 0 } } } } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{ \t"error": "" }" } }, "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "" } } } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### Example Request Body for Creating Splits (JSON) Source: https://docs.ibexmercado.com/reference/update-all-splits-copy-2 This JSON object demonstrates the structure for defining payment splits. Each object in the array specifies a percentage of the received funds to split and the destination address or account UUID. Note the different types of destinations supported and the associated notes regarding fees and minimum amounts. ```json [ { "percent": 1, "destination": "bc1qdfjs54pgl8eedjkvnpxalqekxzuft9phzzhe99" // onchain address }, { "percent": 10, "destination": "test@ln-address.com" // lightning address }, { "percent": 15, "destination": "d76f8fc3-cc15-4ba6-b12e-b2704f257704" // hub account UUID } ] ``` -------------------------------- ### POST /withdrawals Source: https://docs.ibexmercado.com/reference/off-ramp Executes a fiat currency withdrawal to a previously configured destination. ```APIDOC ## POST /withdrawals ### Description Executes a withdrawal of fiat currency from the user account to a specified destination. ### Method POST ### Endpoint /withdrawals ### Parameters #### Request Body - **destination_id** (string) - Required - The ID of the withdrawal destination. - **amount** (number) - Required - The amount to withdraw (Min: MXN 50, EURO 10, GBP 20). - **currency** (string) - Required - The currency code (e.g., MXN, EUR, GBP). ### Request Example { "destination_id": "dest_12345", "amount": 100, "currency": "EUR" } ### Response #### Success Response (200) - **id** (string) - The unique identifier of the withdrawal transaction. - **status** (string) - The initial status of the withdrawal. #### Response Example { "id": "tx_98765", "status": "pending" } ```