### List Bank Codes (cURL Example) Source: https://docs.cbpayapp.com/core/withdrawal/colombia/withdrawal-colombia-bank-codes Demonstrates how to call the 'List Bank Codes' endpoint using cURL. It includes the necessary GET request, authentication header with a Bearer token, and content type specification. This is useful for testing API interactions and understanding request structure. ```bash curl -X GET "https://cryptobank.qbank.cl/withdrawal/colombia/bank-codes" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### List Deposit Accounts (cURL) Source: https://docs.cbpayapp.com/business/business/addresses Demonstrates how to list deposit accounts for a business using a cURL command. It includes the necessary GET request, authentication headers with a JWT Bearer token, and a JSON payload for pagination. This example is useful for direct API interaction and testing. ```bash curl -X GET "https://cryptobank.qbank.cl/business/addresses" \ -H "Authorization: Bearer su_token_jwt_aquí" \ -H "Content-Type: application/json" \ -d '{"page": 0}' ``` -------------------------------- ### GET /api/bolivia/quotes Source: https://docs.cbpayapp.com/business/bolivia Consult real-time exchange rates for converting USDT to Bolivianos (BOB). ```APIDOC ## GET /api/bolivia/quotes ### Description Consult the real-time exchange rates to convert USDT to Bolivianos (BOB). ### Method GET ### Endpoint /api/bolivia/quotes ### Parameters #### Query Parameters - **currency** (string) - Required - The target currency, expected to be 'BOB'. ### Request Example ```json { "currency": "BOB" } ``` ### Response #### Success Response (200) - **rates** (object) - An object containing currency exchange rates. - **USDT_to_BOB** (number) - The exchange rate from USDT to BOB. #### Response Example ```json { "rates": { "USDT_to_BOB": 6.96 } } ``` ``` -------------------------------- ### Get Venezuela Bank Codes (cURL) Source: https://docs.cbpayapp.com/core/withdrawal/venezuela/withdrawal-venezuela-bank-codes Example using cURL to retrieve the list of bank codes in Venezuela. Requires a Bearer token for authentication and specifies JSON content type and accept headers. ```bash curl -X GET "https://cryptobank.qbank.cl/withdrawal/venezuela/bank-codes" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### Banking Information - Get Stock Image Source: https://docs.cbpayapp.com/core/bank Allows you to download the image or logo of a specific bank. You can identify the bank by its unique Bank Identifier (BID). ```APIDOC ## GET /websites/cbpayapp/api/v1/banks/{BID}/image ### Description Download the image or logo of a specific bank using its identifier (BID). ### Method GET ### Endpoint /websites/cbpayapp/api/v1/banks/{BID}/image ### Parameters #### Path Parameters - **BID** (string) - Required - The unique identifier of the bank whose logo is to be retrieved. #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **image** (binary) - The bank's logo image in binary format. #### Response Example (Returns a binary image file, e.g., PNG, JPEG) ``` -------------------------------- ### Get Minimum Coins (cURL) Source: https://docs.cbpayapp.com/core/wallet/wallet-minimums This cURL command demonstrates how to call the 'Obtain Minimum Coins' endpoint. It specifies the GET request, the API endpoint URL, and includes necessary headers for authorization and content type. The response is expected in JSON format. ```bash curl -X GET "https://cryptobank.qbank.cl/wallet/minimums" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### Get Prices and Quotes using cURL Source: https://docs.cbpayapp.com/core/prices This snippet demonstrates how to make a GET request to the Pricing API endpoint to retrieve current prices and exchange rates. It includes the necessary headers for specifying the content type and accept type. The response provides various currency conversion rates. ```shell curl -X GET "https://cryptobank.qbank.cl/prices" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### List PIX Withdrawals using cURL Source: https://docs.cbpayapp.com/core/withdrawal/brasil/withdrawal-brasil-pix This snippet demonstrates how to list PIX withdrawals in Brazil using a cURL command. It includes the necessary GET request, authentication header, content type, and example request body with pagination parameters. The response shows a successful retrieval of withdrawal data and pagination details. ```Bash curl -X GET "https://cryptobank.qbank.cl/withdrawal/brasil/pix" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "page": "1", "per_page": "20" }' ``` -------------------------------- ### Successful Pricing API Response Example Source: https://docs.cbpayapp.com/core/prices This snippet shows a successful JSON response from the Pricing API. It includes fields like `btc_to_usd`, `usd_to_clp`, and other currency pair exchange rates. This data is valuable for currency conversion calculations and displaying live prices. ```json { "btc_to_usd": 116000, "usd_to_clp": 0, "btc_to_usdt": 116000, "btc_to_clp": 113476973, "clp_to_btc": 113599491, "clp_to_usdt": 969, "usdt_to_btc": 118548.99, "usdt_to_clp": 968.35 } ``` -------------------------------- ### Successful Response for Venezuela Bank Codes Source: https://docs.cbpayapp.com/core/withdrawal/venezuela/withdrawal-venezuela-bank-codes Example JSON response when successfully retrieving the list of bank codes in Venezuela. Includes an array of banks, each with a bank identifier code (bid) and name. ```json { "banks": [ { "bid": "0156", "name": "100% BANCO" }, { "bid": "0172", "name": "BANCAMIGA" }, { "bid": "0171", "name": "BANCO ACTIVO" } ] } ``` -------------------------------- ### GET /wallet/minimums Source: https://docs.cbpayapp.com/core/wallet/wallet-minimums This endpoint allows you to obtain the minimum amounts required to perform operations between different currencies (CLP, BTC, USDT). Authentication is required. ```APIDOC ## GET /wallet/minimums ### Description This endpoint retrieves the minimum transaction amounts for various currency conversions within the xCryptobank Core system. ### Method GET ### Endpoint https://cryptobank.qbank.cl/wallet/minimums ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body No parameters are required in the request body. ### Request Example ```json { "example": "(No request body for this endpoint)" } ``` ### Response #### Success Response (200) - **clp_to_btc_minimum** (number) - Minimum amount in CLP to convert to BTC - **clp_to_usdt_minimum** (number) - Minimum amount in CLP to convert to USDT - **btc_to_clp_minimum** (number) - Minimum amount in BTC to convert to CLP - **btc_to_usdt_minimum** (number) - Minimum BTC amount to convert to USDT - **usdt_to_btc_minimum** (number) - Minimum amount in USDT to convert to BTC - **usdt_to_clp_minimum** (number) - Minimum amount in USDT to convert to CLP #### Response Example ```json { "clp_to_btc_minimum": 11505, "clp_to_usdt_minimum": 9, "btc_to_clp_minimum": 0.0001012, "btc_to_usdt_minimum": 0.0001012, "usdt_to_btc_minimum": 11.7392, "usdt_to_clp_minimum": 0.01012 } ``` ### Authentication **Authentication required:** A valid JWT token is required in the `Authorization` header as a Bearer token. ``` -------------------------------- ### Pricing API - Get Prices and Quotes Source: https://docs.cbpayapp.com/core/prices This endpoint allows you to view current prices and exchange rates between the different currencies supported by the system. This information is useful for calculating conversions and displaying updated prices to users. ```APIDOC ## GET /prices ### Description Retrieves current prices and exchange rates between supported currencies. ### Method GET ### Endpoint https://cryptobank.qbank.cl/prices ### Parameters #### Query Parameters None #### Request Body No parameters are required in the request body. ### Request Example ```bash curl -X GET "https://cryptobank.qbank.cl/prices" \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ### Response #### Success Response (200) - **btc_to_usd** (number) - Bitcoin price to US dollars - **usd_to_clp** (number) - US Dollar to Chilean Peso exchange rate - **btc_to_usdt** (number) - Bitcoin to USDT exchange rate - **btc_to_clp** (number) - Bitcoin to Chilean Peso exchange rate - **clp_to_btc** (number) - Chilean Peso to Bitcoin Exchange Rate - **clp_to_usdt** (number) - Chilean Peso to USDT exchange rate - **usdt_to_btc** (number) - USDT to Bitcoin exchange rate - **usdt_to_clp** (number) - USDT to Chilean Peso exchange rate #### Response Example ```json { "btc_to_usd": 116000, "usd_to_clp": 0, "btc_to_usdt": 116000, "btc_to_clp": 113476973, "clp_to_btc": 113599491, "clp_to_usdt": 969, "usdt_to_btc": 118548.99, "usdt_to_clp": 968.35 } ``` ``` -------------------------------- ### List Chilean Banks (cURL) Source: https://docs.cbpayapp.com/business/chile/banks This cURL command demonstrates how to make a GET request to the Chilean Banks API to retrieve a list of supported banks. It includes necessary headers for authentication and content negotiation. ```curl curl -X GET "https://cryptobank.qbank.cl/business/chile/banks" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### Request KYC Status (cURL) Source: https://docs.cbpayapp.com/core/user/user-kyc This cURL command demonstrates how to make a GET request to the KYC Request API to retrieve the user's KYC verification status. It includes necessary headers for authorization and content type. ```bash curl -X GET "https://cryptobank.qbank.cl/user/kyc" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### Get Quotes Mexico - Successful Response JSON Source: https://docs.cbpayapp.com/business/mexico/rates Example JSON response for a successful request to the Get Quotes Mexico endpoint. It contains the exchange rate for selling USDT to MXN. ```json { "sell_usdt_to_mxn": 20.84710743801653 } ``` -------------------------------- ### User Registration Source: https://docs.cbpayapp.com/core/user Registers a new user in the system with full validation of personal data. ```APIDOC ## POST /users/register ### Description Register a new user in the system with full validation of personal data. ### Method POST ### Endpoint /users/register #### Request Body - **firstName** (string) - Required - User's first name. - **lastName** (string) - Required - User's last name. - **email** (string) - Required - User's email address. - **password** (string) - Required - User's password. - **phoneNumber** (string) - Optional - User's phone number. ### Request Example ```json { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "password": "SecurePassword123", "phoneNumber": "+1234567890" } ``` ### Response #### Success Response (201) - **userId** (string) - The unique identifier for the newly registered user. - **message** (string) - Confirmation message. #### Response Example ```json { "userId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "message": "User registered successfully." } ``` ``` -------------------------------- ### KYC Request Source: https://docs.cbpayapp.com/core/user Initiates the identity verification process (Know Your Customer). ```APIDOC ## POST /security/kyc/request ### Description Start the identity verification process (Know Your Customer). ### Method POST ### Endpoint /security/kyc/request #### Request Body - **documentType** (string) - Required - Type of identification document (e.g., 'passport', 'driver_license'). - **documentImageFront** (file) - Required - Image of the front of the identification document. - **documentImageBack** (file) - Optional - Image of the back of the identification document (if applicable). - **selfieImage** (file) - Required - Image of the user holding their ID. ### Request Example ```json { "documentType": "passport", "documentImageFront": "", "documentImageBack": "", "selfieImage": "" } ``` ### Response #### Success Response (200) - **requestId** (string) - The unique identifier for the KYC request. - **status** (string) - The initial status of the KYC request (e.g., 'pending_review'). #### Response Example ```json { "requestId": "kyc-req-xyz789", "status": "pending_review" } ``` ``` -------------------------------- ### Get Bank Logo Image - Response Example Source: https://docs.cbpayapp.com/core/bank/banks-image-get This comment indicates the expected response when successfully retrieving a bank's logo image. The response is binary image data, not JSON, and includes Content-Type and Content-Length headers. ```javascript // La respuesta es un archivo binario de imagen // No se muestra como JSON // Headers de respuesta: // Content-Type: image/png // Content-Length: 15680 ``` -------------------------------- ### User Registration API Source: https://docs.cbpayapp.com/business/user Allows for the creation of new user accounts. It includes data validation and an email verification process to ensure account integrity. ```APIDOC ## POST /api/users/register ### Description Create a new user account with data validation and email verification. ### Method POST ### Endpoint /api/users/register ### Parameters #### Request Body - **email** (string) - Required - The user's email address. - **password** (string) - Required - The user's password. - **name** (string) - Optional - The user's full name. ### Request Example ```json { "email": "user@example.com", "password": "strongpassword123", "name": "John Doe" } ``` ### Response #### Success Response (201) - **userId** (string) - The unique identifier for the newly created user. - **message** (string) - A success message indicating account creation. #### Response Example ```json { "userId": "user-uuid-12345", "message": "User account created successfully. Please check your email for verification." } ``` ``` -------------------------------- ### Get Quotes Mexico - cURL Request Source: https://docs.cbpayapp.com/business/mexico/rates Example cURL command to fetch current exchange rates for Mexico transactions. Requires a JWT token for authentication and specifies content type and accept headers. ```bash curl -X GET "https://cryptobank.qbank.cl/business/mexico/rates" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### User Login Source: https://docs.cbpayapp.com/core/user Authenticates a user and obtains access tokens for the session. ```APIDOC ## POST /auth/login ### Description Authenticate a user and obtain access tokens for the session. ### Method POST ### Endpoint /auth/login #### Request Body - **email** (string) - Required - User's email address. - **password** (string) - Required - User's password. ### Request Example ```json { "email": "john.doe@example.com", "password": "SecurePassword123" } ``` ### Response #### Success Response (200) - **accessToken** (string) - The access token for the authenticated session. - **refreshToken** (string) - The refresh token for obtaining new access tokens. #### Response Example ```json { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refreshToken": "def456ghi789jkl0mno123pqr456stu789vwx..." } ``` ``` -------------------------------- ### Wallet Balance Inquiry API Source: https://docs.cbpayapp.com/core/wallet Endpoints for checking the user's wallet balance and minimum transaction amounts. ```APIDOC ## GET /wallet/balance ### Description Check the user's current wallet balance, showing available balances in different currencies. ### Method GET ### Endpoint /wallet/balance ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **currency** (string) - The currency of the balance. - **balance** (number) - The available balance for the currency. #### Response Example ```json { "balances": [ { "currency": "USD", "balance": 1000.50 }, { "currency": "EUR", "balance": 500.75 } ] } ``` ``` ```APIDOC ## GET /wallet/minimums ### Description It obtains the minimum amounts required for transactions with different currencies in the system. ### Method GET ### Endpoint /wallet/minimums ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **currency** (string) - The currency type. - **min_deposit** (number) - The minimum deposit amount. - **min_withdraw** (number) - The minimum withdrawal amount. - **min_transfer** (number) - The minimum transfer amount. #### Response Example ```json { "minimums": [ { "currency": "USD", "min_deposit": 10.00, "min_withdraw": 20.00, "min_transfer": 5.00 }, { "currency": "EUR", "min_deposit": 10.00, "min_withdraw": 20.00, "min_transfer": 5.00 } ] } ``` ``` -------------------------------- ### CBpay Core API - Prices and Quotes Source: https://docs.cbpayapp.com/core Fetches up-to-date information on prices and currency exchange rates. ```APIDOC ## GET /prices ### Description Retrieve current information on prices and exchange rates between various currencies. ### Method GET ### Endpoint /prices ### Parameters #### Path Parameters None #### Query Parameters - **base_currency** (string) - Optional - The currency to use as the base for quotes. - **target_currency** (string) - Optional - The currency to get the quote against the base currency. #### Request Body None ### Request Example ``` GET /prices?base_currency=USD&target_currency=EUR ``` ### Response #### Success Response (200) - **quotes** (object) - An object containing currency exchange rate information. Keys are currency pairs (e.g., "USD_EUR"), and values are their respective rates. #### Response Example ```json { "quotes": { "USD_EUR": 0.92, "BTC_USD": 30000.50 } } ``` ``` -------------------------------- ### Successful User Profile Response (JSON) Source: https://docs.cbpayapp.com/core/profile/get-profile This is an example of a successful response from the Profile API when retrieving user information. It returns a JSON object containing the user's unique identifier (uuid), their first name (first_name), and their last name (last_name). This data is returned when the GET request to the profile endpoint is successful. ```json { "uuid": "5391ead0-c024-4cd3-a5a8-0e304c8eac68", "first_name": "Hack", "last_name": "Code" } ``` -------------------------------- ### 2FA by Email Configuration Source: https://docs.cbpayapp.com/core/user Configures and manages two-factor authentication settings via email. ```APIDOC ## POST /security/2fa/email ### Description Configure and manage two-factor authentication via email. ### Method POST ### Endpoint /security/2fa/email #### Request Body - **enable** (boolean) - Required - Set to `true` to enable 2FA via email, `false` to disable. ### Request Example ```json { "enable": true } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message about the 2FA configuration change. #### Response Example ```json { "message": "Two-factor authentication via email has been enabled." } ``` ``` -------------------------------- ### Register User via cURL Source: https://docs.cbpayapp.com/core/user/user-register This cURL command demonstrates how to register a new user by sending a POST request to the User Registration API endpoint. It includes the necessary headers and a JSON payload with user details. The response contains an authentication token upon successful registration. ```bash curl -X POST "https://cryptobank.qbank.cl/user/register" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "first_name": "Eduardo Bedoya", "last_name": "Eduardo Bedoya", "email": "user@example.com", "id_number": "12345678", "id_country": "12345678", "pin": "1234", "phone": "4245109394", "reference": "" }' ``` -------------------------------- ### GET /banks/[BID]/image Source: https://docs.cbpayapp.com/core/bank/banks-image-get This endpoint allows you to retrieve the logo image of a specific bank within the xCryptobank Core system, identified by its unique ID. ```APIDOC ## GET /banks/[BID]/image ### Description This endpoint allows you to retrieve the logo image of a specific bank within the xCryptobank Core system, identified by its unique ID. ### Method GET ### Endpoint https://cryptobank.qbank.cl/banks/[BID]/image ### Parameters #### Path Parameters - **BID** (string) - Required - The unique identifier for the bank. #### Query Parameters None #### Request Body None ### Request Example ``` curl -X GET "https://cryptobank.qbank.cl/banks/[BID]/image" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` ### Response #### Success Response (200) - **Content-Type** (header) - Type of image content (image/jpeg, image/png, image/svg+xml) - **Content-Length** (header) - Size of the image in bytes - **body** (binary) - Binary data of the image #### Response Example ``` // The response is a binary image file // Not displayed as JSON // Response headers: // Content-Type: image/png // Content-Length: 15680 ``` ### Authentication Authentication is required using a valid JWT token provided in the `Authorization` header as a Bearer token. ``` -------------------------------- ### Get User Profile - cURL Request Source: https://docs.cbpayapp.com/business/user/profile-uuid This cURL command demonstrates how to make a GET request to the User Profile API to retrieve a user's profile information. It requires a valid JWT token for authorization and specifies the content type and accept headers. ```shell curl -X GET "https://cryptobank.qbank.cl/user/profile/[UUID]" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### POST /v1/crypto/withdrawals/usdt Source: https://docs.cbpayapp.com/core/withdrawal/crypto Create a Tether USD (USDT) withdrawal via the ETH network. ```APIDOC ## POST /v1/crypto/withdrawals/usdt ### Description Create a cryptocurrency (USDT) withdrawal. Allows you to withdraw Tether USD from your wallet via the ETH network. ### Method POST ### Endpoint /v1/crypto/withdrawals/usdt ### Parameters #### Query Parameters * **amount** (number) - Required - The amount of USDT to withdraw. * **address** (string) - Required - The destination USDT address (ERC-20 compatible). ### Request Example ```json { "amount": 100, "address": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B" } ``` ### Response #### Success Response (200) - **transactionId** (string) - The ID of the withdrawal transaction. - **status** (string) - The status of the withdrawal (e.g., "pending", "completed"). #### Response Example ```json { "transactionId": "tx_67890fghij", "status": "pending" } ``` ``` -------------------------------- ### Get Quotes Peru API Request (cURL) Source: https://docs.cbpayapp.com/business/peru/rates This cURL command demonstrates how to make a GET request to the Peru Quotations API to retrieve current exchange rates. It includes the necessary authorization header with a JWT token and specifies the content and accept types. ```bash curl -X GET "https://cryptobank.qbank.cl/business/peru/rates" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### My Profile Source: https://docs.cbpayapp.com/core/user Retrieves the complete profile information of the authenticated user. ```APIDOC ## GET /users/me/profile ### Description It obtains the complete profile information of the authenticated user. ### Method GET ### Endpoint /users/me/profile ### Parameters #### Query Parameters - **fields** (string) - Optional - Comma-separated list of fields to include in the response (e.g., 'firstName,email,phoneNumber'). ### Response #### Success Response (200) - **userId** (string) - User's unique identifier. - **firstName** (string) - User's first name. - **lastName** (string) - User's last name. - **email** (string) - User's email address. - **phoneNumber** (string) - User's phone number. - **avatarUrl** (string) - URL to the user's avatar. - **createdAt** (string) - Timestamp of user creation. #### Response Example ```json { "userId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "phoneNumber": "+1234567890", "avatarUrl": "https://cbpay.com/avatars/a1b2c3d4.png", "createdAt": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### User Authentication APIs Source: https://docs.cbpayapp.com/business/user Handles user authentication processes, including standard login, login with two-factor authentication (2FA), and password recovery. ```APIDOC ## POST /api/auth/login ### Description Authenticate a user and obtain a JWT token for access to protected endpoints. ### Method POST ### Endpoint /api/auth/login ### Parameters #### Request Body - **email** (string) - Required - The user's email address. - **password** (string) - Required - The user's password. ### Request Example ```json { "email": "user@example.com", "password": "strongpassword123" } ``` ### Response #### Success Response (200) - **token** (string) - JWT token for accessing protected resources. - **expiresIn** (integer) - The token's expiration time in seconds. #### Response Example ```json { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expiresIn": 3600 } ``` ## POST /api/auth/login/2fa ### Description Authenticate a user using two-factor authentication for enhanced security. ### Method POST ### Endpoint /api/auth/login/2fa ### Parameters #### Request Body - **email** (string) - Required - The user's email address. - **password** (string) - Required - The user's password. - **twoFactorCode** (string) - Required - The 2FA code received via email or authenticator app. ### Request Example ```json { "email": "user@example.com", "password": "strongpassword123", "twoFactorCode": "123456" } ``` ### Response #### Success Response (200) - **token** (string) - JWT token for accessing protected resources. - **expiresIn** (integer) - The token's expiration time in seconds. #### Response Example ```json { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expiresIn": 3600 } ``` ## POST /api/auth/recover-password ### Description Initiate the password recovery process by sending a verification code to the user's registered email. ### Method POST ### Endpoint /api/auth/recover-password ### Parameters #### Request Body - **email** (string) - Required - The user's email address. ### Request Example ```json { "email": "user@example.com" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message that the recovery email has been sent. #### Response Example ```json { "message": "Password recovery instructions sent to your email address." } ``` ``` -------------------------------- ### Get Bank Logo Image using cURL Source: https://docs.cbpayapp.com/core/bank/banks-image-get This cURL command demonstrates how to fetch a bank's logo image from the CBpay API. It requires a Bearer token for authentication and specifies the target bank's BID. The response will be the binary image data. ```bash curl -X GET "https://cryptobank.qbank.cl/banks/[BID]/image" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### Get Quotes API Request (cURL) Source: https://docs.cbpayapp.com/business/eu/rates This cURL command demonstrates how to make a GET request to the Quotation API for Europe to obtain current exchange rates. It includes the necessary authorization and content-type headers. Ensure you replace the placeholder token with a valid JWT. ```curl curl -X GET "https://cryptobank.qbank.cl/business/eu/rates" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### Get List of Venezuelan Banks (cURL) Source: https://docs.cbpayapp.com/business/venezuela/banks This cURL command demonstrates how to retrieve a list of Venezuelan banks using the VEN Banks API. It includes the necessary GET request, authorization header with a JWT token, and content type headers. The response is expected in JSON format. ```bash curl -X GET "https://cryptobank.qbank.cl/business/ven/banks" \ -H "Authorization: Bearer eyJhbGciOi..." \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### Log in with 2FA Source: https://docs.cbpayapp.com/core/user Provides two-factor authentication for enhanced access security after initial login. ```APIDOC ## POST /auth/login/2fa ### Description Two-factor authentication for enhanced access security. This endpoint is typically called after a successful initial login. ### Method POST ### Endpoint /auth/login/2fa #### Request Body - **email** (string) - Required - User's email address. - **twoFactorCode** (string) - Required - The code provided by the second factor (e.g., authenticator app, SMS). ### Request Example ```json { "email": "john.doe@example.com", "twoFactorCode": "123456" } ``` ### Response #### Success Response (200) - **accessToken** (string) - The access token for the authenticated session. - **refreshToken** (string) - The refresh token for obtaining new access tokens. #### Response Example ```json { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refreshToken": "def456ghi789jkl0mno123pqr456stu789vwx..." } ``` ``` -------------------------------- ### Get UUID by Identification Number using cURL Source: https://docs.cbpayapp.com/core/getuuid This cURL command demonstrates how to make a POST request to the 'getUUID' endpoint to retrieve a UUID. It includes the necessary headers ('Content-Type' and 'Accept') and a JSON body with 'id_number' and 'id_country'. This is useful for testing the API or integrating it into shell scripts. ```bash curl -X POST "https://cryptobank.qbank.cl/getUUID" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "id_number": "12345678", "id_country": "CL" }' ``` -------------------------------- ### POST /movements Source: https://docs.cbpayapp.com/core/movements Retrieves a list of all user account movements, including deposits, withdrawals, and currency conversions. Authentication is required. ```APIDOC ## POST /movements ### Description This endpoint retrieves a list of all movements made in the user's account, including deposits, withdrawals, and currency conversions. ### Method POST ### Endpoint https://cryptobank.qbank.cl/movements ### Parameters #### Header Parameters - **Authorization** (string) - Required - Bearer token for authentication. Example: `Bearer ` - **Content-Type** (string) - Required - Specifies the content type of the request body. Example: `application/json` #### Request Body - **sorting** (integer) - Optional - Order of movements: 0 for most recent to oldest, 1 for oldest to most recent. - **page** (integer) - Required - Page number for pagination. ### Request Example ```json { "sorting": 0, "page": 1 } ``` ### Response #### Success Response (200) - **movements** (array) - A list of account movements. - **movements[].blockchain_id** (string) - Unique identifier of the movement on the blockchain. - **movements[].method** (string) - Type of movement (e.g., withdrawal, deposit, conversion). - **movements[].from_uuid** (string) - UUID of the sender (empty if it's a deposit). - **movements[].to_uuid** (string) - UUID of the recipient (empty if it's a withdrawal). - **movements[].clp_balance** (number) - CLP balance after the movement. - **movements[].btc_balance** (number) - BTC balance after the movement. - **movements[].usdt_balance** (number) - USDT balance after the movement. - **movements[].fee_details** (array) - Details of fees applied to the movement. - **movements[].fee_details[].fee** (number) - Fee amount. - **movements[].fee_details[].currency** (string) - Currency of the fee (USDT, CLP, BTC). - **movements[].fee_details[].description** (string) - Description of the applied fee. - **movements[].fee_details[].owner** (string) - Owner or entity charging the fee. - **movements[].withdraw_to** (string) - Withdrawal recipient (name or identifier). - **movements[].reference** (string) - Reference or note for the movement. - **movements[].created_at** (integer) - Unix timestamp of the movement creation. #### Response Example ```json { "movements": [ { "blockchain_id": "tx123abc", "method": "deposit", "from_uuid": "", "to_uuid": "user-uuid-456", "clp_balance": 10000.50, "btc_balance": 0.5, "usdt_balance": 2000.75, "fee_details": [], "withdraw_to": "", "reference": "Initial deposit", "created_at": 1678886400 } ] } ``` #### Error Response - **error** (string) - Error message if the list of movements could not be retrieved. ``` -------------------------------- ### User Security Management APIs Source: https://docs.cbpayapp.com/business/user Provides functionalities for managing user security, including PIN management, changing PIN, and configuring 2FA via email. ```APIDOC ## GET/POST /api/security/pin ### Description Manage the user's security PIN. Allows for creating, verifying, and managing the PIN. ### Method GET/POST ### Endpoint /api/security/pin ### Parameters #### Request Body (for POST) - **pin** (string) - Required - The security PIN. - **action** (string) - Required - The action to perform (e.g., 'create', 'verify'). ### Request Example (POST - Create) ```json { "pin": "1234", "action": "create" } ``` ### Response #### Success Response (200 - GET) - **pinExists** (boolean) - Indicates if a PIN is already set for the user. #### Success Response (201 - POST) - **message** (string) - Confirmation message for PIN action. #### Response Example (GET) ```json { "pinExists": true } ``` #### Response Example (POST) ```json { "message": "PIN created successfully." } ``` ## POST /api/security/pin/change ### Description Change the user's existing access PIN. Requires identity validation. ### Method POST ### Endpoint /api/security/pin/change ### Parameters #### Request Body - **currentPin** (string) - Required - The user's current security PIN. - **newPin** (string) - Required - The new security PIN. ### Request Example ```json { "currentPin": "1234", "newPin": "5678" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message that the PIN has been changed. #### Response Example ```json { "message": "Security PIN changed successfully." } ``` ## GET/POST /api/security/2fa/email ### Description Manage two-factor authentication (2FA) settings via email. Allows enabling, disabling, or retrieving 2FA status. ### Method GET/POST ### Endpoint /api/security/2fa/email ### Parameters #### Request Body (for POST) - **enable** (boolean) - Required - Set to true to enable 2FA, false to disable. ### Request Example (POST - Enable) ```json { "enable": true } ``` ### Response #### Success Response (200 - GET) - **isEnabled** (boolean) - Indicates if 2FA via email is currently enabled. #### Success Response (200 - POST) - **message** (string) - Confirmation message for enabling/disabling 2FA. #### Response Example (GET) ```json { "isEnabled": true } ``` #### Response Example (POST) ```json { "message": "Two-factor authentication via email has been enabled." } ``` ``` -------------------------------- ### User Verification APIs Source: https://docs.cbpayapp.com/business/user Encompasses endpoints for Know Your Customer (KYC) verification and general user account verification status checks. ```APIDOC ## POST /api/verification/kyc ### Description Initiate the Know Your Customer (KYC) verification process to validate user identity. ### Method POST ### Endpoint /api/verification/kyc ### Parameters #### Request Body - **documentType** (string) - Required - Type of document submitted (e.g., 'passport', 'id_card'). - **documentImage** (file) - Required - Image of the identification document. - **selfieImage** (file) - Optional - Image of the user holding their ID. ### Request Example ``` (Multipart form data with 'documentType', 'documentImage', and optionally 'selfieImage' fields) ``` ### Response #### Success Response (202) - **message** (string) - Confirmation that the verification process has started. - **verificationId** (string) - Identifier for this verification attempt. #### Response Example ```json { "message": "KYC verification process initiated successfully.", "verificationId": "kyc-uuid-abcde" } ``` ## GET /api/verification/user/status ### Description Verify the status, validity, and information of the user account. ### Method GET ### Endpoint /api/verification/user/status ### Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **status** (string) - The verification status of the user (e.g., 'verified', 'pending', 'rejected'). - **details** (object) - Additional details about the verification status, if applicable. #### Response Example ```json { "status": "verified", "details": { "verifiedAt": "2023-10-27T11:00:00Z" } } ``` ``` -------------------------------- ### GET /api/bolivia/banks/codes Source: https://docs.cbpayapp.com/business/bolivia Retrieves a list of available bank codes for conducting bank withdrawals in Bolivia. ```APIDOC ## GET /api/bolivia/banks/codes ### Description Obtain the list of bank codes available for making bank withdrawals in Bolivia. ### Method GET ### Endpoint /api/bolivia/banks/codes ### Parameters ### Request Example (No request body or parameters required) ### Response #### Success Response (200) - **bank_codes** (array) - A list of available bank codes. - **code** (string) - The bank code. - **name** (string) - The name of the bank. #### Response Example ```json { "bank_codes": [ { "code": "001", "name": "Banco de Bolivia" }, { "code": "002", "name": "Banco de la Nación Boliviana" } ] } ``` ``` -------------------------------- ### Bank Withdrawal API Source: https://docs.cbpayapp.com/core/withdrawal/eu View and create bank withdrawals in Europe using the SEPA system. Supports listing existing withdrawals and creating new ones. ```APIDOC ## Bank Withdrawal API ### Description View and create bank withdrawals in Europe. List existing withdrawals and create new withdrawals to bank accounts via the SEPA system. All withdrawals are processed in euros (EUR). ### Method GET, POST ### Endpoint /websites/cbpayapp/withdrawals/europe ### Parameters #### Query Parameters * **status** (string) - Optional - Filter withdrawals by status (e.g., 'pending', 'completed', 'failed'). * **limit** (integer) - Optional - Number of withdrawals to return per page. * **offset** (integer) - Optional - Number of withdrawals to skip before starting to collect the result set. #### Request Body (for POST) - **amount** (number) - Required - The amount to withdraw in EUR. - **currency** (string) - Required - Must be 'EUR'. - **iban** (string) - Required - The International Bank Account Number of the recipient. - **bic** (string) - Optional - The Bank Identifier Code of the recipient's bank. - **reference** (string) - Optional - A reference for the withdrawal. ### Request Example #### GET Example ``` GET /websites/cbpayapp/withdrawals/europe?status=pending&limit=10 ``` #### POST Example ```json { "amount": 100.50, "currency": "EUR", "iban": "DE89370400440532013000", "reference": "Invoice #12345" } ``` ### Response #### Success Response (200) - **withdrawals** (array) - A list of withdrawal objects. - **id** (string) - Unique identifier for the withdrawal. - **amount** (number) - The amount withdrawn. - **currency** (string) - The currency of the withdrawal (EUR). - **iban** (string) - The recipient's IBAN. - **status** (string) - The current status of the withdrawal. - **createdAt** (string) - Timestamp when the withdrawal was created. - **updatedAt** (string) - Timestamp when the withdrawal was last updated. #### Response Example (GET) ```json { "withdrawals": [ { "id": "wd_123abc", "amount": 100.50, "currency": "EUR", "iban": "DE89370400440532013000", "status": "pending", "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z" } ] } ``` #### Response Example (POST) ```json { "id": "wd_456def", "amount": 100.50, "currency": "EUR", "iban": "DE89370400440532013000", "status": "pending", "createdAt": "2023-10-27T10:05:00Z", "updatedAt": "2023-10-27T10:05:00Z" } ``` #### Error Response (400 Bad Request) - **error** (string) - Description of the error. #### Error Response Example ```json { "error": "Invalid IBAN format." } ``` ```