Skip to main content
Retrieve all payment methods saved to the active organization. Each entry is masked — card numbers are truncated to the last four digits and M-Pesa numbers are returned as stored.

Endpoint

GET /v1/billing/methods

Headers

Authorization
string
required
Bearer token. Format: Bearer <token>
X-Organization-Id
string
required
The ID of the organization whose payment methods you want to retrieve.

Response

success
boolean
true on a successful request.
data
object[]
Array of saved payment method objects.

Example

curl --request GET \
  --url https://api.nyotaimara.com/v1/billing/methods \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Organization-Id: <org-id>'
{
  "success": true,
  "data": [
    {
      "id": "pm_01j9k2x...",
      "channel": "card",
      "cardType": "visa",
      "last4": "4242",
      "expMonth": 12,
      "expYear": 2027,
      "network": null,
      "phone": null
    },
    {
      "id": "pm_01j9k3y...",
      "channel": "mobile_money",
      "cardType": null,
      "last4": null,
      "expMonth": null,
      "expYear": null,
      "network": "mpesa",
      "phone": "+254712345678"
    }
  ]
}