RecipesCreate your first withdrawal
Create your first withdrawal
You can use payment-attempts or create the payment directly.
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
Section titled “Payment flow”Use the internal account as origin and the external rail as destination.
Send bank, customer, and destination fields required by the target country.
Finalize the withdrawal so the provider can process the payout.
Update your backend from provider or sandbox delivery events.
Track the payment until it reaches a terminal state.
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.
POST /sandbox/payments 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
Content-Type: application/json
Accept: application/json
{
"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 Dominguez",
"accountHolderDni": "20219636890",
"country": "AR"
},
"customer": {
"firstName": "Fernando",
"lastName": "Dominguez",
"documentNumber": "20219636890",
"country": "ARG",
"email": "fernando@example.com"
}
}
]
}{
"id": "<PAYMENT_ID>",
"type": "WITHDRAWAL_ACCOUNT",
"status": "CREATED"
}Capture payment
Finalize the withdrawal by capturing the transaction.
POST /sandbox/payments/{PAYMENT_ID}/captured 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{
"id": "<PAYMENT_ID>",
"status": "CAPTURED"
}Webhook simulation
Simulate a webhook to test your system’s handling of withdrawal confirmations.
POST /sandboxwebhook/payments/received/payment-provider 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
Content-Type: application/json
Accept: application/json
{
"id": "<PAYMENT_ID>"
}{
"ok": true
}Check account balance
Verify the updated balance after the withdrawal.
GET /sandbox/accounts?accountNumber=<ACCOUNT_NUMBER> 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{
"id": "<ACCOUNT_ID>",
"accountNumber": "<ACCOUNT_NUMBER>",
"availableFunds": "0",
"currency": "ARS",
"status": "ACTIVE"
}Withdrawal by region
Section titled “Withdrawal by region”| Region | Destination type | Rail |
|---|---|---|
| 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 |