data
Paystack CLI for AI Agents
Use the Paystack CLI from KosmoKrator to call Paystack tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Paystack CLI Setup
Paystack can be configured headlessly with `kosmokrator integrations:configure paystack`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure paystack --set secret_key="$PAYSTACK_SECRET_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor paystack --json
kosmokrator integrations:status --json Credentials
Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
secret_key | PAYSTACK_SECRET_KEY | Secret secret | yes | Secret Key |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call paystack.paystack_list_transactions '{"per_page":1,"page":1,"status":"example_status","customer":"example_customer","from":"example_from","to":"example_to"}' --json kosmo integrations:paystack paystack_list_transactions '{"per_page":1,"page":1,"status":"example_status","customer":"example_customer","from":"example_from","to":"example_to"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs paystack --json
kosmo integrations:docs paystack.paystack_list_transactions --json
kosmo integrations:schema paystack.paystack_list_transactions --json
kosmo integrations:search "Paystack" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
paystack.paystack_list_transactions
List transactions on your Paystack integration. Supports filtering by status, customer, and date range with pagination.
read - Parameters
- per_page, page, status, customer, from, to
kosmo integrations:call paystack.paystack_list_transactions '{"per_page":1,"page":1,"status":"example_status","customer":"example_customer","from":"example_from","to":"example_to"}' --json kosmo integrations:paystack paystack_list_transactions '{"per_page":1,"page":1,"status":"example_status","customer":"example_customer","from":"example_from","to":"example_to"}' --json paystack.paystack_get_transaction
Get details of a specific Paystack transaction by its numeric ID. Use paystack_verify_transaction when you have a reference.
read - Parameters
- id
kosmo integrations:call paystack.paystack_get_transaction '{"id":"example_id"}' --json kosmo integrations:paystack paystack_get_transaction '{"id":"example_id"}' --json paystack.paystack_verify_transaction
Verify a Paystack transaction by reference. Use this after checkout redirects or webhook delivery to confirm final payment status.
read - Parameters
- reference
kosmo integrations:call paystack.paystack_verify_transaction '{"reference":"example_reference"}' --json kosmo integrations:paystack paystack_verify_transaction '{"reference":"example_reference"}' --json paystack.paystack_initialize_transaction
Initialize a new payment transaction on Paystack. Returns an authorization URL for the customer to complete payment.
write - Parameters
- amount, email, reference, callback_url
kosmo integrations:call paystack.paystack_initialize_transaction '{"amount":1,"email":"example_email","reference":"example_reference","callback_url":"example_callback_url"}' --json kosmo integrations:paystack paystack_initialize_transaction '{"amount":1,"email":"example_email","reference":"example_reference","callback_url":"example_callback_url"}' --json paystack.paystack_list_customers
List customers on your Paystack integration. Supports pagination.
read - Parameters
- per_page, page
kosmo integrations:call paystack.paystack_list_customers '{"per_page":1,"page":1}' --json kosmo integrations:paystack paystack_list_customers '{"per_page":1,"page":1}' --json paystack.paystack_create_customer
Create a new customer on your Paystack integration.
write - Parameters
- email, first_name, last_name, phone
kosmo integrations:call paystack.paystack_create_customer '{"email":"example_email","first_name":"example_first_name","last_name":"example_last_name","phone":"example_phone"}' --json kosmo integrations:paystack paystack_create_customer '{"email":"example_email","first_name":"example_first_name","last_name":"example_last_name","phone":"example_phone"}' --json paystack.paystack_list_plans
List subscription plans on your Paystack integration. Supports filtering by status and pagination.
read - Parameters
- per_page, page, status
kosmo integrations:call paystack.paystack_list_plans '{"per_page":1,"page":1,"status":"example_status"}' --json kosmo integrations:paystack paystack_list_plans '{"per_page":1,"page":1,"status":"example_status"}' --json paystack.paystack_get_current_user
Verify the Paystack API connection and retrieve integration payment session timeout settings. Use this to check if the API key is valid and the service is reachable.
read - Parameters
- none
kosmo integrations:call paystack.paystack_get_current_user '{}' --json kosmo integrations:paystack paystack_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
paystack.paystack_list_transactions 6 parameters
kosmo integrations:schema paystack.paystack_list_transactions --json | Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | no | Number of transactions per page (default: 50, max: 100). |
page | integer | no | Page number to retrieve. |
status | string | no | Filter by status: "success", "failed", "abandoned", "reversed". |
customer | string | no | Filter by customer ID or email. |
from | string | no | Start date for filtering (ISO 8601, e.g., "2025-01-01T00:00:00"). |
to | string | no | End date for filtering (ISO 8601, e.g., "2025-01-31T23:59:59"). |
paystack.paystack_get_transaction 1 parameters
kosmo integrations:schema paystack.paystack_get_transaction --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Numeric transaction ID. Use paystack_verify_transaction for transaction references. |
paystack.paystack_verify_transaction 1 parameters
kosmo integrations:schema paystack.paystack_verify_transaction --json | Parameter | Type | Required | Description |
|---|---|---|---|
reference | string | yes | The transaction reference returned by Paystack. |
paystack.paystack_initialize_transaction 4 parameters
kosmo integrations:schema paystack.paystack_initialize_transaction --json | Parameter | Type | Required | Description |
|---|---|---|---|
amount | integer | yes | Amount in kobo (e.g., 50000 for ₦500.00). |
email | string | yes | Customer email address. |
reference | string | no | Unique transaction reference. If not provided, Paystack generates one. |
callback_url | string | no | URL to redirect customer to after payment. |
paystack.paystack_list_customers 2 parameters
kosmo integrations:schema paystack.paystack_list_customers --json | Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | no | Number of customers per page (default: 50, max: 100). |
page | integer | no | Page number to retrieve. |
paystack.paystack_create_customer 4 parameters
kosmo integrations:schema paystack.paystack_create_customer --json | Parameter | Type | Required | Description |
|---|---|---|---|
email | string | yes | Customer email address. |
first_name | string | no | Customer first name. |
last_name | string | no | Customer last name. |
phone | string | no | Customer phone number. |
paystack.paystack_list_plans 3 parameters
kosmo integrations:schema paystack.paystack_list_plans --json | Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | no | Number of plans per page (default: 50, max: 100). |
page | integer | no | Page number to retrieve. |
status | string | no | Filter by status: "active" or "inactive". |
paystack.paystack_get_current_user 0 parameters
kosmo integrations:schema paystack.paystack_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.