Skip to main content

CLI Tool

The openpay CLI lets you manage payments, webhooks, and configuration directly from your terminal.

Installation

Verify the installation:

Authentication

Log in with your API credentials. The CLI stores them locally in ~/.openpay/config.yaml.
You will be prompted for your API key and secret:
Alternatively, set credentials via environment variables:

Configuration

Manage CLI settings with openpay config:

Payments

List Payments

Example output:

Create a Payment

Output:

Get Payment Details

Webhooks

Configure a Webhook

List Webhook Deliveries

Test a Webhook

Send a test event to your configured endpoint:

Checkout Sessions

Create a Checkout Session

Output:

Global Flags

These flags work with any command:

Shell Completion

Generate shell completion scripts: