Skip to content

Suggested

API Dashboard

RecipesGenerate a Payment Request

Generate a Payment Request

Use the transaction builder to choose a payment intent, select origin and destination nodes, and generate the request you can send to POST /payments.

This recipe is the fastest way to understand how Conomy moves money. Choose the business intent, pick the origin and destination rails, then use the generated request as the shape your backend should send to POST /payments.

Note

Before showing rails in your product, call GET /payments/available-products. That response tells you which currencies, rails, node fields, and payment types are available for the identity you are operating with.

Build request

TOPUP_ACCOUNT

Pay-in rail to account
01

Call GET /payments/available-products using the same identity and currencies.

02

Render only the rails returned by paymentMethods and withdrawalMethods.

03

Use requiredFields to validate each selected node before posting the payment.

01
Discover products

Ask Conomy which payment types, currencies, and rails are enabled for the identity.

02
Build nodes

Choose one origin and one destination. Each node has a type plus its matching sub-object.

03
Create payment

Send the generated payload to POST /payments from your backend.

04
Capture

Capture once the customer or provider authorization is complete.

05
Reconcile

Use webhooks and GET /payments/{id} to mirror final state in your system.

Use the same identity, currencies, and product context your user selected in your product. The response drives what you render in the UI.

Request
GET /sandbox/payments/available-products?identityId=<IDENTITY_ID>&purchaseCurrency=CLP&currency=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
Response
{
  "products": [
    {
      "product": "CLP:CLP",
      "paymentTypes": [
        "TOPUP_ACCOUNT",
        "WITHDRAWAL_ACCOUNT"
      ],
      "paymentMethods": [
        "ETPAY",
        "FINTOC",
        "WEBPAY"
      ],
      "withdrawalMethods": [
        "BANK_ACCOUNT"
      ],
      "requiredFields": {
        "ETPAY": [
          "successUrl",
          "failedUrl",
          "customer.email"
        ],
        "ACCOUNT": [
          "identity.identityId",
          "account.accountNumber"
        ]
      }
    }
  ]
}

Use the builder above to produce the request. The important part is the node contract:

  • origins describes where the money starts.
  • destinations describes where the money should end.
  • type explains the business intent: top-up, withdrawal, purchase, remittance, P2P, collect, or fee.
  • each node has one type and one matching sub-object, such as etpay, pix, bank, or account.

For a top-up, the origin is a pay-in rail and the destination is an internal ACCOUNT.

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

{
  "externalId": "topup-account-001",
  "identityId": "<IDENTITY_ID>",
  "accountNumber": "<ACCOUNT_NUMBER>",
  "product": "CLP:CLP",
  "type": "TOPUP_ACCOUNT",
  "purchaseAmount": "100000",
  "purchaseCurrency": "CLP",
  "currency": "CLP",
  "origins": [
    {
      "type": "ETPAY",
      "currency": "CLP",
      "etpay": {
        "successUrl": "https://yourapp.com/success",
        "failedUrl": "https://yourapp.com/failed",
        "customer": {
          "firstName": "Jane",
          "email": "jane@example.com"
        }
      }
    }
  ],
  "destinations": [
    {
      "type": "ACCOUNT",
      "currency": "CLP",
      "identity": {
        "identityId": "<IDENTITY_ID>"
      },
      "account": {
        "accountNumber": "<ACCOUNT_NUMBER>"
      }
    }
  ]
}
Response
{
  "id": "<PAYMENT_ID>",
  "type": "TOPUP_ACCOUNT",
  "status": "CREATED",
  "product": "CLP:CLP",
  "origins": [
    {
      "type": "ETPAY",
      "etpay": {
        "url": "https://provider.example/authorize"
      }
    }
  ]
}

Capture when your flow is ready to commit the movement. Then mirror the final state from webhooks and from GET /payments/{id}.

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"
}
Request
GET /sandbox/payments/{PAYMENT_ID} 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>",
  "type": "TOPUP_ACCOUNT",
  "status": "SETTLED",
  "product": "CLP:CLP",
  "purchaseAmount": "100000",
  "purchaseCurrency": "CLP",
  "currency": "CLP"
}
Tip

If your backend can complete these five steps in sandbox without manual edits, the integration path is correct: discover rails, build nodes, create payment, capture, and reconcile.