Skip to content

Get by account

/get_by_account

Target audience: Developers

Get subscriptions by account

Introduction

This endpoint returns all subscriptions for an account.
Included in the response is information regarding the account's active subscriptions.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v1/subscription/get_by_account
Production https://backend.worldoftulo.com/external/api/v1/subscription/get_by_account

Requirements

Identity Scope
No /external/subscription/r

Parameters

Name Required Type Description
account_id Yes String The id of the account to get information about.
Size range: ..24
Allowed values: "/^[a-f\d]{24}$/i"

Curl Example

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/subscription/get_by_account/account_id=585a4768edce2c5e6f000001 \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <token>'

Response

Example response

HTTP 200
{
    "items": [
      {
        "id": "585a4768edce2c5e6f000002",
        "order_id": "ADEPRIMO-1",
        "created": "2025-08-18T12:00:00+01:00",
        "updated": "2025-08-18T12:00:00+01:00",
        "product_code": "adeprimo_digital",
        "title_code": "adeprimo",
        "valid_from": "2025-08-18T12:00:00+01:00",
        "valid_to": "2026-08-18T12:00:00+01:00",
        "provision_service": "tulo",
        "subscription_type": "recurring",
        "subscription_number": "ADE10001",
        "subscription_next_price": 100.00,
        "payment_option": "adyen",
        "payment_option_details": 
        {
          "payment_method_type": "scheme", 
          "payment_method_name": "Card",
          "credit_card_masked_number": "545454******5454",
          "credit_card_expire_date": "2030-03-31T23:59:59.000+00:00",
          "credit_card_brand": null
        },
        "state": "activated",
        "has_pending_change_request": false,
        "campaign_end_date": null,
        "subscription_end_date": null,
        "external_start_date": ""
      },
      {
        "id": "585a4768edce2c5e6f000003",
        "order_id": "ADEPRIMO-2",
        "created": "2025-08-18T12:00:00+01:00",
        "updated": "2025-08-18T12:00:00+01:00",
        "product_code": "adeprimo_paper_campaign",
        "title_code": "adeprimo",
        "valid_from": "2025-08-18T12:00:00+01:00",
        "valid_to": "2025-09-18T12:00:00+01:00",
        "provision_service": "tulo",
        "subscription_type": "limited",
        "subscription_number": "ADE10002",
        "subscription_next_price": null,
        "payment_option": "billecta",
        "payment_option_details":
        {
          "payment_method_type": "invoice_email",
          "payment_method_name": "Invoice E-Mail"
        },
        "state": "activated",
        "has_pending_change_request": false,
        "campaign_end_date": "2025-09-18T12:00:00+01:00",
        "subscription_end_date": "2025-09-18T12:00:00+01:00",
        "external_start_date": ""
      }
    ]
}

Errors

This API uses the common error conventions of the Payway API

See common error responses