New payment

The following flow is what will need to be followed to execute a new payment.

Integration flow

Initialize a new payment

POST /terminals/:terminalId/init-payment

This call will invoke the corresponding terminal displaying the view to swipe the card

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <clientSecret>

venue-api-key

The restaurant identifier

Body

{
    "amount": 12.5,
    "currency": "EUR" //ISO 4217 format)
}

Response

{
    "paymentId": "67e565ca4116f4401ccbf789",
    "paymentStatusUrl": "{base}/v1/terminals/{terminalId}/payments/{paymentId}/status"
}

paymentStatusUrl field will always come populated with all its fields.

Check payment status

GET /teminals/:terminalId/payments/:paymentId/status

This call must be made using long polling while the status is still processing. The result will be returned once the payment has been completed at the terminal. In addition, the tip amount will be provided if they have been left.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <clientSecret>

venue-api-key

The restaurant identifier

Response

{
    "status": "completed",
    "tip": 0
}

status enum:

  • processing

  • cancelled

  • timed_out

  • not_completed

  • declined

  • completed

Last updated