# Paystack

> Get paid with Paystack: send checkout links and invoices, make payment pages, check whether a payment went through, and look up payments, customers, totals and your balance.

App · Payments & Billing · 15 actions. Web page: https://docs.lodol.com/docs/integrations/paystack

## Actions

### Archive an invoice

Archive an invoice that is no longer needed, such as one sent by mistake. It no longer shows in lists and can no longer be checked.

**Inputs**

- Invoice (`invoice`, text, required): Pick an invoice, or use the request_code an earlier Paystack step returned.

**Outputs**

- `archived` (true/false): True when it was archived
- `request_code` (text): The invoice's code

**Example output**

```json
{
  "archived": true,
  "request_code": "PRQ_1weqqsn2wwzgft8"
}
```

### Create a checkout link

Get a link to Paystack's checkout page where one customer pays a set amount, by card, bank transfer, USSD or mobile money. Send it to them by email or message, then use 'Verify a payment' with the reference to see whether they paid.

**Inputs**

- Customer email (`email`, text, required): Who is paying. Paystack emails them a receipt.
- Amount (`amount`, number, required): How much, written as you would, e.g. 5000.50. Not in kobo or cents.
- Currency (`currency`, text): Leave empty for your Paystack account's main currency.
- Reference (`reference`, text): Your own unique reference, such as an order number. Leave empty and Paystack makes one.
- Payment methods (`channels`, list): Only offer these. Leave empty to offer every method your account accepts. One or more of: `card`, `bank` (Bank account), `bank_transfer` (Bank transfer), `ussd`, `mobile_money` (Mobile money), `qr` (QR code), `apple_pay` (Apple Pay), `eft`, `capitec_pay` (Capitec Pay), `payattitude`.
- Return to (`callback_url`, text): Where to send the customer after they pay. Leave empty for the callback URL in your Paystack settings.

**Outputs**

- `access_code` (text): Paystack's code for this checkout
- `amount` (number): In the currency's main unit, e.g. 5000.50 naira, not kobo
- `checkout_url` (text): The link to send the customer
- `currency` (text): The currency, when one was chosen
- `email` (text): Who is paying
- `reference` (text): The payment's reference, for 'Verify a payment'

**Example output**

```json
{
  "access_code": "3ni8kdavz62431k",
  "amount": 25000.0,
  "checkout_url": "https://checkout.paystack.com/3ni8kdavz62431k",
  "currency": "NGN",
  "email": "ada@example.com",
  "reference": "order-1042"
}
```

### Create a customer

Add a customer to Paystack, to send them invoices or find their payments later.

**Inputs**

- Email (`email`, text, required): The customer's email address.
- First name (`first_name`, text): The customer's first name.
- Last name (`last_name`, text): The customer's last name.
- Phone number (`phone`, text): The customer's phone number, ideally with its country code.

**Outputs**

- `created_at` (text): When they were added (ISO 8601)
- `customer_code` (text): The customer's code, CUS_...
- `customer_id` (number): Paystack's numeric id for the customer
- `email` (text): Their email address
- `first_name` (text): Their first name
- `last_name` (text): Their last name
- `name` (text): First and last name together
- `phone` (text): Their phone number
- `updated_at` (text): When they were last changed (ISO 8601)

**Example output**

```json
{
  "created_at": "2026-09-20T10:01:12.000Z",
  "customer_code": "CUS_xnxdt6s1zg1f4nx",
  "customer_id": 1173,
  "email": "ada@example.com",
  "first_name": "Ada",
  "last_name": "Obi",
  "name": "Ada Obi",
  "phone": "+2348012345678",
  "updated_at": "2026-09-20T10:01:12.000Z"
}
```

### Create a payment page

Make a page anyone can pay on, at paystack.com/pay/..., to share on social media, a website or a flyer. Unlike a checkout link, it is not tied to one customer and can be paid many times.

**Inputs**

