Mono Colombia

Prepare bank transfers

Creates and leaves a batch of transfers pending for approval, these bank transfers can be between accounts of the same or different banks, which allows multiple transfers to be processed together in a single request. This endpoint is designed to allow transfers to be reviewed and approved by an administrator user from the Mono app before being sent to the banks.

When the server receives the request, it will process the batch of transfers and create transfer records in our database for each of them, the transfers will not be executed immediately, instead, the batch will be queued for review and approval by an administrator user from Mono app.

Considerations:

  1. API key roles allowed to consume this endpoint are "Administrator" and "Preparer".
  2. The minimum number of transfers allowed per batch is 1.
  3. The maximum number of transfers allowed per batch are 1.000.
POST
/v1/transfers/prepare

Authorization

authorization

AuthorizationBearer <token>

In: header

Header Parameters

x-idempotency-key?string

Idempotency key in UUID v4 format

Formatuuid
Example"f30f1d0b-795f-49f5-80dc-41a7bffccfde"

Request Body

application/json

Attributes to prepare a batch of transfers

account_idstring

Represents the account of the client to which a debit entry will be made as a result of the transaction.

Match^[A-Za-z]{2,6}_[\w-]{22}$
Example"acc_5tgliBmzjZ6mpQPRbQjfKj"
transfersarray<Transfer>

It contains a list with transfers

Items1 <= items <= 1000

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.cert.monoban.co/v1/transfers/prepare" \  -H "Content-Type: application/json" \  -d '{    "account_id": "acc_5tgliBmzjZ6mpQPRbQjfKj",    "transfers": [      {        "payee": {          "document_number": "string",          "document_type": "CC",          "name": "string"        },        "amount": {          "amount": 100000000,          "currency": "COP"        }      }    ]  }'
{
  "account_id": "acc_5tgliBmzjZ6mpQPRbQjfKj",
  "transfers": [
    {
      "fallback_routing": [],
      "payee": {
        "bank_account": {
          "bank_code": "string",
          "number": "123456789",
          "type": "savings_account"
        },
        "document_number": "string",
        "document_type": "CC",
        "email": "someone@gmail.com",
        "name": "string",
        "phone_number": "+573001000000"
      },
      "routing": "ach",
      "amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "batch": {
        "account_id": "acc_5tgliBmzjZ6mpQPRbQjfKj",
        "id": "bat_5tgliBmzjZ6mpQPRbQjfKj",
        "inserted_at": "2022-01-01T01:00:00Z",
        "origin": "api",
        "state": "created",
        "total_amount": {
          "amount": 100000000,
          "currency": "COP"
        },
        "updated_at": "2022-01-01T01:00:00Z"
      },
      "declination_reason": "insufficient_funds",
      "description": "string",
      "emails_to_notify": [
        "someone@gmail.com"
      ],
      "entity_id": "string",
      "external_id": "123456789",
      "id": "trn_5tgliBmzjZ6mpQPRbQjfKj",
      "inserted_at": "2022-01-01T01:00:00Z",
      "reference": "string",
      "state": "created",
      "updated_at": "2022-01-01T01:00:00Z"
    }
  ]
}
{
  "account_id": "acc_5tgliBmzjZ6mpQPRbQjfKj",
  "transfers": [
    {
      "fallback_routing": [],
      "payee": {
        "bank_account": {
          "bank_code": "string",
          "number": "123456789",
          "type": "savings_account"
        },
        "document_number": "string",
        "document_type": "CC",
        "email": "someone@gmail.com",
        "name": "string",
        "phone_number": "+573001000000"
      },
      "routing": "ach",
      "amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "batch": {
        "account_id": "acc_5tgliBmzjZ6mpQPRbQjfKj",
        "id": "bat_5tgliBmzjZ6mpQPRbQjfKj",
        "inserted_at": "2022-01-01T01:00:00Z",
        "origin": "api",
        "state": "created",
        "total_amount": {
          "amount": 100000000,
          "currency": "COP"
        },
        "updated_at": "2022-01-01T01:00:00Z"
      },
      "declination_reason": "insufficient_funds",
      "description": "string",
      "emails_to_notify": [
        "someone@gmail.com"
      ],
      "entity_id": "string",
      "external_id": "123456789",
      "id": "trn_5tgliBmzjZ6mpQPRbQjfKj",
      "inserted_at": "2022-01-01T01:00:00Z",
      "reference": "string",
      "state": "created",
      "updated_at": "2022-01-01T01:00:00Z"
    }
  ]
}
{
  "code": "400 Bad Request",
  "errors": [
    {
      "error_code": "validation_error",
      "message": "Generic changeset errors",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Malformed request"
}
{
  "code": "401 Unauthorized",
  "errors": [
    {
      "error_code": "expired_token",
      "message": "The token is expired, inactive, or doesn't exist.",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Authorization header is missing or invalid."
}
{
  "code": "403 Forbidden",
  "errors": [
    {
      "error_code": "not_authorized",
      "message": "Not authorized to have access to this resource.",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Not authorized to have access to this resource"
}
{
  "code": "422 Unprocessable Entity",
  "errors": [
    {
      "error_code": "missing_field",
      "message": "The field is missing on the request body or parameters.",
      "path": "#/path/to/field",
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Validation errors"
}