KosmoKrator

finance

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.

7 functions 5 read 2 write API key auth

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: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
secret_key PAYSTACK_SECRET_KEY Secret secret yes Secret Key

Call Paystack Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

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

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:paystack paystack_list_transactions '{
  "per_page": 1,
  "page": 1,
  "status": "example_status",
  "customer": "example_customer",
  "from": "example_from",
  "to": "example_to"
}' --json

Agent Discovery Commands

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Paystack.

paystack.paystack_list_transactions

Read read

List transactions on your Paystack integration. Supports filtering by status, customer, and date range with pagination.

Parameters
per_page, page, status, customer, from, to

Generic CLI call

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

Provider shortcut

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

Read read

Get details of a specific Paystack transaction by its ID or reference.

Parameters
id

Generic CLI call

kosmo integrations:call paystack.paystack_get_transaction '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:paystack paystack_get_transaction '{"id":"example_id"}' --json

paystack.paystack_initialize_transaction

Write write

Initialize a new payment transaction on Paystack. Returns an authorization URL for the customer to complete payment.

Parameters
amount, email, reference, callback_url

Generic CLI call

kosmo integrations:call paystack.paystack_initialize_transaction '{"amount":1,"email":"example_email","reference":"example_reference","callback_url":"example_callback_url"}' --json

Provider shortcut

kosmo integrations:paystack paystack_initialize_transaction '{"amount":1,"email":"example_email","reference":"example_reference","callback_url":"example_callback_url"}' --json

paystack.paystack_list_customers

Read read

List customers on your Paystack integration. Supports pagination.

Parameters
per_page, page

Generic CLI call

kosmo integrations:call paystack.paystack_list_customers '{"per_page":1,"page":1}' --json

Provider shortcut

kosmo integrations:paystack paystack_list_customers '{"per_page":1,"page":1}' --json

paystack.paystack_create_customer

Write write

Create a new customer on your Paystack integration.

Parameters
email, first_name, last_name, phone

Generic CLI call

kosmo integrations:call paystack.paystack_create_customer '{"email":"example_email","first_name":"example_first_name","last_name":"example_last_name","phone":"example_phone"}' --json

Provider shortcut

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

Read read

List subscription plans on your Paystack integration. Supports filtering by status and pagination.

Parameters
per_page, page, status

Generic CLI call

kosmo integrations:call paystack.paystack_list_plans '{"per_page":1,"page":1,"status":"example_status"}' --json

Provider shortcut

kosmo integrations:paystack paystack_list_plans '{"per_page":1,"page":1,"status":"example_status"}' --json

paystack.paystack_get_current_user

Read read

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.

Parameters
none

Generic CLI call

kosmo integrations:call paystack.paystack_get_current_user '{}' --json

Provider shortcut

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

List transactions on your Paystack integration. Supports filtering by status, customer, and date range with pagination.

Operation
Read read
Schema command
kosmo integrations:schema paystack.paystack_list_transactions --json
ParameterTypeRequiredDescription
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

Get details of a specific Paystack transaction by its ID or reference.

Operation
Read read
Schema command
kosmo integrations:schema paystack.paystack_get_transaction --json
ParameterTypeRequiredDescription
id string yes Transaction ID or reference.

paystack.paystack_initialize_transaction

Initialize a new payment transaction on Paystack. Returns an authorization URL for the customer to complete payment.

Operation
Write write
Schema command
kosmo integrations:schema paystack.paystack_initialize_transaction --json
ParameterTypeRequiredDescription
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

List customers on your Paystack integration. Supports pagination.

Operation
Read read
Schema command
kosmo integrations:schema paystack.paystack_list_customers --json
ParameterTypeRequiredDescription
per_page integer no Number of customers per page (default: 50, max: 100).
page integer no Page number to retrieve.

paystack.paystack_create_customer

Create a new customer on your Paystack integration.

Operation
Write write
Schema command
kosmo integrations:schema paystack.paystack_create_customer --json
ParameterTypeRequiredDescription
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

List subscription plans on your Paystack integration. Supports filtering by status and pagination.

Operation
Read read
Schema command
kosmo integrations:schema paystack.paystack_list_plans --json
ParameterTypeRequiredDescription
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

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.

Operation
Read read
Schema command
kosmo integrations:schema paystack.paystack_get_current_user --json
ParameterTypeRequiredDescription
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.