- Page name (`name`, text, required): The page's title, shown to people paying.
- Amount (`amount`, number): A fixed price, e.g. 5000.50, not in kobo or cents. Leave empty to let people choose how much to pay.
- Currency (`currency`, text): Leave empty for your Paystack account's main currency.
- Description (`description`, text): What people are paying for.
- Web address (`slug`, text): The end of the page's address, paystack.com/pay/<this>. Leave empty and Paystack makes one.
- Redirect to (`redirect_url`, text): A page on your website to send people to after they pay.
- Ask for a phone number (`collect_phone`, true/false): Ask people for their phone number when they pay. Default: `false`.

**Outputs**

- `active` (true/false): True while it takes payments
- `amount` (number): Its fixed price, if it has one
- `created_at` (text): When it was made (ISO 8601)
- `currency` (text): Its currency
- `description` (text): Its description
- `name` (text): The page's name
- `page_id` (number): Paystack's id for the page
- `slug` (text): The end of its address
- `url` (text): The page's address, to share

**Example output**

```json
{
  "active": true,
  "amount": 15000.0,
  "created_at": "2026-09-24T11:44:16.412Z",
  "currency": "NGN",
  "description": "One seat at the spring workshop",
  "name": "Spring workshop",
  "page_id": 1308510,
  "slug": "spring-workshop",
  "url": "https://paystack.com/pay/spring-workshop"
}
```

### Create an invoice

Bill a customer for items or an amount. Paystack emails them the invoice with a link to pay it. An email address that is not a customer yet is added as one.

**Inputs**

- Customer (`customer`, text, required): Pick a customer, or use their email address or customer code.
- Items (`line_items`, list): What you are billing for. Paystack adds up the total. Or leave empty and fill in Amount.
- Amount (`amount`, number): The total, when not billing for items, e.g. 5000.50. Not in kobo or cents.
- Description (`description`, text): What the invoice is for, shown to the customer.
- Due date (`due_date`, date): When it should be paid by.
- Currency (`currency`, text): Leave empty for your Paystack account's main currency.
- Email it to the customer (`send_email`, true/false): Paystack emails the invoice with a link to pay. Turn off to send it later with 'Send an invoice reminder'. Default: `true`.

**Outputs**

- `amount` (number): The total. In the currency's main unit, e.g. 5000.50 naira, not kobo
- `created_at` (text): When it was created (ISO 8601)
- `currency` (text): Three-letter currency code
- `customer_code` (text): The customer's code
- `customer_email` (text): The customer's email address
- `customer_name` (text): The customer's name, where known
- `description` (text): The invoice's description
- `due_date` (text): When it is due (YYYY-MM-DD)
- `invoice_id` (number): Paystack's numeric id for the invoice
- `invoice_number` (number): The invoice number
- `line_items` (list): What is being billed for
- `paid` (true/false): True once it has been paid
- `paid_at` (text): When it was paid (ISO 8601)
- `pdf_url` (text): A link to the invoice as a PDF, once Paystack makes one
- `request_code` (text): The invoice's code, PRQ_...
- `status` (text): pending (unpaid), success (paid), failed or draft

**Example output**

```json
{
  "amount": 42000.0,
  "created_at": "2026-09-24T16:07:33.000Z",
  "currency": "NGN",
  "customer_code": "CUS_xnxdt6s1zg1f4nx",
  "customer_email": "ada@example.com",
  "customer_name": "Ada Obi",
  "description": "September design work",
  "due_date": "2026-10-15",
  "invoice_id": 3136406,
  "invoice_number": 12,
  "line_items": [
    {
      "amount": 20000.0,
      "name": "Logo design",
      "quantity": 1
    },
    {
      "amount": 11000.0,
      "name": "Business cards",
      "quantity": 2
    }
  ],
  "paid": false,
  "paid_at": null,
  "pdf_url": null,
  "request_code": "PRQ_1weqqsn2wwzgft8",
  "status": "pending"
}
```

### Get a customer

Look up a customer by email address or customer code.

