Add a pin terminal
In this tutorial we describe how to add a pin terminal to our point of sale (POS).
Prerequisites
Section titled “Prerequisites”It helps to understand how our App Store works. If you’re new to it, read the App Store documentation or follow our tutorial for Laravel or Vue.js.
Create an app
Section titled “Create an app”Go to the App Store and create an app. It needs to meet these requirements:
- The app has a webhook with the
payment.requestevent. - The app category is
payment_provider. - The app has a logo and a description.
- The app has all the scopes for the devices API.
Set up a device
Section titled “Set up a device”Use the devices API to set up a new pin terminal device. You’ll find it here: devices API
Add a new device with the following required parameters:
{ name: 'Terminal Reception', type: 'pin_terminal'}Once you’ve added a device with the type pin_terminal, it also appears in the terminal list in the POS application.

Next, add some meta keys, such as payment_endpoint or cancellation_request. You do this with device meta.
{ key: "payment_endpoint", value: "https://your-app-url.com/payment-request"}{ key: "payment_timeout", // (Optional) value: 120}{ key: "cancellation_request", // (Optional) value: "https://your-app-url.com/cancellation-request"}Payment flow
Section titled “Payment flow”We use a standard payment flow. When a payment is started from our software, we create a new payment with the status pending.
1. Payment request (POST)
Section titled “1. Payment request (POST)”When the user starts the payment, we send the following request to the payment_endpoint you defined for your device:
{ id: 123456, payment_uid: "pay_dfngjdnfg........."}Retrieve data
Section titled “Retrieve data”Use the get payment endpoint to retrieve all the payment data, such as the currency and amount.
Success
Section titled “Success”1. Update the payment status
Update the payment status to locked or open. When a payment is open, the user can delete it manually. When it’s locked, the user can’t delete it.
2. Return success
When the payment succeeds, return the following JSON message:
{ result: "success"}When something goes wrong, return the following JSON message and describe the error:
{ error: { message: "Clarify what is going wrong in an error message.", code: 123 // (Optional) status code }}Timeout
Section titled “Timeout”The default timeout is 120 seconds. You can change it with the payment_timeout meta key on your device. The maximum timeout is 300 seconds.
Automatic cancellation
Section titled “Automatic cancellation”If, for whatever reason, the payment is still pending after 300 seconds, we delete it automatically. The pending status changes to deleted.
2. Cancellation request (POST)
Section titled “2. Cancellation request (POST)”This request is optional. If you don’t support cancellation, leave the cancellation_request endpoint in the device meta empty.
{ id: 123456, payment_uid: "pay_dfngjdnfg........."}Success
Section titled “Success”When the cancellation succeeds, return the following JSON message:
{ result: "success"}When something goes wrong, return the following JSON message and describe the error:
{ error: { message: "Clarify what is going wrong in an error message.", code: 123 // (Optional) status code }}