Skip to content
Lars Westermann edited this page Feb 4, 2020 · 3 revisions

Additional routes availible if connected to the authetication-proxy

/request-payment-token

Request a payment token from the current bar-/qr-code or nfc card.

POST

Request body

{
    "amount": 420
}

Response body

/reauthenticate

Reauthenticate the current nfc card. This should be used to trigger a key write for a new registerd nfc card.

GET

Request parameter

Response body

/events

event-stream

Connected

data: connected

Ping

data: ping

Message

data: <<Message>>

An account was registered at the proxy

{
    "type": "account",
    "content": <<Account>>
}

A product was registered at the proxy

{
    "type": "product",
    "content": <<Product>>
}

A new bar-/qr-code was registered at the proxy

{
    "type": "qr-code",
    "content": {
        "code": "0000000"
    }
}

A new nfc card was registered at the proxy

{
    "type": "nfc-card",
    "content": {
        "id": "00-00-00-00:00-00-00-00-00-00",
        "writeable": true
    }
}

A nfc card was removed from the proxy

{
    "type": "remove-nfc-card"
}

A requested payment token was received at the proxy

{
    "type": "payment-token",
    "content": {
        "token": "<<auth token>>"
    }
}

The request has timed out

{
    "type": "timeout"
}