PayOrc
Subscription Plan

Get Contract Details

Retrieve detailed information about a specific subscription contract including plan, subscriber, card, and payment data.

Get Contract Details

Version: 3.0.0

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

Use this endpoint to retrieve comprehensive details about a specific subscription contract. The response includes contract details, plan details, subscriber information, card details, payment history, and payment schedule.

Endpoint

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

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
subscription_idStringYesEncrypted subscription identifier from the Contract List response (contract_details.subscription_id). Do not use the plain contract_id display value.

ID formats: In Contract List, subscription_id is encrypted and contract_id is the plain display ID. Pass the encrypted subscription_id to this endpoint and to Cancel Subscription. The response contract_details.subscription_id here is the plain display ID, not the encrypted value.

Response (200 OK)

FieldTypeDescription
dataObjectContract details object
data.contract_detailsObjectContract details
data.contract_details.subscription_idStringPlain display subscription ID (not the encrypted query value)
data.contract_details.merchant_nameStringName of the merchant
data.contract_details.super_merchant_nameStringName of the super merchant
data.contract_details.statusStringStatus of the subscription (Active, Deactivated)
data.contract_details.subscription_dateStringSubscription creation date (DD-MM-YYYY HH:mm:ss)
data.contract_details.next_due_dateStringNext due date (DD-MM-YYYY HH:mm:ss, or - if none)
data.contract_details.is_recurring_enabledNumberRecurring billing flag (1 = enabled, 0 = disabled)
data.plan_detailsObjectPlan details
data.plan_details.plan_nameStringName of the plan
data.plan_details.plan_idStringPlan ID
data.plan_details.plan_descriptionStringPlan description
data.plan_details.billing_frequencyStringBilling frequency
data.plan_details.currencyStringCurrency used for payments
data.plan_details.initial_payment_amountStringInitial payment amount
data.plan_details.billing_intervalNumberBilling interval
data.plan_details.total_termsNumberTotal terms of the plan
data.plan_details.final_payment_amountStringFinal payment amount
data.plan_details.shipping_feeNumberShipping fee
data.plan_details.convenience_feeNumberConvenience fee
data.plan_details.installment_amountStringInstallment amount per term
data.plan_details.discounted_termsStringNumber of discounted terms
data.plan_details.discounted_amountStringDiscount amount
data.plan_details.start_dateStringPlan start date
data.plan_details.expiry_dateStringPlan expiry date
data.subscriber_detailsObjectSubscriber details
data.subscriber_details.subscribers_idStringSubscriber ID
data.subscriber_details.emailStringSubscriber email
data.subscriber_details.nameStringSubscriber name
data.subscriber_details.mobile_noStringSubscriber mobile number
data.card_detailsObjectCard details
data.card_details.customer_nameStringCardholder name
data.card_details.customer_emailStringCardholder email
data.card_details.card_expiryStringCard expiry (MM/YYYY)
data.card_details.card_noStringMasked card number (last 4 digits)
data.card_details.card_nwStringCard network (e.g., VISA)
data.card_details.payment_methodStringPayment method (e.g., CREDIT CARD)
data.payment_dataArrayArray of payment records
data.payment_data[].payment_idStringEncrypted payment ID
data.payment_data[].payment_statusStringPayment status (e.g., CAPTURED)
data.payment_data[].payment_modeStringPayment mode (e.g., card network or method)
data.payment_data[].order_noStringOrder number
data.payment_data[].added_dateStringDate payment was added (DD-MM-YYYY HH:mm:ss)
data.payment_data[].transaction_dateStringTransaction date (DD-MM-YYYY HH:mm:ss)
data.payment_scheduleArrayPayment schedule
data.payment_schedule[].idStringEncrypted schedule entry ID
data.payment_schedule[].next_due_dateStringNext due date (DD-MM-YYYY)
data.payment_schedule[].amountStringAmount due
data.payment_schedule[].is_paidNumberPaid flag (1 = paid, 0 = not paid)
data.payment_schedule[].is_failedNumberFailed flag (1 = failed, 0 = not failed)
data.payment_schedule[].is_skippedNumberSkipped flag (1 = skipped, 0 = not skipped)
data.payment_schedule[].order_idNumberOrder ID
data.payment_schedule[].payment_idStringPayment ID
messageStringHuman-readable status message
statusStringsuccess or error
codeStringStatus code (00 for success)

Code Examples

curl -X GET "https://api.payorc.com/subscriptions/v1/contract/details?subscription_id=WnIzN0tFTGQxZ2a3ZLdXpQRTQydz09" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET"

Example Response

{
    "data": {
        "contract_details": {
            "subscription_id": "1000010002",
            "merchant_name": "DEMOACCOUNT",
            "super_merchant_name": "John",
            "status": "Deactivated",
            "subscription_date": "23-01-2025 16:06:26",
            "next_due_date": "24-01-2025 00:00:00",
            "is_recurring_enabled": 1
        },
        "plan_details": {
            "plan_name": "NI-TEST",
            "plan_id": "10000002",
            "plan_description": "TEST",
            "billing_frequency": "daily",
            "currency": "AED",
            "initial_payment_amount": "AED 50.00",
            "billing_interval": 1,
            "total_terms": 2,
            "final_payment_amount": "AED 50.00",
            "shipping_fee": "0.00",
            "convenience_fee": "0.00",
            "installment_amount": "AED 50.00",
            "discounted_terms": "-",
            "discounted_amount": "-",
            "start_date": "23-01-2025 11:08:00",
            "expiry_date": "24-01-2025 17:08:00"
        },
        "subscriber_details": {
            "subscribers_id": "0000000248",
            "email": "[email protected]",
            "name": "Rahul S",
            "mobile_no": "9238328673"
        },
        "card_details": {
            "customer_name": "Rahul S",
            "customer_email": "[email protected]",
            "card_expiry": "12/2027",
            "card_no": "xxxx xxxx xxxx 8855",
            "card_nw": "VISA",
            "payment_method": "CREDIT CARD"
        },
        "payment_data": [
            {
                "payment_id": "enc_payment_id",
                "payment_status": "CAPTURED",
                "payment_mode": "VISA",
                "order_no": "1000012004",
                "added_date": "23-01-2025 16:06:26",
                "transaction_date": "23-01-2025 16:06:30"
            }
        ],
        "payment_schedule": [
            {
                "id": "enc_schedule_id",
                "next_due_date": "24-01-2025",
                "amount": "50.00",
                "is_paid": 1,
                "is_failed": 0,
                "is_skipped": 0,
                "order_id": 1000012004,
                "payment_id": "PAY001"
            }
        ]
    },
    "message": "Details fetched successfully.",
    "status": "success",
    "code": "00"
}

Use the encrypted subscription_id from contract_details.subscription_id in the Contract List response. The plain contract_id from that response is for display and filtering only.

On this page