Logo PopinaPopina API

Create withdrawal

Create a withdrawal (remove money from customer balance).

POST/v1/customers/{customerId}/withdrawal
authorization<token>

Use device JWT token

In: header

Path Parameters

customerIdstring

Customer UUID

Formatuuid
amountinteger

Amount in cents

Range0 < value
description?string|null
operatorId?string|null
tillId?string|null
paymentIdstring

Payment method UUID

Formatuuid

Response Body

application/json

application/json

application/json

curl -X POST "http://localhost:4012/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/withdrawal" \  -H "Content-Type: application/json" \  -d '{    "amount": 3000,    "description": "Cash withdrawal",    "paymentId": "b8e4d9c3-5f2a-4b1d-9e3c-7a6d5e4c3b2a",    "operatorId": "3e6881da-8591-4865-b5ce-3c5227e0730e",    "tillId": "15100d94-bc66-4e86-8e92-f6ba4924772b"  }'
{
  "id": "e9f8d7c6-4b3a-4c1d-8e9f-8a7b6c5d4e3f",
  "type": "withdrawal",
  "amount": -3000,
  "updatedBalance": 2000,
  "totalOrder": 0,
  "description": "Cash withdrawal",
  "status": "finalized",
  "currencyCode": "EUR",
  "createdAt": "2025-10-28T12:00:00.000Z",
  "updatedAt": "2025-10-28T12:00:00.000Z"
}
{
  "message": "Insufficient balance",
  "code": "INSUFFICIENT_BALANCE"
}
{
  "message": "Insufficient balance",
  "code": "INSUFFICIENT_BALANCE"
}