Subscription
Recurring payments taken through 2Checkout, listed and cancelled.
A subscription is a recurring payment that renews the account's service automatically. These operations list the subscriptions in place and cancel one.
Both work through 2Checkout, formerly Avangate, which is why the paths carry avangate. Because they reach an external service, both can return error 215 when that service is unavailable.
API actions
API base path: /subscription.
/subscription/avangate/
Working with 2Checkout (formerly Avangate) subscriptions (renewals).
Required sub-user rights: payment_create.
Unsubscribe from 2Checkout auto-renewal, by subscription reference.
2Checkout was formerly Avangate, which is where the path segment comes from.
Also accepts GET with the same parameters as query-string values.
Requires the payment_create right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Internal 2Checkout subscription code. Take it from the subscription/avangate/list response. Must not be empty.
Auto-renewal cancelled
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/subscription/avangate/cancel HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"reference": "text"
}{
"success": true
}Errors
These errors come in addition to the general error codes:
215 - External service error.
Required sub-user rights: payment_create.
List the active 2Checkout subscriptions, meaning renewals, of the current user.
2Checkout was formerly Avangate, which is where the path segment comes from.
Returns error 201 when 2Checkout is not configured for the caller's dealer, which is the usual outcome on a platform that does not use it.
Callable with an empty body. Also accepts GET.
Requires the payment_create right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Active subscriptions
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
POST /v2/subscription/avangate/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
"success": true,
"list": [
{
"reference": "text",
"code": "text",
"quantity": 1,
"expiration_date": "text"
}
]
}Errors
These errors come in addition to the general error codes:
215 - External service error.
Last updated
Was this helpful?