PayOrc
Subscription Plan

List Contracts

Retrieve a paginated list of subscription contracts with filtering by status, date, subscriber, and payment details.

List Contracts

Version: 3.0.0

Generate an API Key for the Subscription channel before making requests.

Use this endpoint to retrieve a paginated list of all subscription contracts associated with your merchant account. You can filter by subscription status, date ranges, subscriber information, payment status, and billing details.

Endpoint

MethodURL
GEThttps://api.payorc.com/subscriptions/v1/contract/list

Please use the test credentials for sandbox testing.

Authentication

Include the following headers in every request:

HeaderTypeDescription
merchant-keyStringYour merchant key
merchant-secretStringYour merchant secret

All API requests must be made over HTTPS. Requests made over plain HTTP will be rejected.

Query Parameters

ParameterTypeRequiredDescription
perpageIntegerYesNumber of records per page
pageIntegerYesPage number (starting from 1)
contract_idIntegerNoFilter by plain display contract ID
subscriber_idIntegerNoFilter by plain display subscriber ID
subscriber_email_or_mobileStringNoFilter by subscriber email or mobile number
subscription_from_dateStringNoFilter subscriptions from this date (YYYY-MM-DD)
subscription_to_dateStringNoFilter subscriptions up to this date (YYYY-MM-DD)
payment_from_dateStringNoFilter payments from this date (YYYY-MM-DD)
payment_to_dateStringNoFilter payments up to this date (YYYY-MM-DD)
last_payment_statusStringNoFilter by last payment status (PAID, FAILED)
currencyStringNoFilter by currency code (3-letter)
statusStringNoFilter by subscription status (Active, Deactivated)
billing_intervalIntegerNoFilter by billing interval
billing_frequencyStringNoFilter by billing frequency (yearly, monthly, weekly, daily)
installment_amountNumberNoFilter by installment amount
total_termsIntegerNoFilter by total terms

Pagination is required for accounts with many contracts. Use perpage and page to navigate through results.

Response (200 OK)

FieldTypeDescription
dataArrayList of contract objects
data[].contract_detailsObjectContract details
data[].contract_details.subscription_idStringEncrypted subscription ID — use this for Contract Details and Cancel Subscription
data[].contract_details.contract_idStringPlain display contract ID
data[].contract_details.de_submerchant_idStringSub-merchant ID
data[].contract_details.submerchant_nameStringSub-merchant name
data[].contract_details.statusStringStatus (Active, Deactivated)
data[].contract_details.subscription_dateStringSubscription date (DD-MM-YYYY HH:mm:ss)
data[].contract_details.order_noStringOrder number
data[].contract_details.last_payment_statusStringLast payment status
data[].contract_details.terms_collectedIntegerTerms collected so far
data[].contract_details.subscription_start_dateStringSubscription start date
data[].contract_details.next_payment_dateStringNext payment date
data[].contract_details.last_payment_dateStringLast payment date
data[].contract_details.card_noStringMasked card number
data[].contract_details.card_nwStringCard network
data[].contract_details.due_amountStringDue amount
data[].plan_detailsObjectPlan details
data[].plan_details.plan_idStringPlan ID
data[].plan_details.plan_nameStringPlan name
data[].plan_details.billing_frequencyStringBilling frequency
data[].plan_details.total_termsStringTotal terms (or Unlimited)
data[].plan_details.billing_intervalIntegerBilling interval
data[].plan_details.currencyStringCurrency
data[].plan_details.installment_amountStringInstallment amount
data[].plan_details.shipping_feeNumberShipping fee
data[].plan_details.convenience_feeNumberConvenience fee
data[].plan_details.start_dateStringPlan start date
data[].subscriber_detailsObjectSubscriber details
data[].subscriber_details.subscribers_idStringSubscriber ID
data[].subscriber_details.nameStringSubscriber name
data[].subscriber_details.mobile_noStringSubscriber mobile number
data[].subscriber_details.emailStringSubscriber email
messageStringHuman-readable status message
statusStringsuccess or error
codeStringStatus code (00 for success)
total_recordsIntegerTotal number of matching records

Code Examples

curl -X GET "https://api.payorc.com/subscriptions/v1/contract/list?perpage=10&page=1" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET"

Example Response

{
    "data": [
        {
            "contract_details": {
                "subscription_id": "WnIzN0tFTGQxZ2a3ZLdXpQRTQydz09",
                "contract_id": "1000010002",
                "de_submerchant_id": "0000001181",
                "submerchant_name": "DEMOACCOUNT",
                "status": "Active",
                "subscription_date": "23-01-2025 16:06:26",
                "order_no": "1000012004",
                "last_payment_status": "PAID",
                "terms_collected": 1,
                "subscription_start_date": "23-01-2025",
                "next_payment_date": "24-01-2025",
                "last_payment_date": "23-01-2025 04:08:00",
                "card_no": "xxxx xxxx xxxx 1111",
                "card_nw": "VISA",
                "due_amount": "90.00"
            },
            "plan_details": {
                "plan_id": "10000002",
                "plan_name": "TEST",
                "billing_frequency": "daily",
                "total_terms": 2,
                "billing_interval": 1,
                "currency": "AED",
                "installment_amount": "50.00",
                "shipping_fee": "25.00",
                "convenience_fee": "15.00",
                "start_date": "23-01-2025 11:08:00"
            },
            "subscriber_details": {
                "subscribers_id": "0000000248",
                "name": "Rahul S",
                "mobile_no": "9238328673",
                "email": "[email protected]"
            }
        }
    ],
    "message": "Contract list fetched successfully.",
    "status": "success",
    "code": "00",
    "total_records": 1
}

Use the encrypted contract_details.subscription_id from this response for Contract Details and Cancel Subscription. The plain contract_id is the display identifier only. Request date filters use YYYY-MM-DD; response dates use DD-MM-YYYY.

On this page