FX Payin
An FX payin collects local fiat into a PSP or customer custody balance. Unlike fiat_payin, it does not quote into stablecoins and does not settle into a Celar wallet.
Examples use the sandbox environment. For production, replace
api.sandbox.celar.iowithapi.celar.io.
How it works
- Submit an
fx_payintransfer with the customer's fiat collection details - Celar creates the underlying collection request
- The customer completes the collection through the supported bank or mobile rail
- Funds settle into the PSP or customer custody balance
- Track completion through Payment Statuses or Webhooks
Prerequisites
- A valid
customer_id: see Register a Customer - A unique
Idempotency-Keyfor the request - The collection currency and rail must match the supported combinations:
NGNusesbankKESusesmobilewithMPESAUGXusesmobilewithMTNorAIRTEL
info
fx_payin does not require a rate signature, a destination crypto wallet, or a Celar walletId.
Submit the transfer
- KES Mobile
- NGN Bank
curl --request POST \
--url https://api.sandbox.celar.io/api/v1/payments/transfer \
--header 'Authorization: Bearer <your_api_key>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <unique_uuid>' \
--data '{
"operationType": "fx_payin",
"customer_id": "cr_70be275b878077ab",
"amount": 1000,
"source": {
"currency": "KES",
"description": "KES custody funding",
"paymentMethod": "mobile",
"serviceProvider": "MPESA",
"phoneNumber": "+254719599951",
"accountName": "Frankline Mosigisi",
"reference": "fx-payin-kes-ref101"
}
}'
curl --request POST \
--url https://api.sandbox.celar.io/api/v1/payments/transfer \
--header 'Authorization: Bearer <your_api_key>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <unique_uuid>' \
--data '{
"operationType": "fx_payin",
"customer_id": "cr_70be275b878077ab",
"amount": 100000,
"source": {
"currency": "NGN",
"description": "NGN custody funding",
"paymentMethod": "bank",
"reference": "fx-payin-ngn-ref101"
}
}'
Response
NGN bank collections return virtual account instructions. Mobile collections are also asynchronous and should be tracked by webhook or payment status polling.
{
"message": "Follow the payment details below to complete your payin",
"data": {
"paymentId": "transfer_69cdec693604074f",
"status": "pending",
"paymentDetails": {
"accountName": "Frankline Mosigisi",
"accountNumber": "1234567890",
"bankName": "Providus Bank",
"expiryDate": "2026-06-05T05:00:00.000Z",
"expiryInSeconds": 7200,
"amount": 100000,
"currency": "NGN"
}
}
}
NGN virtual account expiry
NGN bank collections use a temporary virtual account. It is valid for 2 hours and must receive the exact quoted amount.
Field reference
| Field | Required | Description |
|---|---|---|
operationType | Yes | fx_payin |
customer_id | Yes | The customer whose custody balance is being funded |
amount | Yes | Fiat amount to collect into custody |
source.currency | Yes | NGN, KES, or UGX |
source.description | Yes | Internal description for reconciliation |
source.paymentMethod | Yes | Must match the source currency: bank for NGN, mobile for KES/UGX |
source.serviceProvider | Conditional | Required for mobile collections: MPESA, MTN, or AIRTEL depending on currency |
source.phoneNumber | Conditional | Required for mobile collections in E.164 format |
source.accountName | Conditional | Required when source.phoneNumber is provided for a mobile collection |
source.reference | No | Your own reference ID |
source.purpose_of_transaction | No | Optional declared reason for the collection |
Purpose of transaction
Supported values
| Value | Description |
|---|---|
GOODS_PURCHASE | Payment for physical goods or merchandise. |
SERVICES_PAYMENT | Payment for services rendered. |
INVOICE_PAYMENT | Settlement of an issued invoice. |
LOAN_REPAYMENT | Repayment of a loan or credit obligation. |
BILLS_PAYMENT | Payment of utilities, subscriptions, or recurring bills. |
SALARY_AND_WAGES | Salary, payroll, or wage disbursement. |
P2P_TRANSFER | Person-to-person transfer between individuals. |
REMITTANCE | Domestic or cross-border transfer to a beneficiary. |
DONATION | Charitable or personal donation. |
GRANTS_AND_SCHOLARSHIPS | Funding for grants, bursaries, or scholarships. |
TRAVEL_AND_ACCOMMODATION | Payment for travel, lodging, or related expenses. |
TAX_PAYMENT | Tax remittance to a government or regulatory authority. |
INSURANCE_PREMIUM | Payment of an insurance premium. |
FAMILY_SUPPORT | Financial support sent to family members. |
EDUCATION | Tuition fees, school expenses, or educational costs. |
GIFT_AND_DONATION | Personal gift or charitable contribution. |
MEDICAL_TREATMENT | Payment for medical or healthcare services. |
MAINTENANCE_EXPENSES | Ongoing maintenance or upkeep costs. |
TRAVEL | Travel-related expenses. |
SMALL_VALUE_REMITTANCE | Low-value cross-border remittance. |
LIBERALIZED_REMITTANCE | Remittance under a liberalized scheme. |
CONSTRUCTION_EXPENSES | Costs related to construction or building projects. |
HOTEL_ACCOMMODATION | Payment for hotel or lodging services. |
ADVERTISING_EXPENSES | Marketing or advertising costs. |
ADVISORY_FEES | Fees for consulting or advisory services. |
BUSINESS_INSURANCE | Business-related insurance payment. |
INSURANCE_CLAIMS | Payment of an insurance claim. |
DELIVERY_FEES | Shipping or delivery charges. |
EXPORTED_GOODS | Payment for goods exported internationally. |
SERVICE_CHARGES | General service or processing charges. |
LOAN_PAYMENT | Loan instalment or repayment. |
OFFICE_EXPENSES | Office supplies or operational costs. |
PROPERTY_PURCHASE | Payment for real estate or property acquisition. |
PROPERTY_RENTAL | Rent payment for residential or commercial property. |
ROYALTY_FEES | Royalties for intellectual property or licensing. |
SHARES_INVESTMENT | Investment in shares or equities. |
FUND_INVESTMENT | Investment into a fund or financial instrument. |
TRANSPORTATION_FEES | Transport or logistics costs. |
UTILITY_BILLS | Payment for electricity, water, gas, or internet. |
PERSONAL_TRANSFER | General personal transfer with no specific category. |
SALARY_PAYMENT | Salary disbursement to an employee. |
OTHER_FEES | Miscellaneous fees not covered by other categories. |
COMPUTER_SERVICES | Payment for IT or software services. |
REWARD_PAYMENT | Reward, bonus, or incentive payment. |
INFLUENCER_PAYMENT | Payment to a content creator or influencer. |