Mono Colombia

Create collections

Creates one or more collections for receiving payments through Bre-B network.

Each collection will be created in created state and a Bre-B key will be requested from the provider. Once the key is registered, a webhook notification will be sent and the collection state will change to ready.

The response categorizes collections into:

  • created: Successfully created collections
  • duplicated: Collections with external_id that already exist (returns existing collection)
  • rejected: Collections that failed validation
POST
/api/v1/collections

Authorization

oauth collections
AuthorizationBearer <token>

In: header

Scope: collections

Request Body

application/json

Batch of collections

collectionsarray<Collection>

Array of collections to be created

Items1 <= items <= 1000
tenant_account_idstring

The tenant account that will receive the payments for all collections in this batch

Match^[A-Za-z]{2,7}_[\w-]{22}$
Example"bbtacc_5tgliBmzjZ6mpQPRbQjfKj"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://breb-participant.cert.monoban.co/api/v1/collections" \  -H "Content-Type: application/json" \  -d '{    "collections": [      {        "external_id": "invoice-12345",        "usage_mode": "single_use"      }    ],    "tenant_account_id": "bbtacc_5tgliBmzjZ6mpQPRbQjfKj"  }'
{
  "created": [
    {
      "custom_key_value": "INV12345",
      "custom_merchant_name": "Acme Corp",
      "enabled": true,
      "expected_payers": [
        {
          "document_number": "1234567890",
          "document_type": "CC"
        }
      ],
      "expires_at": "2022-01-01T01:00:00Z",
      "expires_in": 1,
      "external_id": "invoice-12345",
      "failed_attempts": 0,
      "id": "bbcol_5tgliBmzjZ6mpQPRbQjfKj",
      "inserted_at": "2022-01-01T01:00:00Z",
      "key_pruned_at": "2022-01-01T01:00:00Z",
      "keys": [
        {
          "name": "Acme Corp - INV12345",
          "state": "active",
          "type": "identification",
          "value": "@MONO1A2B3C4D5E"
        }
      ],
      "maximum_attempt_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "metadata": {
        "id": 3,
        "reference": 123
      },
      "minimum_attempt_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "nickname": "Monthly subscription",
      "paid_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "prune_status": null,
      "reference": "Payment for November 2025",
      "state": "created",
      "state_reason": null,
      "successful_attempts": 0,
      "tenant_account_id": "bbtacc_5tgliBmzjZ6mpQPRbQjfKj",
      "total_maximum_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "total_minimum_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "updated_at": "2022-01-01T01:00:00Z",
      "usage_mode": "single_use"
    }
  ],
  "duplicated": [
    {
      "custom_key_value": "INV12345",
      "custom_merchant_name": "Acme Corp",
      "enabled": true,
      "expected_payers": [
        {
          "document_number": "1234567890",
          "document_type": "CC"
        }
      ],
      "expires_at": "2022-01-01T01:00:00Z",
      "expires_in": 1,
      "external_id": "invoice-12345",
      "failed_attempts": 0,
      "id": "bbcol_5tgliBmzjZ6mpQPRbQjfKj",
      "inserted_at": "2022-01-01T01:00:00Z",
      "key_pruned_at": "2022-01-01T01:00:00Z",
      "keys": [
        {
          "name": "Acme Corp - INV12345",
          "state": "active",
          "type": "identification",
          "value": "@MONO1A2B3C4D5E"
        }
      ],
      "maximum_attempt_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "metadata": {
        "id": 3,
        "reference": 123
      },
      "minimum_attempt_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "nickname": "Monthly subscription",
      "paid_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "prune_status": null,
      "reference": "Payment for November 2025",
      "state": "created",
      "state_reason": null,
      "successful_attempts": 0,
      "tenant_account_id": "bbtacc_5tgliBmzjZ6mpQPRbQjfKj",
      "total_maximum_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "total_minimum_amount": {
        "amount": 100000000,
        "currency": "COP"
      },
      "updated_at": "2022-01-01T01:00:00Z",
      "usage_mode": "single_use"
    }
  ],
  "rejected": [
    {
      "error_code": "key_already_registered",
      "external_id": "invoice-12345",
      "message": "string"
    }
  ]
}
{
  "code": "400 Bad Request",
  "errors": [
    {
      "error_code": "tenant_account_not_found",
      "message": "Tenant account not found",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Malformed request"
}
{
  "code": "401 Unauthorized",
  "errors": [
    {
      "error_code": "missing_authorization_header",
      "message": "`Authorization` header is missing.",
      "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": "500 Internal Server Error",
  "errors": [
    {
      "error_code": "internal_error",
      "message": "An unexpected error occurred",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Something went wrong on the Server"
}
{
  "code": "503 Service Unavailable",
  "errors": [
    {
      "error_code": "service_is_unavailable",
      "message": "The service is unavailable, Please try again later",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Service unavailable"
}