Skip to content

Suggested

API Dashboard

RecipesCreate your first withdrawal

Create your first withdrawal

You can use payment-attempts or create the payment directly.

Note

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.


01
Create payment

Use the internal account as origin and the external rail as destination.

02
Validate rail data

Send bank, customer, and destination fields required by the target country.

03
Capture

Finalize the withdrawal so the provider can process the payout.

04
Receive webhook

Update your backend from provider or sandbox delivery events.

05
Reconcile

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.

Request
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"
      }
    }
  ]
}
Response
{
  "id": "<PAYMENT_ID>",
  "type": "WITHDRAWAL_ACCOUNT",
  "status": "CREATED"
}
Capture payment

Finalize the withdrawal by capturing the transaction.

Request
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
Response
{
  "id": "<PAYMENT_ID>",
  "status": "CAPTURED"
}
Webhook simulation

Simulate a webhook to test your system’s handling of withdrawal confirmations.

Request
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>"
}
Response
{
  "ok": true
}
Check account balance

Verify the updated balance after the withdrawal.

Request
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
Response
{
  "id": "<ACCOUNT_ID>",
  "accountNumber": "<ACCOUNT_NUMBER>",
  "availableFunds": "0",
  "currency": "ARS",
  "status": "ACTIVE"
}

RegionDestination typeRail
ArgentinaBANK_ACCOUNTBank transfer
MexicoSPEICLABE
BrazilPIXPIX key
USAACHBank transfer
UKFPEFaster Pay
EuropeSEPAIBAN
ChileBANK_ACCOUNTBank transfer
ColombiaBANK_ACCOUNTBank transfer