Developers

Developers

  • Docs
  • Help
  • Blog

›/api

Overview

  • Getting Started
  • Testing

Integrations

  • Simple link
  • Simple embed
  • React SDK
  • Embed SDK
  • Webhooks
  • REST Hooks
  • Wix Embed SDK

API

  • Authentication

/api

    /v1/current_company

    • GET /
    • PUT /
    • GET /stats

    /v1/customers

    • GET /
    • GET /:id

    /v1/payments

    • GET /
    • GET /:id

    /v1/plans

    • GET /
    • POST /
    • PUT /:id

    /v1/refunds

    • POST /

    /v1/subscriptions

    • GET /
    • GET /:id
    • DELETE /:id

    /v1/user

    • GET /

GET /api/v1/plans

List all of your plans.

Request

Curl
Ruby
$ curl -X GET https://api.payhere.co/api/v1/plans?page=1&per_page=50 \
       -H "Accept: application/json" \
       -H "Authorization: Bearer ${api_key_here}"
require "http"
require "json"

resp = HTTP.auth("Bearer #{api_key_here}")
           .get(
              "https://api.payhere.co/api/v1/plans",
              page: 1,
              per_page: 50
            )

parsed = JSON.parse(resp.body)

Params

  • page - Page number
  • per_page - Records per page, default 20, max 100.

Response

{
  "data": [
    {
      "id": 64,
      "payment_type": "recurring",
      "name": "Help us fight COVID-19",
      "description": "",
      "price": 0,
      "price_in_cents": 0,
      "currency": "eur",
      "slug": "help-us-fight-covid-19",
      "billing_interval": "month",
      "billing_interval_count": 1,
      "hidden": false,
      "min_billing_cycles": null,
      "billing_day": null,
      "limited_qty": false,
      "qty": 0,
      "cancel_after": null,
      "success_url": "",
      "trial_period_days": null,
      "show_qty": false,
      "custom_fields": [],
      "user_selects_amount": true,
      "pay_button_text": "",
      "setup_fee": 0,
      "has_setup_fee": false,
      "created_at": "2020-03-29T09:31:47.428Z",
      "updated_at": "2020-04-01T22:06:04.296Z",
      "type": "plans",
      "receipt_text": "",
      "webhook_url": ""
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": 2,
    "prev_page": null,
    "total_pages": 2,
    "total_count": 2
  }
}

Errors

  • 400 Bad request
  • 401 Unauthorized
← GET /:idPOST / →
  • Request
    • Params
  • Response
  • Errors
Developers
Docs
Getting StartedEmbed SDKAPI Reference
Payhere
HelpSignup freeFeatures
More
Our BlogGitHubTwitter
Copyright © 2025 Payhere Payments Ltd