**Inputs**

- Customer (`customer`, text, required): Pick a customer, or use their email address or customer code.

**Outputs**

- `created_at` (text): When they were added (ISO 8601)
- `customer_code` (text): The customer's code, CUS_...
- `customer_id` (number): Paystack's numeric id for the customer
- `email` (text): Their email address
- `first_name` (text): Their first name
- `last_name` (text): Their last name
- `name` (text): First and last name together
- `phone` (text): Their phone number
- `updated_at` (text): When they were last changed (ISO 8601)

**Example output**

```json
{
  "created_at": "2026-09-20T10:01:12.000Z",
  "customer_code": "CUS_xnxdt6s1zg1f4nx",
  "customer_id": 1173,
  "email": "ada@example.com",
  "first_name": "Ada",
  "last_name": "Obi",
  "name": "Ada Obi",
  "phone": "+2348012345678",
  "updated_at": "2026-09-20T10:01:12.000Z"
}
```

### Get an invoice

Get an invoice's details, including whether it has been paid.

**Inputs**

- Invoice (`invoice`, text, required): Pick an invoice, or use the request_code an earlier Paystack step returned.

**Outputs**

- `amount` (number): The total. In the currency's main unit, e.g. 5000.50 naira, not kobo
- `created_at` (text): When it was created (ISO 8601)
- `currency` (text): Three-letter currency code
- `customer_code` (text): The customer's code
- `customer_email` (text): The customer's email address
- `customer_name` (text): The customer's name, where known
- `description` (text): The invoice's description
- `due_date` (text): When it is due (YYYY-MM-DD)
- `invoice_id` (number): Paystack's numeric id for the invoice
- `invoice_number` (number): The invoice number
- `line_items` (list): What is being billed for
- `paid` (true/false): True once it has been paid
- `paid_at` (text): When it was paid (ISO 8601)
- `pdf_url` (text): A link to the invoice as a PDF, once Paystack makes one
- `request_code` (text): The invoice's code, PRQ_...
- `status` (text): pending (unpaid), success (paid), failed or draft

**Example output**

```json
{
  "amount": 42000.0,
  "created_at": "2026-09-24T16:07:33.000Z",
  "currency": "NGN",
  "customer_code": "CUS_xnxdt6s1zg1f4nx",
  "customer_email": "ada@example.com",
  "customer_name": "Ada Obi",
  "description": "September design work",
  "due_date": "2026-10-15",
  "invoice_id": 3136406,
  "invoice_number": 12,
  "line_items": [
    {
      "amount": 20000.0,
      "name": "Logo design",
      "quantity": 1
    },
    {
      "amount": 11000.0,
      "name": "Business cards",
      "quantity": 2
    }
  ],
  "paid": false,
  "paid_at": null,
  "pdf_url": null,
  "request_code": "PRQ_1weqqsn2wwzgft8",
  "status": "pending"
}
```

### Get balance

Get how much money is in your Paystack balance, in each currency your account takes.

**Inputs**: None.

**Outputs**

- `amount_by_currency` (object): The balance per currency, e.g. {"NGN": 17000}
- `balances` (list): One entry per currency

**Example output**

```json
{
  "amount_by_currency": {
    "NGN": 17000.0
  },
  "balances": [
    {
      "amount": 17000.0,
      "currency": "NGN"
    }
  ]
}
```

### Get payment totals

Get how many payments were received and how much they came to in each currency, for all time or between two dates, plus money on its way to your bank.

**Inputs**

- From (`from_date`, date): Only from this day on.
- To (`to_date`, date): Only up to and including this day.

**Outputs**

- `amount_by_currency` (object): The total per currency, e.g. {"NGN": 125000.5}
- `payment_count` (number): How many payments were received
- `pending_transfers` (list): One entry per currency
- `pending_transfers_by_currency` (object): Money not yet paid out to your bank, per currency
- `totals` (list): One entry per currency

**Example output**

