Skip to content

Subscription

API calls to interact with payment subscriptions

API actions

API path: /subscription.

/subscription/avangate/

Working with 2Checkout (formerly Avangate) subscriptions (renewals).

cancel

Unsubscribe from auto-renewal by reference.

required sub-user rights: payment_create.

Parameters

name description type
reference Internal 2Checkout (formerly Avangate) subscription code. Get it from list call. string

Examples

curl -X POST 'https://api.navixy.com/v2/subscription/avangate/cancel' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "reference": "5EAD4B0B2F"}'
https://api.navixy.com/v2/subscription/avangate/cancel?hash=a6aa75587e5c59c32d347da438505fc3&reference=5EAD4B0B2F

Response

{
    "success": true
}

Errors

  • 215 – External service error.

list

List active 2Checkout formerly Avangate subscriptions (renewals).

required sub-user rights: payment_create.

Parameters

Only API key hash.

Examples

curl -X POST 'https://api.navixy.com/v2/subscription/avangate/list' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b"}'
https://api.navixy.com/v2/subscription/avangate/list?hash=a6aa75587e5c59c32d347da438505fc3

Response

{
    "success": true,
    "list": [{
        "reference": "5EAD4B0B2F",
        "code": "4679109",
        "quantity": 123,
        "expiration_date": "2021-01-28 13:32:11"
    }]
}
  • reference - string. Internal 2Checkout (formerly Avangate) subscription code. Pass it to /subscription/avangate/cancel.
  • code - string. 2Checkout (formerly Avangate) product code.
  • quantity - int. Count.
  • expiration_date - date/time. Next renew date/time.

Errors

  • 215 – External service error.

Last update: October 16, 2024