Transfers

The Transfers API is at the core of our payment processing system. It supports quote creation, payments, confirmations, and even dynamic exchange rate adjustments.

Creating a Transfer Quote

Generate a transfer quote to estimate fees, exchange rates, and commission. This is the first step before initiating a transfer.


Endpoint: POST /v1/transfers/quote


Sample Request Body:

{
  "amount": 10000,
  "customer_id": "cus_1234567890"
  "source": {
    "payment_rail": "prefunded_account",
    "currency": "USDC",
    "account_id": "ba_source123"
  },
  "destination": {
    "currency": "VES",
    "account_id": "ba_destination456",
    "payment_rail": "pagomovil"
  },
  "fees_paid_by": "source"
}

Response

{
    "id": "qt_k3ktlrmgxwx87pw1",
    "source_amount": 20,
    "quoted_amount": 1520,
    "exchange_rate": 7600,
    "source": {
        "currency": "USD",
        "payment_rail": "prefunded_account"
    },
    "destination": {
        "currency": "VES",
        "account_id": "ba_0wf0n017gnkg75b"
    },
    "status": "completed",
    "created_at": "2025-02-19T00:36:44.142Z",
    "expires_at": "2025-02-19T01:06:44.138Z",
    "external_transfer_id": "7XXXX",
    "commission_fees": [
        {
            "fee": 0,
            "type": "percentage",
            "label": "Comision"
        }
    ],
    "total_fees": 0
}

Paying a Transfer Quote

Once you have a quote, pay for the transfer by providing payment details. This triggers the funds debit and subsequent transfer.

Endpoint: POST /v1/transfers/quote/{id}/pay

Sample Request Body:

{
  "source": {
    "prefunded_account_id": "pa_abc123"
  }
}

Confirming a Quote

Confirm that the quote details match the initiated deposit. The system then finalizes the quote and updates the status.

Some payment rails (like pago_movil) require a separate confirmation step.

Endpoint: POST /v1/transfers/quote/{id}/confirm


Exchange Rates Endpoint

Retrieve current exchange rates for currency conversion. You must specify the from_currency and to_currency in the query parameters.

Endpoint: GET /v1/organizations/{organizationId}/exchange-rates

Example cURL:

curl --location 'https://sandbox-api.kontigo.lat/v1/organizations/org_ywgmm00yzngo559/exchange-rates?from_currency=VES&to_currency=USDC' \
  --header 'x-api-key: YOUR_API_KEY'

Response:

{
	"rate": 1234.56
}

This endpoint helps you calculate the final quoted amount and manage cross-currency transfers.