You may read a Subscription when handling a push notification or for some other reason.
To check the status, or other details, you need to read the Subscription:
Request
GET /api/v2/Payment/Subscriptions/SUB_9Y1IRAN83OO85CWUIJMZSGFZ12HXJN HTTP/1.1Host: connect-testing.secuconnect.comAuthorization: Bearer qb56tjj1bcvo9n2nj4u38k84loAccept: application/jsonIf everything is fine, the API responds with 200 OK and the object representation of the Subscription:
Response
HTTP/1.1 200 OKContent-Type: application/json...{ "object": "payment.subscriptions", "id": "SUB_9Y1IRAN83OO85CWUIJMZSGFZ12HXJN", "smart_transaction": { "object": "smart.transactions", "id": "STX_E4VC0BC2HXMXF8QHFI6WKPD483VCE0" }, "merchant": { "object": "general.merchants", "id": "MRC_HTWVIHTFOI3B4F2N3M2AVRM1LOVXY7" }, "contract": { "object": "general.contracts", "id": "GCR_FBUQ819C1WLYZCQN0PNVR1815N4KA7" }, "customer": { "object": "payment.customers", "id": "PCU_5GZCBOK50ZO651M2P6VWJO9S5XNCVE" }, "container": { "object": "payment.containers", "id": "PCT_QUC0OYDQEO2PTXPDHD1YU0QXEI6XQL", "type": "paypal" }, "plan": { "object": "payment.plans", "id": "PLN_QTGTYT963IEKB6ZOIJ1M1GJE2NPBPY" }, "start_at": "2021-06-24T21:43:18+02:00", "status": "active", "paypal_subscription_id": "I-X0FSBPLEPNXE", "billing_info": { "cycle_executions": [ { "sequence": 1, "tenure_type": "trial", "cycles_completed": 0, "cycles_remaining": 1, "total_cycles": 1 }, { "sequence": 2, "tenure_type": "regular", "cycles_completed": 0, "cycles_remaining": 0, "total_cycles": 0 } ], "next_billing_time": "2021-06-24T21:43:18+02:00" }, "created": "2021-06-24T20:43:23+02:00", "updated": "2021-06-24T20:44:04+02:00", "demo": false}This is the status flow of a Subscription:
And this are the meanings:
Status | Meaning |
|---|---|
| Started and is active. |
| Paused, but can be resumed. |
| Cancelled before its completion. |
| All cycles have been completed. |