GET /api/v1.3/subscription/search method is your endpoint to get the list of configured subscriptions for a specific customer.
Name | URL |
---|---|
Sandbox | https://pci-gw-test.praxispay.com/api/v1.3/subscription/search |
Live | https://gw.praxisgate.com/api/v1.3/subscription/search |
✓ - required value
? - optional, value or null
✕ - always appears as null
Variable | Type | Description | |
---|---|---|---|
merchant_id | varchar(50) | ✓ | Merchant API client account identifier |
application_key | varchar(32) | ✓ | Identifier of your application (website) |
cid | varchar(32) | ✓ | Customer ID |
subscription_id | varchar(32) | ✓ | Subscription ID |
version | varchar(4) | ✓ | API version. Default value - v1.3 |
timestamp | int(11) | ✓ | Response time (unix timestamp, seconds) |
Variable | Type | Description | |
---|---|---|---|
status | int | ✓ | API communication status - - 0 if the request was successful - Negative integer if internal server/network error occurs - Positive integer if application/logical error occurs |
description | varchar(256) | ✓ | Accurate description of the result. Return the actual error for any exception as it helps to diagnose issues in production |
cid | varchar(32) | ✓ | Customer ID |
subscriptions | string | ✓ | Array of subscriptions |
version | varchar(3) | ✓ | API version |
timestamp | int(11) | ✓ | Response time (unix timestamp, seconds) |
To execute the request, it is necessary to undergo the authentication process. The general authentication algorithm can be found in the Authentication section.
Request signature parameters
merchant_id
application_key
timestamp
Response signature parameters
status
timestamp
/v1.3/subscriptions/customer/search?
merchant_id=API-Merchant&
application_key=test-application&
cid=user-1234&
version=1.3&
timestamp=1680712861
{
"status": 0,
"description": "Customer subscription list fetched successfully",
"cid": "user-1234",
"subscriptions": [
{
"subscription_id": "tvoS9vGKdDwfGLLvp0r8JJ5d",
"plan_id": "6lmzTS5SBc1ABD4h",
"price": {
"price_id": "KdGw29Fc",
"amount": 20000,
"currency": "EUR",
},
"card_token": "a52028efb6ccbedd65c066ce284c7dfb",
"subscription_status": "active",
"created_at": 1680712861,
"expired_at": 1680821826,
"last_payment_date": 1680821726,
"next_payment_date": 1680832726
},
{
"subscription_id": "1GQ0xJonekLvqKTUdH1ELyYs",
"plan_id": "qwuOdKH3nteOFpel",
"price": {
"price_id": "wimNgR4J",
"amount": 187000,
"currency": "PLN"
},
"card_token": "a52028efb6ccbedd65c066ce284c7dfb",
"subscription_status": "active",
"created_at": 1680712861,
"expired_at": 1680821826,
"last_payment_date": 1680821726,
"next_payment_date": 1680832726
},
],
"version": 1.3,
"timestamp": 1680712861
}
{
"status": -1,
"description": "Customer subscriptions not found",
"version": 1.3,
"timestamp": 1680712861
}