Create your first Top-up
You can use payment-attempts or create the payment directly.
A TOPUP_ACCOUNT transaction funds an internal conomy_hq account. The origin is a payment rail (e.g., ETPAY in Chile, PIX in Brazil) and the destination is an internal ACCOUNT.
Payment flow
Create Payment
Creates a top-up using a payment rail as the origin and an internal account as the destination.
The example below uses ETPAY (open banking, Chile). Replace the origins node type and sub-object to use a different rail — see the Nodes page for all available rails.
curl --location 'https://api.conomyhq.com/sandbox/payments' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'User-Agent: <YOUR_APPLICATION_NAME>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"identityId": "<IDENTITY_ID>",
"accountNumber": "<ACCOUNT_NUMBER>",
"product": "CLP:CLP",
"type": "TOPUP_ACCOUNT",
"purchaseAmount": "700000",
"purchaseCurrency": "CLP",
"currency": "CLP",
"origins": [
{
"type": "ETPAY",
"currency": "CLP",
"etpay": {
"successUrl": "https://yourapp.com/success",
"failedUrl": "https://yourapp.com/failed",
"customer": {
"firstName": "John",
"email": "[email protected]"
}
}
}
],
"destinations": [
{
"type": "ACCOUNT",
"currency": "CLP",
"identity": {
"identityId": "<IDENTITY_ID>"
},
"account": {
"accountNumber": "<ACCOUNT_NUMBER>"
}
}
]
}'The response will include origins[0].etpay.url — redirect the customer to that URL to authorize the payment at their bank.
Capture Payment
After the customer completes the bank authorization, capture the funds to reflect them in the account.
curl --location --request POST 'https://api.conomyhq.com/sandbox/payments/<PAYMENT_ID>/captured' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'User-Agent: <YOUR_APPLICATION_NAME>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data ''Webhook simulation
Simulate a webhook notification to test your payment confirmation handling.
curl --location --request POST 'https://api.conomyhq.com/sandboxwebhook/payments/received/payment-provider' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'User-Agent: <YOUR_APPLICATION_NAME>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: */*' \
--data-raw '{
"id": "<PAYMENT_ID>"
}'Check account balance
Verify that the funds were deposited correctly into the account.
curl --location 'https://api.conomyhq.com/sandbox/accounts?accountNumber=<ACCOUNT_NUMBER>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'User-Agent: <YOUR_APPLICATION_NAME>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: application/json'Top-up by region
Chile
ETPAY
Open banking
Chile
FINTOC
Open banking
Brazil
PIX
Instant QR
Argentina
PCT
QR Transfer
Colombia
PSE
Bank transfer
Colombia
NEQUI
Wallet
Last updated

