Mono Colombia

Create a collection intent

You can use this endpoint to create a collection intent

POST
/v1/collection_intents

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 create a collection intent

account_idstring

Indicates the format for resource's ID

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

Money schema

bank_codestring

Bank code used by PSE to make the collection

Example"1007"
ipstring

The user IP address

Match^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
Example"88.221.182.60"
note?string|null

Note indicated by the user of the client

Example"February payment"
payerobject
paymentobject
realtime_transfer?boolean|null

Sets the preference for whether the collection intent should use realtime transfers. Will only be true if the system allows it.

Examplefalse
redirect_urlstring

The URL to redirect when the collection intent successfully completes through the provider.

Formaturi-reference
Example"https://my-page/voucher/ID_123"
reference?string|null

Reference indicated by the client or by the user of the client

Example"REF. #5578136"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.cert.monoban.co/v1/collection_intents" \  -H "Content-Type: application/json" \  -d '{    "account_id": "acc_5tgliBmzjZ6mpQPRbQjfKj",    "amount": {      "amount": 100000000,      "currency": "COP"    },    "bank_code": "1007",    "ip": "88.221.182.60",    "payer": {      "document_number": "1099711789",      "document_type": "CC",      "email": "someone@gmail.com",      "name": "Martina Brooks",      "person_type": "natural",      "phone_number": "+573000000000"    },    "payment": {},    "redirect_url": "https://my-page/voucher/ID_123"  }'
{
  "account_id": "acc_5tgliBmzjZ6mpQPRbQjfKj",
  "amount": {
    "amount": 100000000,
    "currency": "COP"
  },
  "bank_code": "1007",
  "id": "cint_5tgliBmzjZ6mpQPRbQjfKj",
  "inserted_at": "2022-01-01T01:00:00Z",
  "ip": "88.221.182.60",
  "note": "February payment",
  "payer": {
    "document_number": "1099711789",
    "document_type": "CC",
    "email": "someone@gmail.com",
    "name": "Martina Brooks",
    "person_type": "natural",
    "phone_number": "+573000000000"
  },
  "payment": {
    "provider": "pse",
    "transaction_id": "1115065899",
    "url": "https://registro.desarrollo.pse.com.co/PSENF/index.html?enc=123"
  },
  "realtime_transfer": false,
  "redirect_url": "https://my-page/voucher/ID_123",
  "reference": "REF. #5578136",
  "state": "created",
  "updated_at": "2022-01-01T01:00:00Z"
}
{
  "account_id": "acc_5tgliBmzjZ6mpQPRbQjfKj",
  "amount": {
    "amount": 100000000,
    "currency": "COP"
  },
  "bank_code": "1007",
  "id": "cint_5tgliBmzjZ6mpQPRbQjfKj",
  "inserted_at": "2022-01-01T01:00:00Z",
  "ip": "88.221.182.60",
  "note": "February payment",
  "payer": {
    "document_number": "1099711789",
    "document_type": "CC",
    "email": "someone@gmail.com",
    "name": "Martina Brooks",
    "person_type": "natural",
    "phone_number": "+573000000000"
  },
  "payment": {
    "provider": "pse",
    "transaction_id": "1115065899",
    "url": "https://registro.desarrollo.pse.com.co/PSENF/index.html?enc=123"
  },
  "realtime_transfer": false,
  "redirect_url": "https://my-page/voucher/ID_123",
  "reference": "REF. #5578136",
  "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"
}