PUT /api/v1.3/subscription/{subscriptionId} method is your endpoint to manage an existing customer's subscription. The Subscription ID should be sent as a part of the URL.
Name | URL |
---|---|
Sandbox | https://pci-gw-test.praxispay.com/api/v1.3/subscription/{subscriptionId} |
Live | https://gw.praxisgate.com/api/v1.3/subscription/{subscriptionId} |
✓ - 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) |
subscription_status | varchar(8) | ? | Status of subscription. List of possible statuses: Active - customer subscription in active status.Inactive - customer subscription inactive.Expired - customer subscription expired.Canceled - customer subscription removed. |
payment_action | varchar(32) | ? | Payment action. Possible values:paid_manually - meaning the subscription was paid manually, payment will be scheduled for the next billing cycle instant_payment - request an instant payment and start new billing cycle. |
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 |
subscription_id | varchar(32) | ✓ | Subscription ID |
cid | varchar(32) | ✓ | Customer ID |
subscription_status | varchar(8) | ✓ | Status of subscription. List of possible statuses: Active - customer subscription in active status. Inactive - customer subscription inactive. Expired - customer subscription expired. Canceled - customer subscription removed. |
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
{
"merchant_id": "API-Merchant",
"application_key": "test-application",
"subscription_status": "active",
"payment_action": "paid_manually",
"version": 1.3,
"timestamp": 1680712861
}
{
"status": 0,
"description": "Customer subscription successfully updated",
"subscription_id": "tvoS9vGKdDwfGLLvp0r8JJ5d",
"cid": "user-1234",
"subscription_status": "active",
"version": 1.3,
"timestamp": 1680712861
}
{
"status": -1,
"description": "Subscription with ID tvoS9vGKdDwfGLLvp0r8JJ5d for customer user-1234 not found",
"version": 1.3,
"timestamp": 1680712861
}