Transactions

Transactions are a core part of the Coba API — they represent the movement of funds between accounts, whether for internal transfers or external payouts. On this page, you’ll find everything you need to create and manage transactions programmatically.

The transaction model

The transaction model contains all the information about a financial transfer initiated through the Coba API. It includes details such as the amount, usd_amount, account_number, account_holder, kind, description, created_at, status, token, provider_transaction_id. Transactions can represent internal movements, outbound payments, or FX-converted transfers.

Each transaction is immutable once created, but its status will update as it moves through the processing lifecycle — from pending to completed, declined, or refunded. This model provides a complete snapshot of every transfer your application initiates.

Properties

  • Name
    amount
    Type
    string
    Description

    The original amount of the transaction, in MXN.

  • Name
    usd_amount
    Type
    string
    Description

    The amount in USD equivalent to the original amount.

  • Name
    account_number
    Type
    string
    Description

    The destination account number receiving the funds.

  • Name
    account_holder
    Type
    string
    Description

    The name of the account holder receiving the funds.

  • Name
    kind
    Type
    string
    Description

    The type of transaction. For example, spei for transfers in Mexico.

  • Name
    description
    Type
    string
    Description

    A custom description provided by the client to identify the transaction.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the transaction was created with timezone.

  • Name
    status
    Type
    string
    Description

    Current status of the transaction.
    One of: pending, complete, refunded, declined.

  • Name
    token
    Type
    string
    Description

    A unique, signed identifier for this transaction. Use this to reference the transaction in client-side or follow-up operations.

  • Name
    provider_transaction_id
    Type
    string
    Description

    An optional ID returned by the underlying provider that executed the transaction.
    Useful for reconciliation or support cases.


GET/transactions

List all transactions

This endpoint allows you to retrieve a paginated list of all your transactions. By default, a maximum of ten transactions are shown per page.

Optional attributes

  • Name
    per_page
    Type
    integer
    Description

    Limit the number of transactions returned.

  • Name
    page
    Type
    string
    Description

    The page number to retrieve.

Request

GET
/transactions
curl -G https://sandbox.api.coba.ai/metal/transactions \
  -H "Authorization: Bearer {token}" \
  -H "X-Coba-Metal-API-Key: {client_api_key}" 

Response

{
  "data": [
      {
          "amount": "20.0",
          "usd_amount": "1.0",
          "account_number": "000000000000000000",
          "account_holder": "John Doe",
          "kind": "spei",
          "description": "Some description for sandbox",
          "created_at": "2025-05-23T18:03:52.760Z",
          "status": "pending",
          "token": "oIJKrpVKml-BVq8N5JGm6g8VjsrR8sPhvJZRty02-8mmzxtcGuvT6paWqymj-Zoc1R9gL4p6L8vqnJ8XIBFbFw",
          "provider_transaction_id": null
      }
  ],
  "metadata": {
      "prev_url": "/metal/transactions?per_page=1&page=",
      "next_url": "/metal/transactions?per_page=1&page=2",
      "count": 3,
      "page": 1,
      "next": 2
  }
}

Was this page helpful?