Docs/Payments
View Markdown

Fiat payment intents

A fiat payment intent creates a time-limited virtual bank account for an NGN collection and records the approved crypto settlement destination.

Fiat availability depends on the banking provider and settlement configuration enabled for your organization. The current API accepts NGN. With the currently enabled network policy, the production path is TRON settlement using an active supported token such as USDC. Confirm the exact asset during onboarding.

Get the current fiat rate#

GET /payment/fiat-rate?currency=ngn

Query fieldTypeRequiredDescription
currencystringnoDefaults to ngn. Other currency values currently return an error.
bash
curl --request GET \
  --url 'https://bridge.relayfinance.io/payment/fiat-rate?currency=ngn' \
  --header 'accesskey: YOUR_ORGANIZATION_API_KEY'
json
{
  "success": true,
  "data": {
    "currency": "ngn",
    "rate": 1652.5
  },
  "meta": {
    "requestId": "ee26a15c-6224-4d2e-9c78-5574a80c358c"
  }
}

rate is the buffered NGN-per-USD conversion rate as a JSON number. It is indicative and can change before intent creation; use the values returned on the created payment as the final quote for that intent.

Create a fiat payment intent#

POST /payment/create-fiat-payment-intent

Returns HTTP 201 Created with a payment object and fiatDetail virtual-account instructions.

Request fields#

FieldTypeRequiredDescription
amountnumberyesFiat amount the customer must pay. Must be greater than zero.
currencystringyesCurrently ngn.
txRefstringyesYour merchant order or invoice reference. Not an idempotency key.
useremailstringyesValid customer email address.
postTransactionTypestringnoexternal_wallet by default, or organization_settlement.
settlementobjectyesCrypto network, token, and—when required—destination.
settlement.networkstringyesEnabled settlement network.
settlement.tokenstringyesEnabled settlement token. Fiat logic permits USDC and, where the network is enabled, ETH.
settlement.addressstringconditionalRequired for external_wallet; must be omitted for organization_settlement.
validFornumbernoRequested virtual-account validity in seconds. The provider may return the effective value.
metadataobjectnoYour structured correlation data.
json
{
  "amount": 500000,
  "currency": "ngn",
  "txRef": "invoice-2218",
  "useremail": "buyer@example.com",
  "postTransactionType": "organization_settlement",
  "settlement": {
    "network": "tron",
    "token": "USDC"
  },
  "validFor": 1800,
  "metadata": {
    "customerId": "cus_18fd"
  }
}

Virtual-account response#

json
{
  "success": true,
  "data": {
    "txRef": "invoice-2218",
    "type": "fiat",
    "direction": "deposit",
    "cryptonetwork": "tron",
    "cryptotoken": "USDC",
    "expectedAmount": "302.571860817",
    "rate": "1652.5",
    "expectedSettlementTokenAmount": "302.571860817",
    "virtualAccountExpiresAt": "2026-09-20T12:30:00.000Z",
    "virtualAccountExpiresIn": 1800,
    "txId": "RLY-01K5W6K8A2T9",
    "status": "pending",
    "fiatDetail": {
      "fiatCurrency": "ngn",
      "fiatAmount": "500000",
      "settlementNetwork": "tron",
      "settlementToken": "USDC",
      "settlementAddress": "TQ9ExampleDestinationAddress",
      "virtualAccountNumber": "1234567890",
      "virtualAccountBankCode": "090286",
      "virtualAccountAccountName": "Relay / invoice-2218",
      "virtualAccountCurrencyCode": "NGN",
      "virtualAccountStatus": "ACTIVE",
      "virtualAccountValidFor": 1800,
      "virtualAccountExpiryDate": "2026-09-20T12:30:00.000Z"
    }
  },
  "meta": {
    "requestId": "1563bb6a-bc85-4d33-b2c3-f5d42af9120e"
  }
}

Display the account name, number, bank details, exact NGN amount, and expiry to the customer. Do not display or use the internal callback URL if one appears in fiatDetail.

Retrieve and reconcile#

Use the same retrieval route as crypto payments:

GET /payment/get-payment-intent/{txId}

The response contains the same payment and fiat fields. Bank-provider notifications update the intent asynchronously, so receive payment webhooks and periodically reconcile pending records through retrieval.

Common errors#

HTTPMessageCause
400Only NGN is supported for fiat intentsUnsupported fiat currency
400Invalid settlement detailsMissing network, token, or required address
400Omit settlement.address when using organization_settlementAddress supplied when Relay should resolve the saved destination
400Network is disabledSettlement network is not enabled for new work
400Solana is supported for crypto payment intents onlySolana selected for fiat settlement
400Only USDC and ETH are supported for settlementUnsupported settlement asset
400Unable to fetch exchange rateThe pricing provider is temporarily unavailable
400provider/configuration-specific messageVirtual-account creation or settlement configuration failed
Relay Finance APIServer-to-server financial infrastructure.