Wallet Charges
Charge from a wallet account with a certain amount of value in the currency specified.
HTTP Request
POST
/v1/accounts/wallet/charge
Request Headers
{
"Content-Type": "application/json",
"Authorization": "Bearer {{access_token}}",
"x-api-key": "Your assigned api key"
}
Request Body
{
"walletAccountId": "cde5843c-bbd0-46d2-9fbb-27b08f3ad021",
"amountInCents": 100,
"currency": "COP",
"idempotencyKey": "65e85d27-1677-4a98-9f6e-dd03cfa07ea3"
}
Response
Content-Type: application/json
{
"id": "cde5843c-bbd0-46d2-9fbb-27b08f3ad021",
"balanceInCents": 0,
"status":"ACTIVE",
"groupId": "0001",
"country": "CO",
"currency": "COP"
}
Error Response
Content-Type: application/json
{
"errors": [
{
"code": "422",
"errorMessage": "The account has insufficient fund for this charge."
}
]
}
HTTP Headers Details
Key | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer {{access_token}} |
x-api-key | Your assigned api key |
Request Body Parameters
Parameter | Required | Type | Description |
---|---|---|---|
walletAccountId | String | Id (UUID) as in String for the wallet account wish to charge. | |
amountInCents | Int | The amount of value wish to charge from the wallet, in cents. | |
currency | String | Currency code (ISO 4217) used for charge settlement , such as COP for Colombia. | |
idempotencyKey | String | An unique string decided by the merchant to prevent request duplication. |
Response Body Details
Parameter | Type | Description |
---|---|---|
id | String | Wallet account id in UUID represented in String format. |
balanceInCents | Int | Wallet account balance amount as in cents. |
status | String | Wallet account status, Enum: "ACTIVE". |
groupId | String | Group id/name that wallet holder belongs to. |
country | String | Wallet account country in country code. |
currency | String | Wallet account settlement currency in currency code |
Error Response if Failed
Parameter | Type | Description |
---|---|---|
code | String | Error code to indicate specific error types. |
errorMessage | String | Error message to indicate failure details. |