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.
Request Body
application/json
Sandbox attempt request
TypeScript Definitions
Use the request body type in TypeScript.
The amount of the payment
The type of the creditor's Bre-B key. Defaults to alphanumeric.
"alphanumeric""identification" | "cellphone" | "email" | "alphanumeric" | "merchant_code""alphanumeric"The value of the creditor's Bre-B key
"@MN1234567890"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
"tx_unknown" | "tx_provider_unavailable" | "tx_breb_timeout" | "tx_risk_control""tx_risk_control"The payer's information. If not provided, will be randomly generated.
The payment identifier (max 36 characters). Maps to the QR code or payment reference.
length <= 36"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"
}