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/payments

List all of your payments, ordered chronologically, most recent first.

Request

Curl
Ruby
$ curl -X GET https://api.payhere.co/api/v1/payments?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/payments",
              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": 845088515,
      "hashid": "VRSgg9kvB",
      "reference": "GW8264",
      "formatted_amount": "£12.99",
      "amount": 12.99,
      "currency": "gbp",
      "refund_amount": 2.99,
      "amount_paid": 10.00,
      "company_id": 636211471,
      "card_brand": "visa",
      "card_last4": null,
      "secure_token": "Vt-ixl7oXL2OgVQagjUkdg",
      "status": "part_refund",
      "success": true,
      "created_at": "2017-06-03T00:00:00.000Z",
      "updated_at": "2017-06-03T00:00:00.000Z",
      "type": "payments"
    }
  ],
  "meta": {
    "current_page": 1,
    "next_page": 2,
    "prev_page": null,
    "total_pages": 2,
    "total_count": 2
  }
}

Errors

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