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
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.
{
"status": 400,
"message": "Bad Request",
"reason": "Invalid type for currency: expected string, but got undefined"
}{
"status": 403,
"message": "Not authorized"
}In case any header is wrong
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
Content-Type
application/json
Authorization
Bearer <clientSecret>
venue-api-key
The restaurant identifier
Response
{
"status": "completed",
"tip": 0
}status enum:
processingcancelledtimed_outnot_completeddeclinedcompleted
{
"status": 403,
"message": "Not authorized"
}In case any header is wrong
Last updated