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
| Method | URL |
|---|---|
| GET | https://api.payorc.com/subscriptions/v1/contract/details |
Please use the test credentials for sandbox testing.
Authentication
Include the following headers in every request:
| Header | Type | Description |
|---|---|---|
merchant-key | String | Your merchant key |
merchant-secret | String | Your merchant secret |
All API requests must be made over HTTPS. Requests made over plain HTTP will be rejected.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
subscription_id | String | Yes | Encrypted 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)
| Field | Type | Description |
|---|---|---|
data | Object | Contract details object |
data.contract_details | Object | Contract details |
data.contract_details.subscription_id | String | Plain display subscription ID (not the encrypted query value) |
data.contract_details.merchant_name | String | Name of the merchant |
data.contract_details.super_merchant_name | String | Name of the super merchant |
data.contract_details.status | String | Status of the subscription (Active, Deactivated) |
data.contract_details.subscription_date | String | Subscription creation date (DD-MM-YYYY HH:mm:ss) |
data.contract_details.next_due_date | String | Next due date (DD-MM-YYYY HH:mm:ss, or - if none) |
data.contract_details.is_recurring_enabled | Number | Recurring billing flag (1 = enabled, 0 = disabled) |
data.plan_details | Object | Plan details |
data.plan_details.plan_name | String | Name of the plan |
data.plan_details.plan_id | String | Plan ID |
data.plan_details.plan_description | String | Plan description |
data.plan_details.billing_frequency | String | Billing frequency |
data.plan_details.currency | String | Currency used for payments |
data.plan_details.initial_payment_amount | String | Initial payment amount |
data.plan_details.billing_interval | Number | Billing interval |
data.plan_details.total_terms | Number | Total terms of the plan |
data.plan_details.final_payment_amount | String | Final payment amount |
data.plan_details.shipping_fee | Number | Shipping fee |
data.plan_details.convenience_fee | Number | Convenience fee |
data.plan_details.installment_amount | String | Installment amount per term |
data.plan_details.discounted_terms | String | Number of discounted terms |
data.plan_details.discounted_amount | String | Discount amount |
data.plan_details.start_date | String | Plan start date |
data.plan_details.expiry_date | String | Plan expiry date |
data.subscriber_details | Object | Subscriber details |
data.subscriber_details.subscribers_id | String | Subscriber ID |
data.subscriber_details.email | String | Subscriber email |
data.subscriber_details.name | String | Subscriber name |
data.subscriber_details.mobile_no | String | Subscriber mobile number |
data.card_details | Object | Card details |
data.card_details.customer_name | String | Cardholder name |
data.card_details.customer_email | String | Cardholder email |
data.card_details.card_expiry | String | Card expiry (MM/YYYY) |
data.card_details.card_no | String | Masked card number (last 4 digits) |
data.card_details.card_nw | String | Card network (e.g., VISA) |
data.card_details.payment_method | String | Payment method (e.g., CREDIT CARD) |
data.payment_data | Array | Array of payment records |
data.payment_data[].payment_id | String | Encrypted payment ID |
data.payment_data[].payment_status | String | Payment status (e.g., CAPTURED) |
data.payment_data[].payment_mode | String | Payment mode (e.g., card network or method) |
data.payment_data[].order_no | String | Order number |
data.payment_data[].added_date | String | Date payment was added (DD-MM-YYYY HH:mm:ss) |
data.payment_data[].transaction_date | String | Transaction date (DD-MM-YYYY HH:mm:ss) |
data.payment_schedule | Array | Payment schedule |
data.payment_schedule[].id | String | Encrypted schedule entry ID |
data.payment_schedule[].next_due_date | String | Next due date (DD-MM-YYYY) |
data.payment_schedule[].amount | String | Amount due |
data.payment_schedule[].is_paid | Number | Paid flag (1 = paid, 0 = not paid) |
data.payment_schedule[].is_failed | Number | Failed flag (1 = failed, 0 = not failed) |
data.payment_schedule[].is_skipped | Number | Skipped flag (1 = skipped, 0 = not skipped) |
data.payment_schedule[].order_id | Number | Order ID |
data.payment_schedule[].payment_id | String | Payment ID |
message | String | Human-readable status message |
status | String | success or error |
code | String | Status 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.