Create your first withdrawal
You can use payment-attempts or create the payment directly.
A WITHDRAWAL_ACCOUNT transaction moves funds from an internal conomy_hq account to an external destination such as a bank account or payment rail. The origin is always an internal ACCOUNT.
Payment flow
Create payment
Creates a withdrawal from an internal account to an external bank account.
The example below uses BANK_ACCOUNT as the destination (Argentina). For other rails — such as SPEI (Mexico), PIX (Brazil), or ACH (USA) — replace the destinations node accordingly. 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": "ARS:ARS",
"type": "WITHDRAWAL_ACCOUNT",
"purchaseAmount": "5000",
"purchaseCurrency": "ARS",
"currency": "ARS",
"origins": [
{
"type": "ACCOUNT",
"currency": "ARS",
"identity": {
"identityId": "<IDENTITY_ID>"
},
"account": {
"accountNumber": "<ACCOUNT_NUMBER>"
}
}
],
"destinations": [
{
"type": "BANK_ACCOUNT",
"currency": "ARS",
"bank": {
"accountNumber": "0000267900000001588730",
"bank": "BANCO_CMF",
"currency": "ARS",
"typeAccount": "CHECKING",
"accountHolder": "Fernando Domínguez",
"accountHolderDni": "20219636890",
"country": "AR"
},
"customer": {
"firstName": "Fernando",
"lastName": "Domínguez",
"documentNumber": "20219636890",
"country": "ARG",
"email": "[email protected]"
}
}
]
}'Capture payment
Finalize the withdrawal by capturing the transaction.
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 to test your system's handling of withdrawal confirmations.
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 the updated balance after the withdrawal.
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'Withdrawal by region
Argentina
BANK_ACCOUNT
Bank transfer
Mexico
SPEI
CLABE
Brazil
PIX
PIX key
USA
ACH
Bank transfer
UK
FPE
Faster Pay
Europe
SEPA
IBAN
Chile
BANK_ACCOUNT
Bank transfer
Colombia
BANK_ACCOUNT
Bank transfer
Last updated

