Terminal
A collection of endpoints for building delightful in-person payment experiences
Copy link Send Event
Send an event from your application to the Paystack Terminal
Path Parameters
The ID of the Terminal the event should be sent to.
Request Body
The type of event to push
Enuminvoicetransaction
The action the Terminal needs to perform. For the invoice type, the action can either be process or view.
For the transaction type, the action can either be process or print.
Enumprocessviewprint
The parameters needed to perform the specified action
2 object properties
The invoice or transaction ID you want to push to the Terminal
The offline_reference from the Payment Request response
Response
200Request successful
POST
/terminal/{id}/eventcurl https://api.paystack.co/terminal/Z0R4orOU/event \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "invoice",
"action": "process"
}' \
-X POSTimport { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.terminal.sendEvent("Z0R4orOU", {
type: "invoice",
action: "process"
});
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.terminal.send_event("Z0R4orOU", {
type: "invoice",
action: "process"
})
puts response.dataResponse
{
"status": true,
"message": "Event sent to Terminal",
"data": {
"id": "616d721e8c5cd40a0cdd54a6"
}
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}Copy link Fetch Event Status
Check the status of an event sent to the Terminal
Path Parameters
The ID of the Terminal the event should be sent to.
The ID of the event that was sent to the Terminal
Response
200Request successful
GET
/terminal/{terminal_id}/event/{event_id}curl https://api.paystack.co/terminal/Z0R4orOU/event/616d721e8c5cd40a0cdd54a6 \
-H "Authorization: Bearer YOUR_SECRET_KEY"import { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.terminal.fetchEventStatus("Z0R4orOU", "616d721e8c5cd40a0cdd54a6");
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.terminal.fetch_event_status("Z0R4orOU", "616d721e8c5cd40a0cdd54a6")
puts response.dataResponse
{
"status": true,
"message": "Message Status Retrieved",
"data": {
"delivered": true
}
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}Copy link Fetch Terminal Status
Check the availiability of a Terminal before sending an event to it
Path Parameters
The ID of the Terminal the event should be sent to.
Response
200Terminal Get Status response
2 object properties
GET
/terminal/{terminal_id}/presencecurl https://api.paystack.co/terminal/Z0R4orOU/presence \
-H "Authorization: Bearer YOUR_SECRET_KEY"import { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.terminal.fetchTerminalStatus("Z0R4orOU");
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.terminal.fetch_terminal_status("Z0R4orOU")
puts response.dataResponse
{
"status": true,
"message": "Terminal status retrieved",
"data": {
"online": true,
"available": false
}
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}Copy link List Terminals
List the Terminals available on your integration
Query Parameters
A cursor that indicates your place in the list. It can be used to fetch the next page of the list
A cursor that indicates your place in the list. It should be used to fetch the previous page of the list after an intial next request
Specify how many records you want to retrieve per page
Response
200Terminal Lists response
3 object properties
GET
/terminalcurl https://api.paystack.co/terminal \
-H "Authorization: Bearer YOUR_SECRET_KEY"import { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.terminal.list({
next: "NEXT",
previous: "PREVIOUS"
});
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.terminal.list({
next: "NEXT",
previous: "PREVIOUS"
})
puts response.dataResponse
{
"status": true,
"message": "Terminals retrieved successfully",
"data": [
{
"id": 30,
"serial_number": "033301504100A563877",
"device_make": null,
"terminal_id": "2872S934",
"integration": 463433,
"domain": "live",
"name": "Damilola's Terminal",
"address": null,
"status": "active"
}
],
"meta": {
"next": null,
"previous": null,
"perPage": 1
}
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}Copy link Fetch Terminal
Get the details of a Terminal
Path Parameters
The ID of the Terminal the event should be sent to.
Response
200Terminal Get response
10 object properties
GET
/terminal/{terminal_id}curl https://api.paystack.co/terminal/Z0R4orOU \
-H "Authorization: Bearer YOUR_SECRET_KEY"import { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.terminal.fetch("Z0R4orOU");
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.terminal.fetch("Z0R4orOU")
puts response.dataResponse
{
"status": true,
"message": "Terminal retrieved successfully",
"data": {
"id": 30,
"serial_number": "033301504100A563877",
"device_make": null,
"terminal_id": "2872S934",
"integration": 463433,
"domain": "live",
"name": "Damilola's Terminal",
"address": null,
"status": "active"
}
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}Copy link Update Terminal
Update the details of a Terminal
Path Parameters
The ID of the Terminal the event should be sent to.
Request Body
The new name for the Terminal
The new address for the Terminal
Response
200Terminal Update response
PUT
/terminal/{terminal_id}curl https://api.paystack.co/terminal/Z0R4orOU \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Oreos",
"address": "Somewhere on earth"
}' \
-X PUTimport { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.terminal.update("Z0R4orOU", {
name: "Oreos",
address: "Somewhere on earth"
});
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.terminal.update("Z0R4orOU", {
name: "Oreos",
address: "Somewhere on earth"
})
puts response.dataResponse
{
"status": true,
"message": "Terminal Details updated"
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}Copy link Commission Terminal
Activate your debug device by linking it to your integration
Request Body
Device Serial Number
Response
200Terminal Commission Device response
POST
/terminal/commission_devicecurl https://api.paystack.co/terminal/commission_device \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"serial_number": "1111150412230003899"
}' \
-X POSTimport { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.terminal.commission({
serial_number: "1111150412230003899"
});
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.terminal.commission({
serial_number: "1111150412230003899"
})
puts response.dataResponse
{
"status": false,
"message": "Device has been commissioned already"
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}Copy link Decommission Terminal
Unlink your debug device from your integration
Request Body
Device Serial Number
Response
200Terminal Decommission Device response
POST
/terminal/decommission_devicecurl https://api.paystack.co/terminal/decommission_device \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"serial_number": "1111150412230003899"
}' \
-X POSTimport { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.terminal.decommission({
serial_number: "1111150412230003899"
});
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.terminal.decommission({
serial_number: "1111150412230003899"
})
puts response.dataResponse
{
"status": true,
"message": "Device decommissioned successfully"
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}