RecipesRender payment methods
Render payment methods
Use available products to build a dynamic payment method picker without hardcoding rails.
This recipe shows how to decide what your UI should render before you create a payment. Do not hardcode ETPAY, PIX, BANK_ACCOUNT, or any other rail in your product. Ask Conomy what is available for the identity, then render only those options.
Use this recipe before every new payment form. It prevents users from selecting a currency, rail, or node field that is not enabled for their identity.
Know the identity, source currency, settlement currency, and business intent.
Call available products and read enabled rails.
Show only required fields for the selected node.
Send the selected product, origin, and destination.
1. Discover enabled rails
Section titled “1. Discover enabled rails”GET /sandbox/payments/available-products?identityId=<IDENTITY_ID>¤cies=CLP HTTP/1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Accept: application/json{
"supportedPaymentCurrencies": [
"CLP"
],
"supportedPayoutCurrencies": [
"CLP"
],
"supportedPaymentMethods": [
"ETPAY",
"FINTOC",
"WEBPAY"
],
"supportedWithdrawalMethods": [
"BANK_ACCOUNT"
],
"byCurrency": [
{
"currency": "CLP",
"payin": {
"paymentMethods": [
"ETPAY",
"FINTOC",
"WEBPAY"
],
"products": [
{
"name": "ETPAY",
"type": "ETPAY",
"currency": "CLP",
"product": "CLP:CLP",
"requiredFields": [
"etpay.successUrl",
"etpay.failedUrl",
"etpay.customer.email"
],
"validDestinations": [
"ACCOUNT"
]
}
]
},
"payout": {
"withdrawalMethods": [
"BANK_ACCOUNT"
],
"products": [
{
"name": "BANK_ACCOUNT",
"type": "BANK_ACCOUNT",
"currency": "CLP",
"product": "CLP:CLP",
"requiredFields": [
"bank.accountNumber",
"bank.accountHolder",
"customer.documentNumber"
],
"validOrigins": [
"ACCOUNT"
]
}
]
}
}
]
}2. Map the response to UI
Section titled “2. Map the response to UI”For a top-up, render byCurrency[].payin.paymentMethods as the origin selector and force the destination to ACCOUNT when the selected product says validDestinations: ["ACCOUNT"].
For a withdrawal, force the origin to ACCOUNT and render byCurrency[].payout.withdrawalMethods as the destination selector.
3. Validate the node before submit
Section titled “3. Validate the node before submit”Use requiredFields as the source of truth. If the selected origin is ETPAY, the form must collect successUrl, failedUrl, and customer data before calling POST /payments.
The next step is Transaction builder, which turns the selected intent, rail, and account data into a complete POST /payments body.