Mono Colombia

Simulate a collection attempt

Simulates a payment attempt to a collection in the sandbox environment.

Requirements:

  • The creditor key must exist, be active and needs to be related to a collection
  • The associated tenant account must be valid

Payer information: If payer information is not provided, it will be randomly generated.

Error simulation: Use the error field to simulate different failure scenarios. The payment will be created successfully but will receive a failure event with the specified error.

POST
/api/v1/sandbox/collections/attempts

Request Body

application/json

Sandbox attempt request

TypeScript Definitions

Use the request body type in TypeScript.

amountobject

The amount of the payment

creditor_key_type?string

The type of the creditor's Bre-B key. Defaults to alphanumeric.

Default"alphanumeric"
Value in"identification" | "cellphone" | "email" | "alphanumeric" | "merchant_code"
Example"alphanumeric"
creditor_key_valuestring

The value of the creditor's Bre-B key

Example"@MN1234567890"
error?string|null

Optional error to simulate. If provided, the payment will fail with the specified error.

Available errors:

  • tx_unknown: An unexpected error occurred
  • tx_provider_unavailable: Bre-B system is unavailable
  • tx_breb_timeout: Bre-B timeout
  • tx_risk_control: Transaction blocked by risk control
Value in"tx_unknown" | "tx_provider_unavailable" | "tx_breb_timeout" | "tx_risk_control"
Example"tx_risk_control"
payer?object|null

The payer's information. If not provided, will be randomly generated.

payment_id?string|null

The payment identifier (max 36 characters). Maps to the QR code or payment reference.

Lengthlength <= 36
Example"550e8400-e29b-41d4-a716-446655440000"

Response Body

application/json

application/json

application/json

curl -X POST "https://breb-participant.sandbox.mono.la/api/v1/sandbox/collections/attempts" \  -H "Content-Type: application/json" \  -d '{    "amount": {      "amount": 100000000,      "currency": "COP"    },    "creditor_key_value": "@MN1234567890"  }'
{
  "attempt_id": "bbcolat_5tgliBmzjZ6mpQPRbQjfKj",
  "attempt_state_reason": "risk_control",
  "collection_id": "bbcol_5tgliBmzjZ6mpQPRbQjfKj",
  "transfer_id": "bbit_5tgliBmzjZ6mpQPRbQjfKj"
}
{
  "code": "400 Bad Request",
  "errors": [
    {
      "error_code": "key_not_found",
      "message": "Key not found",
      "path": null,
      "url": null
    }
  ],
  "id": "log_7MkWaFqvfosB8fzHhb1Eql",
  "message": "Malformed request"
}
{
  "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"
}