Skip to main content

Overview

Card terminals represent physical or virtual card payment devices. They are used to track card transactions in cash adjustments and expenses, with support for multiple providers like CLIP, MercadoPago, etc.

Create Card Terminal

POST /api/v1/cash-terminals

Request Body

branch_id
integer
required
Branch ID where the terminal is located
name
string
required
Terminal name (max 255 characters)
provider
string
required
Payment provider name (e.g., CLIP, MERCADOPAGO) - max 100 characters
account_ref
string
Provider account reference (max 255 characters)
last_four
string
Last 4 digits of terminal ID (exactly 4 numeric digits)
is_active
boolean
default:"true"
Active status
meta
object
Additional metadata

Response

message
string
Success message
data
object
curl -X POST https://api.sushigo.local/api/v1/cash-terminals \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "branch_id": 1,
    "name": "Terminal CLIP 1",
    "provider": "CLIP",
    "account_ref": "ACC-12345",
    "last_four": "1234",
    "is_active": true,
    "meta": {
      "serial": "SN123456"
    }
  }'
{
  "message": "Cash terminal created successfully",
  "data": {
    "id": 1,
    "branch_id": 1,
    "name": "Terminal CLIP 1",
    "provider": "CLIP",
    "account_ref": "ACC-12345",
    "last_four": "1234",
    "is_active": true,
    "meta": {
      "serial": "SN123456"
    },
    "created_at": "2025-12-13T08:00:00+00:00",
    "updated_at": "2025-12-13T08:00:00+00:00",
    "branch": {
      "id": 1,
      "name": "Sucursal Centro"
    }
  }
}

List Card Terminals

GET /api/v1/cash-terminals

Query Parameters

branch_id
integer
Filter by branch ID
provider
string
Filter by payment provider
is_active
boolean
Filter by active status
sort_by
string
default:"name"
Sort field
sort_order
string
default:"asc"
Sort order: asc or desc
per_page
integer
default:"15"
Items per page

Response

Returns paginated list of card terminals.
curl https://api.sushigo.local/api/v1/cash-terminals?branch_id=1&is_active=true \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "branch_id": 1,
      "name": "Terminal CLIP 1",
      "provider": "CLIP",
      "account_ref": "ACC-12345",
      "last_four": "1234",
      "is_active": true,
      "branch": {
        "id": 1,
        "name": "Sucursal Centro"
      }
    },
    {
      "id": 2,
      "branch_id": 1,
      "name": "Terminal MercadoPago",
      "provider": "MERCADOPAGO",
      "account_ref": null,
      "last_four": "5678",
      "is_active": true,
      "branch": {
        "id": 1,
        "name": "Sucursal Centro"
      }
    }
  ],
  "per_page": 15,
  "total": 2
}

Get Card Terminal

GET /api/v1/cash-terminals/{id}

Path Parameters

id
integer
required
Card terminal ID

Response

data
object
Terminal details with branch information
curl https://api.sushigo.local/api/v1/cash-terminals/1 \
  -H "Authorization: Bearer YOUR_TOKEN"

Update Card Terminal

PUT /api/v1/cash-terminals/{id}

Path Parameters

id
integer
required
Card terminal ID

Request Body

name
string
Terminal name
provider
string
Payment provider
account_ref
string
Provider account reference
last_four
string
Last 4 digits (exactly 4 numeric digits)
is_active
boolean
Active status
meta
object
Additional metadata

Response

message
string
Success message
data
object
Updated terminal object
curl -X PUT https://api.sushigo.local/api/v1/cash-terminals/1 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Terminal CLIP Principal",
    "is_active": true
  }'

Delete Card Terminal

Cannot delete a terminal with existing transactions (adjustment lines or expenses). Set is_active to false instead.
DELETE /api/v1/cash-terminals/{id}

Path Parameters

id
integer
required
Card terminal ID

Response

message
string
Success message
curl -X DELETE https://api.sushigo.local/api/v1/cash-terminals/1 \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "message": "Cash terminal deleted successfully"
}

Common Providers

The system supports any provider name, but these are commonly used:
  • CLIP - Popular Mexican card payment provider
  • MERCADOPAGO - Latin American payment platform
  • SQUARE - International POS and payment provider
  • STP - Sistema de Transferencias y Pagos (Mexico)
  • STRIPE - International payment processing
The last_four field helps identify specific terminals when multiple devices from the same provider are used.

Build docs developers (and LLMs) love