```json
{
  "amount_by_currency": {
    "NGN": 1250000.5
  },
  "payment_count": 42,
  "pending_transfers": [
    {
      "amount": 24000.0,
      "currency": "NGN"
    }
  ],
  "pending_transfers_by_currency": {
    "NGN": 24000.0
  },
  "totals": [
    {
      "amount": 1250000.5,
      "currency": "NGN"
    }
  ]
}
```

### List customers

List your Paystack customers, newest first.

**Inputs**

- Maximum results (`limit`, number): The most to return, newest first. From 1 to 1000. Default: `50`.

**Outputs**

- `count` (number): How many came back
- `customers` (list): The customers

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "created_at": "2026-09-20T10:01:12.000Z",
      "customer_code": "CUS_xnxdt6s1zg1f4nx",
      "customer_id": 1173,
      "email": "ada@example.com",
      "first_name": "Ada",
      "last_name": "Obi",
      "name": "Ada Obi",
      "phone": "+2348012345678",
      "updated_at": "2026-09-20T10:01:12.000Z"
    }
  ]
}
```

### List invoices

List invoices, newest first, optionally only unpaid or paid ones, one customer's, one currency's or those created within dates.

**Inputs**

- Status (`status`, text): Only invoices in this state. Leave empty for all. One of: `pending` (Unpaid), `success` (Paid), `failed`, `draft`.
- Customer (`customer`, text): Only this customer's. Pick one, or use their email address.
- Currency (`currency`, text): Only invoices in this currency.
- From (`from_date`, date): Only from this day on.
- To (`to_date`, date): Only up to and including this day.
- Maximum results (`limit`, number): The most to return, newest first. From 1 to 1000. Default: `50`.

**Outputs**

- `count` (number): How many came back
- `invoices` (list): The invoices, newest first

**Example output**

```json
{
  "count": 1,
  "invoices": [
    {
      "amount": 42000.0,
      "created_at": "2026-09-24T16:07:33.000Z",
      "currency": "NGN",
      "customer_code": "CUS_xnxdt6s1zg1f4nx",
      "customer_email": "ada@example.com",
      "customer_name": "Ada Obi",
      "description": "September design work",
      "due_date": "2026-10-15",
      "invoice_id": 3136406,
      "invoice_number": 12,
      "line_items": [
        {
          "amount": 20000.0,
          "name": "Logo design",
          "quantity": 1
        },
        {
          "amount": 11000.0,
          "name": "Business cards",
          "quantity": 2
        }
      ],
      "paid": false,
      "paid_at": null,
      "pdf_url": null,
      "request_code": "PRQ_1weqqsn2wwzgft8",
      "status": "pending"
    }
  ]
}
```

### List payments

List payments, newest first, optionally only paid or failed ones, one customer's, or those within dates.

**Inputs**

- Status (`status`, text): Only payments in this state. Leave empty for all. One of: `success` (Paid), `failed`, `abandoned` (Not paid yet), `reversed`.
- Customer (`customer`, text): Only this customer's. Pick one, or use their email address.
- From (`from_date`, date): Only from this day on.
- To (`to_date`, date): Only up to and including this day.
- Maximum results (`limit`, number): The most to return, newest first. From 1 to 1000. Default: `50`.

**Outputs**

- `count` (number): How many came back
- `payments` (list): The payments, newest first

**Example output**

```json
{
  "count": 1,
  "payments": [
    {
      "amount": 25000.0,
      "bank": "TEST BANK",
      "card_brand": "visa",
      "card_last4": "4081",
      "channel": "card",
      "created_at": "2026-09-24T09:14:24.000Z",
      "currency": "NGN",
      "customer_code": "CUS_xnxdt6s1zg1f4nx",
      "customer_email": "ada@example.com",
      "customer_name": "Ada Obi",
      "fees": 475.0,
      "gateway_response": "Successful",
      "metadata": null,
      "paid": true,
      "paid_at": "2026-09-24T09:15:02.000Z",
      "payment_id": 4099260516,
      "reference": "order-1042",
      "status": "success"
    }
  ]
}
```

### Send an invoice reminder

Email the customer their invoice again, with the link to pay it.

**Inputs**

- Invoice (`invoice`, text, required): Pick an invoice, or use the request_code an earlier Paystack step returned.

**Outputs**

- `request_code` (text): The invoice's code
- `sent` (true/false): True when the reminder was sent

**Example output**

```json
{
  "request_code": "PRQ_1weqqsn2wwzgft8",
  "sent": true
}
```

### Update a customer

Change a customer's name or phone number. Anything left empty stays as it is.

**Inputs**

- Customer (`customer`, text, required): Pick a customer, or use their email address or customer code.
- First name (`first_name`, text): The customer's first name.
- Last name (`last_name`, text): The customer's last name.
- Phone number (`phone`, text): The customer's phone number, ideally with its country code.

**Outputs**

- `changed` (list): Which details were changed
- `created_at` (text): When they were added (ISO 8601)
- `customer_code` (text): The customer's code, CUS_...
- `customer_id` (number): Paystack's numeric id for the customer
- `email` (text): Their email address
- `first_name` (text): Their first name
- `last_name` (text): Their last name
- `name` (text): First and last name together
- `phone` (text): Their phone number
- `updated_at` (text): When they were last changed (ISO 8601)

**Example output**

```json
{
  "changed": [
    "phone"
  ],
  "created_at": "2026-09-20T10:01:12.000Z",
  "customer_code": "CUS_xnxdt6s1zg1f4nx",
  "customer_id": 1173,
  "email": "ada@example.com",
  "first_name": "Ada",
  "last_name": "Obi",
  "name": "Ada Obi",
  "phone": "+2348012345678",
  "updated_at": "2026-09-20T10:01:12.000Z"
}
```

### Verify a payment

Check whether a payment went through, by its reference: 'paid' is true once the customer has paid. A checkout link nobody has paid yet comes back with 'paid' false rather than an error, so a workflow can branch on it.

**Inputs**

- Reference (`reference`, text, required): The payment's reference, such as the one 'Create a checkout link' returned.

**Outputs**

- `amount` (number): In the currency's main unit, e.g. 5000.50 naira, not kobo
- `bank` (text): The card's or account's bank
- `card_brand` (text): visa, mastercard, verve, ... for a card payment
- `card_last4` (text): The card's last four digits
- `channel` (text): How it was paid: card, bank, bank_transfer, ussd, ...
- `created_at` (text): When it was started (ISO 8601)
- `currency` (text): Three-letter currency code, e.g. NGN
- `customer_code` (text): The customer's code, CUS_...
- `customer_email` (text): The customer's email address
- `customer_name` (text): The customer's name, where known
- `fees` (number): Paystack's fee, in the same currency
- `gateway_response` (text): What the bank or card network said
- `metadata` (object): Custom data stored with the payment
- `paid` (true/false): True once the customer has paid
- `paid_at` (text): When it was paid (ISO 8601)
- `payment_id` (number): Paystack's id for the payment
- `reference` (text): The payment's reference
- `status` (text): success (paid), failed, abandoned (started but not paid yet), ongoing, pending, processing, queued or reversed

**Example output**

```json
{
  "amount": 25000.0,
  "bank": "TEST BANK",
  "card_brand": "visa",
  "card_last4": "4081",
  "channel": "card",
  "created_at": "2026-09-24T09:14:24.000Z",
  "currency": "NGN",
  "customer_code": "CUS_xnxdt6s1zg1f4nx",
  "customer_email": "ada@example.com",
  "customer_name": "Ada Obi",
  "fees": 475.0,
  "gateway_response": "Successful",
  "metadata": null,
  "paid": true,
  "paid_at": "2026-09-24T09:15:02.000Z",
  "payment_id": 4099260516,
  "reference": "order-1042",
  "status": "success"
}
```
