Copy link Send Event

Send an event from your application to the Paystack Terminal

Path Parameters

idrequiredstring
The ID of the Terminal the event should be sent to.

Request Body

typestring
The type of event to push
Enuminvoicetransaction
actionstring
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
dataobject
The parameters needed to perform the specified action
2 object properties
idintegerint64
The invoice or transaction ID you want to push to the Terminal
referencestring
The offline_reference from the Payment Request response

Response

200Request successful
statusboolean
messagestring
dataobject
POST/terminal/{id}/event
curl https://api.paystack.co/terminal/Z0R4orOU/event \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "invoice",
    "action": "process"
  }' \
  -X POST
import { 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.data
Response
{
  "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

terminal_idrequiredstring
The ID of the Terminal the event should be sent to.
event_idrequiredstring
The ID of the event that was sent to the Terminal

Response

200Request successful
statusboolean
messagestring
dataobject
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.data
Response
{
  "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

terminal_idrequiredstring
The ID of the Terminal the event should be sent to.

Response

200Terminal Get Status response
statusrequiredboolean
messagerequiredstring
datarequiredobject
2 object properties
onlinerequiredboolean
availablerequiredboolean
GET/terminal/{terminal_id}/presence
curl 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.data
Response
{
  "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

nextstring
A cursor that indicates your place in the list. It can be used to fetch the next page of the list
previousstring
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
per_pageinteger
Specify how many records you want to retrieve per page

Response

200Terminal Lists response
statusrequiredboolean
messagerequiredstring
datarequiredarray[object]
metarequiredobject
3 object properties
nextrequiredstring
previousrequiredstring
perPagerequiredinteger
GET/terminal
curl 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.data
Response
{
  "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

terminal_idrequiredstring
The ID of the Terminal the event should be sent to.

Response

200Terminal Get response
statusrequiredboolean
messagerequiredstring
datarequiredobject
10 object properties
idrequiredinteger
serial_numberrequiredstring
device_makerequiredstring
terminal_idrequiredstring
integrationrequiredinteger
domainrequiredstring
namerequiredstring
addressrequiredstring
statusrequiredstring
split_coderequiredstring
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.data
Response
{
  "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

terminal_idrequiredstring
The ID of the Terminal the event should be sent to.

Request Body

namestring
The new name for the Terminal
addressstring
The new address for the Terminal

Response

200Terminal Update response
statusrequiredboolean
messagerequiredstring
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 PUT
import { 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.data
Response
{
  "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

serial_numberrequiredstring
Device Serial Number

Response

200Terminal Commission Device response
statusrequiredboolean
messagerequiredstring
POST/terminal/commission_device
curl https://api.paystack.co/terminal/commission_device \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "serial_number": "1111150412230003899"
  }' \
  -X POST
import { 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.data
Response
{
  "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

serial_numberrequiredstring
Device Serial Number

Response

200Terminal Decommission Device response
statusrequiredboolean
messagerequiredstring
POST/terminal/decommission_device
curl https://api.paystack.co/terminal/decommission_device \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "serial_number": "1111150412230003899"
  }' \
  -X POST
import { 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.data
Response
{
  "status": true,
  "message": "Device decommissioned successfully"
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}