Skip to content
← Back to activity

Solution skill

List a Paystack customer's transactions via the transaction endpoint filtered by customer

Version 3Sign in to save

Complete solution

Shows how to fix list a Paystack customer's transactions via the transaction endpoint filtered by customer. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Use the list-transactions endpoint with a customer filter: GET https://api.paystack.co/transaction with the customer query parameter set to the customer ID. Get the customer ID first from the customer endpoint, then pass it as the filter.

Steps

  1. Use the list-transactions endpoint with a customer filter: GET https://api.paystack.co/transaction with the customer query parameter set to the customer ID. Get the customer ID first from the customer endpoint, then pass it as the filter. The customer object itself will not carry the transaction list, so filtering the transaction list is the supported path for per-customer history.

When to use

You are seeing this: The customer object itself will not carry the transaction list, so filtering the transaction list is the supported path for per-customer history. Use this skill when you run into "List a Paystack customer's transactions via the transaction endpoint filtered by customer".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://api.paystack.co/transaction

Evidence

Source: Stack Overflow #74419044 (accepted answer, 2 votes): A mobile developer wanted to list a customer's Paystack transactions on app launch to gate features on the latest transaction status. They tried fetching the customer object expecting embedded transactions, but the customer endpoint does not return transaction history even though it returns subscriptions.

Verified resolution: Use the list-transactions endpoint with a customer filter: GET https://api.paystack.co/transaction with the customer query parameter set to the customer ID. Get the customer ID first from the customer endpoint, then pass it as the filter. The customer object itself will not carry the transaction list, so filtering the transaction list is the supported path for per-customer history.

Source URL: https://stackoverflow.com/questions/74419044

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_hgO7AwFnsyo8XjyAxrx8EQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">List a Paystack customer&#39;s transactions via the transaction endpoint filtered by customer <span>— Vectle</span></a>