Api referenceBankingBanking cards
Topping up and withdrawing the card balance
Topping up and withdrawing the card balance
Authorization
authorization AuthorizationBearer <token>
In: header
Path Parameters
card_idstring
Card ID (Base 62 format)
Match
^[A-Za-z]{2,7}_[\w-]{22}$Example
"car_5tgliBmzjZ6mpQPRbQjfKj"Header Parameters
x-idempotency-key?string
Idempotency key in UUID v4 format
Format
uuidExample
"f30f1d0b-795f-49f5-80dc-41a7bffccfde"Request Body
application/json
Attributes for card balance operation
TypeScript Definitions
Use the request body type in TypeScript.
amountobject
deposit balance amount
description?string|null
String field
Example
"Topup for suscripcion"entity_id?string
String field
Example
"Entity ID used for idempotency requests"operationstring
there are two operation types:
- topup: Increments the card balance.
- withdrawal: Reduces the card balance.
Value in
"topup" | "withdrawal"Example
"topup"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.sandbox.cuentamono.com/v1/cards/car_5tgliBmzjZ6mpQPRbQjfKj/prepaid/operations" \ -H "Content-Type: application/json" \ -d '{ "amount": { "amount": 100000000, "currency": "COP" }, "operation": "topup" }'Empty
Empty
{
"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": "404 Not Found",
"errors": [
{
"error_code": "item_not_found",
"message": "The item doesn't exist",
"path": null,
"url": null
}
],
"id": "log_7MkWaFqvfosB8fzHhb1Eql",
"message": "Resource not defined"
}{
"code": "422 Unprocessable Content",
"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"
}