Tarjeta Presente
...
Windows, Linux, Mac, Raspberry...
API
22 min
api utilizada por la aplicación de pc para operar con el dispositivo pos a través de sdconn base url http //localhost 8484 todas las respuestas son json con content type application/json operaciones post /api/v1/read operación completa de lectura de tarjeta este es el endpoint principal que la aplicación de pc usa para procesar un pago internamente ejecuta obtiene información del dispositivo (serial number, modelo, etc ) obtiene la ubicación gps del dispositivo crea una operación en la api de mobbex (/p/pos/operation) envía el token de lectura al dispositivo para que lea la tarjeta devuelve los datos de la tarjeta leída cuerpo { "total" 15 00, "otheramount" 0, "intent" "token de intento", "currency" "ars", "hideamount" false } true 165,165,165,166left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type respuesta exitosa { "result" true, "sourcedata" { "pin" " ", "emvdata" " ", "cryptogram" " ", "ksn" " ", "track2" " " } } error { "result" false, "error" "descripción del error" } posibles errores true 330,331left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type delete /api/v1/read cancela una lectura de tarjeta en progreso envía la señal de cancelación al dispositivo para que deje de esperar la tarjeta respuesta { "result" true } pantalla de resultado post /api/v1/display muestra una pantalla de resultado en el dispositivo pos se usa para informar al usuario del dispositivo sobre el resultado de una transacción que fue procesada en la pc cuerpo { "status" "success", "title" "pago aprobado", "total" 15 00, "currency" "ars", "text" "id 123456", "timeout" 10 } true 165,165,165,166left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type valores de status por nombre true 330,331left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type valores de status por código numérico el dispositivo resuelve códigos numéricos a animaciones automáticamente true 330,331left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type respuesta { "result" true } delete /api/v1/display oculta la pantalla de resultado del dispositivo antes de que expire el timeout el dispositivo vuelve a la pantalla de espera de pinpad respuesta { "result" true } reconexión post /api/v1/reconnect intenta reconectarse al último dispositivo guardado usando el token de confianza no requiere pin respuesta exitosa { "result" true, "device" { "ip" "192 168 1 50", "port" 5000, "name" "pos n62" } } error { "result" false, "error" "no saved device or device not reachable" } dispositivo get /api/v1/device/info obtiene información del hardware y software del dispositivo conectado respuesta { "type" "pos", "serialnumber" "sn12345", "deviceextras" { "os" "android", "osversion" "11", "manufacturer" "nexgo", "model" "n62", "serialnumber" "sn12345", "bundleid" "com sugaway pos", "buildnumber" 42, "appversion" "1 2 3", "romversion" "n62 20230101", "kernelversion" "4 14 116" } } la información se cachea en memoria tras la primera consulta y se limpia al cambiar de modo de conexión o dispositivo get /api/v1/device/location obtiene la ubicación gps del dispositivo se consulta en tiempo real (sin caché) respuesta — ubicación disponible { "latitude" 31 4201, "longitude" 64 1888, "accuracy" 12 5, "provider" "gps", "timestamp" 1741564800000 } respuesta — ubicación no disponible { "error" "location not available" } post /api/v1/device/display envía contenido para mostrar en la pantalla del dispositivo proxy directo al endpoint /device/display del dispositivo delete /api/v1/device/display oculta el contenido de la pantalla del dispositivo proxy directo al endpoint /device/display del dispositivo get /api/v1/devices lista los dispositivos conectados actualmente respuesta { "result" true, "devices" \[ { "ip" "192 168 1 50", "port" 5000, "name" "pos n62" } ] } si no hay dispositivo conectado, devices es un array vacío delete /api/v1/devices/\ id elimina un dispositivo de la lista de dispositivos activos respuesta { "result" true } patch /api/v1/devices/\ id/mode cambia el modo de operación del dispositivo cuerpo { "mode" "pinpad" } true 330,331left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type flujo típico de uso app pc sdconn dispositivo pos │ │ │ │ post /api/v1/read │ │ │ { total 15 00 } │ │ │ ─────────────────────────────>│ │ │ │ │ │ │ read card { token } │ │ │ ──────────────────────────────>│ │ │ (usuario pasa tarjeta)│ │ │<────────── { sourcedata } │ │ │ │ │ { result true, │ │ │ sourcedata { } } │ │ │<───────────────────────────── │ │ │ │ │ │ post /api/v1/display │ │ │ { status "success" } │ │ │ ─────────────────────────────>│ display result │ │ │ ──────────────────────────────>│ │ │ (pantalla de resultado)│