### GET /payment-methods Source: https://docs.transfi.com/docs/before-creating-fiat-payin-gaming Retrieve a list of all payment methods supported and enabled for your Merchant ID (MID). ```APIDOC ## GET /payment-methods ### Description Fetches a list of all supported payment methods enabled for your MID. This information is crucial for selecting an appropriate payment method for your Fiat Payin order. ### Method GET ### Endpoint /v2/payment-methods ### Query Parameters - **currency** (string) - Required - The currency for which to fetch payment methods. - **limit** (integer) - Optional - The number of results to return per page. - **page** (integer) - Optional - The page number for paginated results. - **direction** (string) - Optional - Specifies the direction of the transaction, e.g., 'deposit'. - **headlessMode** (boolean) - Optional - Indicates if the response should be in headless mode. - **userType** (string) - Optional - The type of user, e.g., 'individual'. ### Request Example ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/payment-methods?currency=EUR&limit=5&page=1&direction=deposit&headlessMode=false&userType=individual' \ --header 'MID: ABCDEF_NA_NA' \ --header 'accept: application/json' \ --header 'authorization: Basic dHJhbnNmaV9xYT' ``` ### Response #### Success Response (200) - **status** (string) - The status of the response (e.g., 'success'). - **total** (integer) - The total number of payment methods. - **pages** (integer) - The total number of pages available. - **paymentMethods** (array) - An array of payment method objects. - **paymentCode** (string) - The unique code for the payment method (e.g., 'sepa_pull'). - **name** (string) - The display name of the payment method (e.g., 'Open Banking'). - **minAmount** (integer) - The minimum transaction amount allowed. - **maxAmount** (integer) - The maximum transaction amount allowed. - **logoUrl** (string) - The URL for the payment method's logo. - **paymentType** (string) - The type of payment method (e.g., 'bank_transfer'). #### Response Example ```json { "status": "success", "total": 2, "pages": 1, "paymentMethods": [ { "paymentCode": "sepa_pull", "name": "Open Banking", "minAmount": 1, "maxAmount": 100000, "logoUrl": "https://common-payment-methods-logo.s3.ap-southeast-1.amazonaws.com/open_banking.svg", "paymentType": "bank_transfer" }, { "paymentCode": "sepa_bank", "name": "SEPA Instant", "minAmount": 1, "maxAmount": 100000, "logoUrl": "https://common-payment-methods-logo.s3.ap-southeast-1.amazonaws.com/sepa_bank_va.svg", "paymentType": "bank_transfer" } ] } ``` ``` -------------------------------- ### GET /supported-currencies Source: https://docs.transfi.com/docs/before-creating-fiat-payin-gaming Fetch a list of all currencies supported for your Merchant ID (MID), enabled for deposit transactions. ```APIDOC ## GET /supported-currencies ### Description Fetches a list of all supported currencies enabled for your MID. This is essential before creating a Fiat Payin order to ensure compatibility. ### Method GET ### Endpoint /v2/supported-currencies ### Query Parameters - **direction** (string) - Optional - Specifies the direction of the transaction, e.g., 'deposit'. - **page** (integer) - Optional - The page number for paginated results. - **limit** (integer) - Optional - The number of results to return per page. ### Request Example ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/supported-currencies?direction=deposit&page=1&limit=5' \ --header 'MID: ABCDEF_NA_NA' \ --header 'accept: application/json' \ --header 'authorization: Basic dHJhbnNmaV9xYT' ``` ### Response #### Success Response (200) - **status** (string) - The status of the response (e.g., 'success'). - **total** (integer) - The total number of supported currencies. - **pages** (integer) - The total number of pages available. - **data** (array) - An array of supported currency objects. - **currency** (string) - The currency code (e.g., 'EUR'). - **logoUrl** (string) - The URL for the currency's logo. - **decimalPrecision** (integer) - The number of decimal places for the currency. #### Response Example ```json { "status": "success", "total": 3, "pages": 1, "data": [ { "currency": "EUR", "logoUrl": "https://common-fiat-logos.s3.ap-southeast-1.amazonaws.com/eur.svg", "decimalPrecision": 2 }, { "currency": "IDR", "logoUrl": "https://common-fiat-logos.s3.ap-southeast-1.amazonaws.com/idr.svg", "decimalPrecision": 0 }, { "currency": "PHP", "logoUrl": "https://common-fiat-logos.s3.ap-southeast-1.amazonaws.com/php.svg", "decimalPrecision": 2 } ] } ``` ``` -------------------------------- ### Transfi Fiat/On-Ramp Payin Example Source: https://docs.transfi.com/reference/create-collection-order Provides an example of a successful Fiat/On-Ramp Payin response from the Transfi API. It includes order details, partner context, and payment/redirect URLs. ```json { "type": "object", "x-examples": { "Example 1": { "orderId": "OR-240105131206526", "partnerContext": { "testfield1": "1234", "testfield2": "5678" }, "paymentUrl": "https://sandbox-pay-widget.transfi.com/trade?paytoken=36ad6e7b-8e28-4153-8aff-1e8d1e8ee215", "redirectUrl": "https://www.example.com" } } } ``` -------------------------------- ### Create Individual User API Example (Bash) Source: https://docs.transfi.com/changelog/api-update-enhanced-user-information-streamlined-kyc Example using curl to create an individual user. It demonstrates the new mandatory 'address' object and the optional 'phoneCode' field. This is for new integrations and requires 'Authorization' and 'content-type' headers. ```bash curl --location '[https://sandbox-api.transfi.com/v2/users/individual' --header 'accept: application/json' --header 'content-type: application/json' --header 'Authorization: Basic [your_auth_token]' --data-raw '{ "firstName": "Jane", "lastName": "Doe", "email": "jane.doe@example.com", "country": "IN", "phoneCode": "+91", "phone": "9876543210", "address": { "street": "123 Tech Park", "city": "Bengaluru", "state": "Karnataka", "postalCode": "560001", "country": "IN" } }' ``` -------------------------------- ### GET /payment-methods Source: https://docs.transfi.com/docs/before-creating-fiat-payin Retrieves a list of all supported payment methods that are enabled for your Merchant ID (MID) for a specified currency. ```APIDOC ## GET /payment-methods ### Description Fetches a list of all supported payment methods enabled for your MID. ### Method GET ### Endpoint /v2/payment-methods ### Query Parameters - **currency** (string) - Required - The currency for which to fetch payment methods (e.g., 'EUR'). - **limit** (integer) - Optional - The number of results per page. - **page** (integer) - Optional - The page number for pagination. - **direction** (string) - Required - Specifies the direction of the payment method (e.g., 'deposit'). - **headlessMode** (boolean) - Optional - Indicates if headless mode is enabled. - **userType** (string) - Optional - The type of user (e.g., 'individual'). ### Request Example ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/payment-methods?currency=EUR&limit=5&page=1&direction=deposit&headlessMode=false&userType=individual' \ --header 'MID: ABCDEF_NA_NA' \ --header 'accept: application/json' \ --header 'authorization: Basic dHJhbnNmaV9xYT' ``` ### Response #### Success Response (200) - **status** (string) - The status of the response. - **total** (integer) - The total number of payment methods. - **pages** (integer) - The total number of pages for pagination. - **paymentMethods** (array) - An array of payment method objects. - **paymentCode** (string) - The unique code for the payment method (e.g., 'sepa_pull'). - **name** (string) - The display name of the payment method (e.g., 'Open Banking'). - **minAmount** (integer) - The minimum transaction amount. - **maxAmount** (integer) - The maximum transaction amount. - **logoUrl** (string) - The URL for the payment method logo. - **paymentType** (string) - The type of payment (e.g., 'bank_transfer'). ``` -------------------------------- ### Get Balance API Request (PHP) Source: https://docs.transfi.com/reference/balance This PHP code provides an example of how to fetch balance data from the Transfi API. It uses cURL to send a GET request to the specified URL with the 'accept' header set to 'application/json'. ```php ``` -------------------------------- ### Create Sandbox Prefund (POST Request - JSON) Source: https://docs.transfi.com/reference/create-sandbox-prefund This example illustrates a POST request to create a prefund in the TransFi sandbox environment. It includes necessary headers like 'MID' and a JSON request body containing prefund details. ```json POST /v2/sandbox/prefunds/create-prefund HTTP/1.1 Host: sandbox-api.transfi.com Content-Type: application/json MID: YOUR_MERCHANT_ID { "currency": "USD", "amount": "100.50" } ``` -------------------------------- ### Get Balance API Response (JSON) Source: https://docs.transfi.com/docs/get-balance Example JSON response from the Transfi Get Balance API. It includes a 'balance' array detailing amounts for collections, payouts, fees, settlement, and prefunding, along with the currency and a 'date' field. ```json { "balance": [ { "_id": "EUR", "totalCollectionsAmount": 9371.61, "totalPayoutAmount": 283.32, "totalSettledAmount": 198.8, "totalUnsettledAmount": 3665.69, "totalAvailablePrefundingBalance": 16980.49, "totalPayoutFee": 0, "totalPayoutInTransitBalance": 0, "currency": "EUR" } ], "date": "2025-08-12" } ``` -------------------------------- ### POST /v2/sandbox/prefunds/create-prefund Source: https://docs.transfi.com/reference/create-sandbox-prefund Creates a prefund in the sandbox environment. This endpoint allows organizations to accept prefunds in any currency, which can then be utilized for payouts. ```APIDOC ## POST /v2/sandbox/prefunds/create-prefund ### Description Creates a prefund in the sandbox environment. This endpoint allows organizations to accept prefunds in any currency, which can then be utilized for payouts. **Note: This is a sandbox-only API.** ### Method POST ### Endpoint /v2/sandbox/prefunds/create-prefund ### Parameters #### Path Parameters None #### Query Parameters None #### Header Parameters - **MID** (string) - Required - Merchant or sub-merchant MID. Used to execute the request in the context of that specific entity. #### Request Body ```json { "amount": "string", "currency": "string", "bankName": "string", "accountNumber": "string", "routingNumber": "string" } ``` - **amount** (string) - Required - The amount of the prefund. - **currency** (string) - Required - The currency of the prefund. - **bankName** (string) - Optional - The name of the bank. - **accountNumber** (string) - Optional - The account number. - **routingNumber** (string) - Optional - The routing number. ### Request Example ```json { "amount": "1000.00", "currency": "USD", "bankName": "Example Bank", "accountNumber": "123456789", "routingNumber": "012345678" } ``` ### Response #### Success Response (200) - **orderId** (string) - Prefund Order ID #### Response Example ```json { "orderId": "PF-250324072109977" } ``` #### Error Responses - **400 Bad Request**: Request containing missing or invalid parameters. - **message** (string) - Description of the error. - **code** (string) - Error code. *Example: `{"message": "Mandatory field is missing - amount", "code": "MISSING_ARGUMENTS"}`* - **403 Forbidden**: Restricted or Forbidden Access. - **message** (string) - Description of the error. - **code** (string) - Error code. *Example: `{"message": "This is sandbox only feature. Please contact TransFi team for support", "code": "FORBIDDEN"}`* ``` -------------------------------- ### Get Live Rates (Ruby) Source: https://docs.transfi.com/reference/exchange-rate This Ruby example utilizes the 'httparty' gem to make a GET request to the Transfi API for live exchange rates. It specifies the currency and necessary headers, then prints the response data. ```ruby require 'httparty' url = 'https://sandbox-api.transfi.com/v2/exchange-rates/live-rates' options = { query: { currency: 'PHP' }, headers: { 'accept' => 'application/json' } } response = HTTParty.get(url, options) puts response.parsed_response ``` -------------------------------- ### Get Order Details using Curl Source: https://docs.transfi.com/docs/check-order-status-of-offramp Fetches detailed information for a specific order using its order ID. This example demonstrates a GET request to the Transfi API endpoint. It requires authentication headers and the order ID in the URL. ```curl curl --request GET \ --url https://sandbox-api.transfi.com/v2/orders/OR-250428100239802 \ --header 'accept: application/json' \ --header 'MID: ABCDEF_NA_NA' \ --header 'authorization: Basic dHJhbnNmaV9xYTo=' ``` -------------------------------- ### POST /v2/users/business Source: https://docs.transfi.com/docs/user-creation-and-kyc-kyb-in-offramp Creates a business user account on the Transfi platform. Requires business details such as email, business name, country, registration number, date, and phone number. ```APIDOC ## POST /v2/users/business ### Description Creates a business user account on the Transfi platform. Requires business details such as email, business name, country, registration number, date, and phone number. ### Method POST ### Endpoint https://sandbox-api.transfi.com/v2/users/business ### Parameters #### Query Parameters None #### Request Body - **email** (string) - Required - The email address of the business. - **businessName** (string) - Required - The name of the business. - **country** (string) - Required - The country code of the business. - **regNo** (string) - Required - The business registration number. - **date** (string) - Required - The incorporation date of the business (format: DD-MM-YYYY). - **phone** (string) - Required - The phone number of the business. ### Request Example ```json { "email": "info+1@techsolutions.com", "businessName": "Tech Solutions LLC", "country": "US", "regNo": "987654321", "date": "20-01-2001", "phone": "551234567" } ``` ### Response #### Success Response (200) - **userId** (string) - The unique identifier for the created business user. #### Response Example ```json { "userId": "UX-2508191502353588576" } ``` ``` -------------------------------- ### Order Status Response Example - JSON Source: https://docs.transfi.com/docs/get-order-status-of-fiat-payin-gaming This is an example JSON response received when querying the Transfi API for order status. It contains detailed information about the order, including its ID, type, amounts, currencies, current status, and sender details. ```json { "data": { "orderId": "OR-1234567890123456789", "type": "gaming", "depositCurrency": "EUR", "depositAmount": 25, "withdrawCurrency": "USDC", "status": "initiated", "senderName": { "firstName": "John", "lastName": "Doe" }, "mid": "ABCDEF_NA_NA", "partnerId": "order-081124_00001", "bankTxnId": [], "exchangeRate": null, "userId": "UX-241115132428707" } } ``` -------------------------------- ### Get Balance API Request (cURL) Source: https://docs.transfi.com/docs/get-balance Example cURL request to fetch balance details from the Transfi API. It requires authentication headers and an optional currency parameter. The response provides a JSON object containing balance information categorized by currency. ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/balance?currency=EUR' \ --header 'MID: ABCDEF_NA_NA' \ --header 'accept: application/json' \ --header 'MID: ABCDEF_NA_NA' \ --header 'authorization: Basic abcdef123abcdef' \ ``` -------------------------------- ### POST /websites/transfi/individual Source: https://docs.transfi.com/reference/create-individual-user Creates a new individual user. This endpoint handles the creation of individual user profiles within the Transfi system. It includes detailed information about request parameters, expected responses, and error handling for various scenarios like duplicate requests, missing or invalid arguments, and conflicts. ```APIDOC ## POST /websites/transfi/individual ### Description Creates a new individual user. ### Method POST ### Endpoint /websites/transfi/individual ### Parameters #### Request Body - **userId** (string) - Required - The unique identifier for the user. ### Request Example ```json { "userId": "UX-12345678901" } ``` ### Response #### Success Response (200) - **userId** (string) - The unique identifier of the newly created user. - **summary** (string) - A brief summary message indicating successful user creation. #### Response Example ```json { "User Created Object": { "value": { "userId": "UX-12345678901" }, "summary": "User created successfully" } } ``` #### Error Responses - **400 Bad Request**: Indicates missing or invalid arguments in the request. - Example: ```json { "code": "MISSING_ARGUMENTS", "message": "Request Body- regNo" } ``` - **404 Not Found**: Indicates that the customer associated with the request was not found. - Example: ```json { "code": "CUSTOMER_NOT_FOUND", "message": "Unable to identify the customer" } ``` - **409 Conflict**: Indicates that the user already exists. - Example: ```json { "code": "CONFLICT", "message": "Individual already exists" } ``` ``` -------------------------------- ### Initiate Standard KYB Verification (Node.js) Source: https://docs.transfi.com/reference/business-user-kyb This Node.js example shows how to initiate the Standard KYB verification using the 'axios' library. It sends a POST request to the Transfi API with the required email and MID headers. The response contains a link for user verification and its expiry time. ```javascript const axios = require('axios'); const initiateKYB = async (email, mid) => { try { const response = await axios.post('https://sandbox-api.transfi.com/v2/kyb/standard', { email: email }, { headers: { 'accept': 'application/json', 'content-type': 'application/json', 'MID': mid } }); return response.data; } catch (error) { console.error('Error initiating KYB:', error.response ? error.response.data : error.message); throw error; } }; // Example usage: // initiateKYB('user@example.com', 'YOUR_MERCHANT_ID').then(data => console.log(data)).catch(err => console.error(err)); ``` -------------------------------- ### GET /exchange-rates/deposit Source: https://docs.transfi.com/docs/before-creating-fiat-payin-gaming Obtain the exchange rate for converting a fiat currency to a stablecoin currency (USDT/USDC) for a deposit transaction. ```APIDOC ## GET /exchange-rates/deposit ### Description Fetches the live exchange rate for a deposit transaction, converting a specified fiat currency amount to its equivalent in a stablecoin currency (like USDT or USDC). This endpoint is crucial for calculating the exact amounts and fees involved in a Fiat Payin order. ### Method GET ### Endpoint /v2/exchange-rates/deposit ### Query Parameters - **amount** (number) - Required - The amount of fiat currency to be exchanged. - **currency** (string) - Required - The fiat currency code (e.g., 'EUR'). - **paymentCode** (string) - Required - The code of the payment method to be used. - **direction** (string) - Required - The direction of the exchange, typically 'forward' for deposits. - **balanceCurrency** (string) - Required - The currency in which the balance will be held after conversion (e.g., 'EUR' or the stablecoin ticker). ### Request Example ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/exchange-rates/deposit?amount=100¤cy=EUR&paymentCode=sepa_pull&direction=forward&balanceCurrency=EUR' \ --header 'accept: application/json' \ --header 'MID: ABCDEF_NA_NA' \ --header 'authorization: Basic dHJhbnNmaV9xYT' ``` ### Response #### Success Response (200) - **status** (string) - The status of the response (e.g., 'success'). - **data** (object) - Contains details about the exchange rate. - **fiatTicker** (string) - The ticker symbol of the fiat currency (e.g., 'EUR'). - **fiatAmount** (number) - The amount of fiat currency. - **withdrawAmount** (number) - The equivalent amount in the stablecoin currency after exchange and fees. - **exchangeRate** (number) - The calculated exchange rate. - **quoteId** (string) - A unique identifier for this exchange rate quote. - **fees** (object) - Details about the fees applied. - **processingFee** (number) - The processing fee amount. - **partnerFee** (number) - Any partner-related fees. - **totalFee** (number) - The total fee amount. #### Response Example ```json { "status": "success", "data": { "fiatTicker": "EUR", "fiatAmount": 10, "withdrawAmount": 9.69375, "exchangeRate": 1.041667, "quoteId": "a3c99d01-5f91-48db-a7d0-12746f704745", "fees": { "processingFee": 0.694, "partnerFee": 0, "totalFee": 0.694 } } } ``` ``` -------------------------------- ### Fetch Payment Methods - API (curl) Source: https://docs.transfi.com/docs/before-creating-fiat-payin-gaming Fetches a list of all supported payment methods for a given currency and MID. This allows you to identify available payment options for deposits. Parameters include currency, limit, page, direction, headlessMode, and userType. ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/payment-methods?currency=EUR&limit=5&page=1&direction=deposit&headlessMode=false&userType=individual' \ --header 'MID: ABCDEF_NA_NA' \ --header 'accept: application/json' \ --header 'authorization: Basic dHJhbnNmaV9xYT' ``` -------------------------------- ### GET /exchange-rates/deposit Source: https://docs.transfi.com/docs/before-creating-fiat-payin Fetches the exchange rate for a deposit transaction, converting a fiat currency amount to a stable currency (like USDT/USDC). ```APIDOC ## GET /exchange-rates/deposit ### Description Fetches the exchange rate for the payin fiat currency equivalent to stable currency (USDT/USDC). ### Method GET ### Endpoint /v2/exchange-rates/deposit ### Query Parameters - **amount** (number) - Required - The amount of fiat currency to convert. - **currency** (string) - Required - The fiat currency code (e.g., 'EUR'). - **paymentCode** (string) - Required - The payment method code. - **direction** (string) - Required - The direction of the exchange (e.g., 'forward'). - **balanceCurrency** (string) - Required - The stable currency to convert to (e.g., 'USDC'). ### Request Example ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/exchange-rates/deposit?amount=100¤cy=EUR&paymentCode=sepa_pull&direction=forward&balanceCurrency=USDC' \ --header 'accept: application/json' \ --header 'MID: ABCDEF_NA_NA' \ --header 'authorization: Basic dHJhbnNmaV9xYT' ``` ### Response #### Success Response (200) - **status** (string) - The status of the response. - **data** (object) - Contains details about the exchange rate and fees. - **fiatTicker** (string) - The ticker symbol of the fiat currency. - **fiatAmount** (number) - The original fiat amount. - **withdrawAmount** (number) - The equivalent amount in the stable currency. - **exchangeRate** (number) - The calculated exchange rate. - **quoteId** (string) - A unique identifier for the exchange rate quote. - **fees** (object) - Object containing fee breakdown. - **processingFee** (number) - The processing fee. - **partnerFee** (number) - The partner fee. - **totalFee** (number) - The total fee. - **discount** (number) - Any applicable discount. ``` -------------------------------- ### POST /v2/kyb/standard Source: https://docs.transfi.com/reference/kyb-standard Initiates the Standard KYB (Know Your Business) process for a business user. This endpoint returns a link that can be used to redirect the user to a verification portal. ```APIDOC ## POST /v2/kyb/standard ### Description Initiates the Standard KYB (Know Your Business) process for a business user. This endpoint returns a link that can be used to redirect the user to a verification portal. ### Method POST ### Endpoint /v2/kyb/standard ### Parameters #### Query Parameters (None specified in the provided OpenAPI definition) #### Request Body (No explicit request body schema defined in the provided OpenAPI definition, assuming it might be empty or implicitly handled by authentication) ### Request Example (No request body example provided in the OpenAPI definition) ### Response #### Success Response (200) - **link** (string) - The URL to redirect the user for KYB verification. - **expiresIn** (string) - The duration for which the generated link will be valid. #### Response Example ```json { "link": "https://verify.transfi.com/?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbnRpdHlJZCVYLTI1MDgxMzE3MzkwNjgwMDYyODEiLCJ0eXBlIjoic2ltcGxpZmllZCIsImVudGl0eVR5cGUiOiJyIiwiYnVzaW5lc3NTaXplIjoic21hbGwiLCJpYXQiOjE3NTUxMDcxOTMsInByZWZpeCI6ImJ1c2luZXNzIiUiOiJmMTJiNTI2NzJmZjRlODgxMTcxOGUyZDU0ODBkNWM0OSIsImV4cCI6MTc1NTE1MDM5MywiYXVkIjoia3liLXZlcmlmaWNhdGlvbiIsImlzcyI6ImN5YmVydGVjaC1wbGF0ZmJ9.RfdPwDTnr8mkIwkiTF1WRi8IN19nf_GBCPRlx7ASyS4", "expiresIn": "12h" } ``` #### Error Response (400) - **message** (string) - Description of the error. - **code** (string) - Error code. #### Error Response Example ```json { "message": "Basic KYB verification must be approved before proceeding to simplified level", "code": "KYB_PREREQUISITES_NOT_MET" } ``` #### Error Response (404) - **message** (string) - Description of the error. - **code** (string) - Error code. #### Error Response Example ```json { "message": "User Not Found", "code": "USER_NOT_FOUND" } ``` ``` -------------------------------- ### GET /supported-currencies Source: https://docs.transfi.com/docs/before-creating-fiat-payin Fetches a list of all supported currencies that are enabled for your Merchant ID (MID). This is a crucial step before initiating any payin transactions. ```APIDOC ## GET /supported-currencies ### Description Fetches a list of all supported currencies enabled for your MID. ### Method GET ### Endpoint /v2/supported-currencies ### Query Parameters - **direction** (string) - Required - Specifies the direction of the currency (e.g., 'deposit'). - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of results per page. ### Request Example ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/supported-currencies?direction=deposit&page=1&limit=5' \ --header 'MID: ABCDEF_NA_NA' \ --header 'accept: application/json' \ --header 'authorization: Basic dHJhbnNmaV9xYT' ``` ### Response #### Success Response (200) - **status** (string) - The status of the response. - **total** (integer) - The total number of supported currencies. - **pages** (integer) - The total number of pages for pagination. - **data** (array) - An array of supported currency objects. - **currency** (string) - The currency code (e.g., 'EUR'). - **logoUrl** (string) - The URL for the currency logo. - **decimalPrecision** (integer) - The number of decimal places for the currency. ``` -------------------------------- ### Sample JSON for Transfi Order 'initiated' Status Source: https://docs.transfi.com/docs/webhook-events-gaming This JSON represents an order event where the status is 'initiated'. It includes details about the event, user, and order information. This is typically the first event in an order lifecycle. ```json { "eventId": "EV-241127050202174", "entityId": "OR-241127050200660", "entityType": "order", "status": "initiated", "user": { "userId": "UX-241112114510486", "firstName": "Aryan", "lastName": "Dev", "country": "BE", "createdAt": "2024-11-12T11:45:17.557Z" }, "order": { "orderId": "OR-241127050200660", "type": "gaming", "depositCurrency": "EUR", "depositAmount": 0, "withdrawCurrency": "USDC", "withdrawAmount": 0, "walletAddress": "", "createdAt": "2024-11-27T05:02:00.548Z", "customerOrderId": "order-1234" }, "partnerContext": {}, "createdAt": "2024-11-27T05:02:02.006Z" } ``` -------------------------------- ### POST /v2/kyb/standard Source: https://docs.transfi.com/docs/user-creation-and-kyc-kyb-in-fiat-payin-gaming Submits standard Know Your Business (KYB) information for a business user. Provides a verification link. ```APIDOC ## POST /v2/kyb/standard ### Description Submits standard Know Your Business (KYB) information for a business user. Provides a verification link. ### Method POST ### Endpoint /v2/kyb/standard ### Parameters #### Request Body - **email** (string) - Required - The email address to associate with the KYB submission. ### Request Example ```json { "email": "johndoe@email.com" } ``` ### Response #### Success Response (200) - **link** (string) - A URL to complete the KYB verification process. - **expiresIn** (string) - The duration for which the verification link is valid. #### Response Example ```json { "link": "https://sandbox-verify.transfi.com/?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbnRpdHlJZCI6IlHDUSAIADJDO.DHHSS.VYLTI1MDgwNDExMjIy", "expiresIn": "12h" } ``` ``` -------------------------------- ### List Supported Currencies (PHP) Source: https://docs.transfi.com/reference/configuration A PHP example demonstrating how to retrieve a list of supported currencies using cURL. This snippet configures and executes a GET request to the specified API endpoint. ```php ``` -------------------------------- ### Transfi Order Event Samples (JSON) Source: https://docs.transfi.com/docs/webhook-events-offramp Sample JSON payloads illustrating different order statuses in the Transfi system. These events contain details about the organization, event, user, and order specifics. ```json { "orgId": "OG-2209271015019", "eventId": "EV-2303251340569", "entityId": "OR-2303251339358", "entityType": "order", "status": "initiated", "user": { "userId": "UX-2302140112529", "firstName": "Nandy", "lastName": "Rajan", "country": "PH", "createdAt": "2024-11-27T05:09:15.027Z" }, "order": { "orderId": "OR-123456789", "type": "buy", "fiatTicker": "PHP", "cryptoTicker": "USDTTRC20", "fiatAmount": 1358, "cryptoAmount": 22.98670591, "walletAddress": "TBZmSS1Phxy8jJ9aK3Q6PyxYeNkabcd", "createdAt": "2024-11-27T05:09:15.027Z" }, "partnerContext": {} } ``` ```json { "orgId": "OG-2209271015019", "eventId": "EV-2303251340569", "entityId": "OR-2303251339358", "entityType": "order", "status": "asset_deposited", "user": { "userId": "UX-2302140112529", "firstName": "Nandy", "lastName": "Rajan", "country": "PH", "createdAt": "2024-11-27T05:09:15.027Z" }, "order": { "orderId": "OR-123456789", "type": "buy", "fiatTicker": "PHP", "cryptoTicker": "USDTTRC20", "fiatAmount": 1358, "cryptoAmount": 22.98670591, "walletAddress": "TBZmSS1Phxy8jJ9aK3Q6PyxYeNkabcd", "createdAt": "2024-11-27T05:09:15.027Z" }, "partnerContext": {} } ``` ```json { "orgId": "OG-2209271015019", "eventId": "EV-2303251340569", "entityId": "OR-2303251339358", "entityType": "order", "status": "asset_deposit_failed", "user": { "userId": "UX-2302140112529", "firstName": "Nandy", "lastName": "Rajan", "country": "PH", "createdAt": "2024-11-27T05:09:15.027Z" }, "order": { "orderId": "OR-123456789", "type": "buy", "fiatTicker": "PHP", "cryptoTicker": "USDTTRC20", "fiatAmount": 1358, "cryptoAmount": 22.98670591, "walletAddress": "TBZmSS1Phxy8jJ9aK3Q6PyxYeNkabcd", "createdAt": "2024-11-27T05:09:15.027Z" }, "partnerContext": {} } ``` ```json { "orgId": "OG-2209271015019", "eventId": "EV-2303251340569", "entityId": "OR-2303251339358", "entityType": "order", "status": "fund_settled", "user": { "userId": "UX-2302140112529", "firstName": "Nandy", "lastName": "Rajan", "country": "PH", "createdAt": "2024-11-27T05:09:15.027Z" }, "order": { "orderId": "OR-123456789", "type": "buy", "fiatTicker": "PHP", "cryptoTicker": "USDTTRC20", "fiatAmount": 1358, "cryptoAmount": 22.98670591, "walletAddress": "TBZmSS1Phxy8jJ9aK3Q6PyxYeNkabcd", "createdAt": "2024-11-27T05:09:15.027Z" }, "partnerContext": {} } ``` ```json { "orgId": "OG-2209271015019", "eventId": "EV-2303251340569", "entityId": "OR-2303251339358", "entityType": "order", "status": "fund_failed", "user": { "userId": "UX-2302140112529", "firstName": "Nandy", "lastName": "Rajan", "country": "PH", "createdAt": "2024-11-27T05:09:15.027Z" }, "order": { "orderId": "OR-123456789", "type": "buy", "fiatTicker": "PHP", "cryptoTicker": "USDTTRC20", "fiatAmount": 1358, "cryptoAmount": 22.98670591, "walletAddress": "TBZmSS1Phxy8jJ9aK3Q6PyxYeNkabcd", "createdAt": "2024-11-27T05:09:15.027Z" }, "partnerContext": {} } ``` ```json { "orgId": "OG-2209271015019", "eventId": "EV-2303251340569", "entityId": "OR-2303251339358", "entityType": "order", "status": "expired", "user": { "userId": "UX-2302140112529", "firstName": "Nandy", "lastName": "Rajan", "country": "PH", "createdAt": "2024-11-27T05:09:15.027Z" }, "order": { "orderId": "OR-123456789", "type": "buy", "fiatTicker": "PHP", "cryptoTicker": "USDTTRC20", "fiatAmount": 1358, "cryptoAmount": 22.98670591, "walletAddress": "TBZmSS1Phxy8jJ9aK3Q6PyxYeNkabcd", "createdAt": "2024-11-27T05:09:15.027Z" }, "partnerContext": {} } ``` -------------------------------- ### List Supported Currencies (Node.js) Source: https://docs.transfi.com/reference/configuration Example using Node.js to fetch the list of supported currencies. This snippet requires the 'node-fetch' library or a similar HTTP client. It sends a GET request to the Transfi API. ```javascript const fetch = require('node-fetch'); const url = 'https://sandbox-api.transfi.com/v2/supported-currencies?direction=deposit&page=1&limit=5'; const options = { method: 'GET', headers: { 'accept': 'application/json' } }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error('error:' + err)); ``` -------------------------------- ### Create Business User Request (cURL) Source: https://docs.transfi.com/reference/business-user Example cURL command to send a POST request to create a business user. It includes the API endpoint, required headers for JSON content type and acceptance, and demonstrates the basic structure for making the request. ```shell curl --request POST \ --url https://sandbox-api.transfi.com/v2/users/business \ --header 'accept: application/json' \ --header 'content-type: application/json' ``` -------------------------------- ### Get Deposit Exchange Rate - API (curl) Source: https://docs.transfi.com/docs/before-creating-fiat-payin-gaming Retrieves the exchange rate for a deposit transaction. This API call is used to determine the equivalent stable currency (USDT/USDC) for a given fiat amount and payment method. It requires the amount, currency, paymentCode, direction, and balanceCurrency. ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/exchange-rates/deposit?amount=100¤cy=EUR&paymentCode=sepa_pull&direction=forward&balanceCurrency=EUR' \ --header 'accept: application/json' \ --header 'MID: ABCDEF_NA_NA' \ --header 'authorization: Basic dHJhbnNmaV9xYT' ``` -------------------------------- ### Get Deposit Exchange Rate (Transfi API) Source: https://docs.transfi.com/docs/before-creating-fiat-payin Retrieves the exchange rate for converting a fiat currency amount to a stable currency (USDT/USDC) for a deposit. Requires specifying the amount, currency, payment code, direction, and balance currency. Returns the calculated exchange rate and fees. ```curl curl --request GET \ --url 'https://sandbox-api.transfi.com/v2/exchange-rates/deposit?amount=100¤cy=EUR&paymentCode=sepa_pull&direction=forward&balanceCurrency=USDC' \ --header 'accept: application/json' \ --header 'MID: ABCDEF_NA_NA' \ --header 'authorization: Basic dHJhbnNmaV9xYT' ```