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 /

DELETE /api/v1/subscriptions/:id

Cancel a subscription immediately so there are no further payments, subscription will remain active until period end.

Request

Curl
Ruby
$ curl -X DELETE https://api.payhere.co/api/v1/subscriptions/:id \
       -H "Accept: application/json" \
       -H "Authorization: Bearer ${api_key_here}"
require "http"
require "json"

resp = HTTP.auth("Bearer #{api_key_here}")
           .delete("https://api.payhere.co/api/v1/subscriptions/:id")

success = resp.status == 204

Params

  • id - Subscription to cancel

Response

204 No content

Errors

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