LogoLogo
Document ValidationsPayment Methods
Latest
Latest
  • D24 APIs
  • Getting Started with D24
  • API Documentation
    • Deposits API
      • Technical and Security Aspects
        • Calculating the Signature
      • Endpoints
        • Deposit Creation Endpoint
          • Notifications
        • PCI Deposit Creation Endpoint
        • Deposit Status Endpoint
        • Payment Methods Endpoint
        • Currency Exchange Endpoint
        • Crypto Exchange Endpoint
        • Country States Codes Endpoint
        • Refund Creation Endpoint
          • Notifications
        • Refund Status Endpoint
      • Payment Methods
        • ๐ŸŒŽAmerica
          • ๐Ÿ‡ฆ๐Ÿ‡ทArgentina
          • ๐Ÿ‡ง๐Ÿ‡ดBolivia
          • ๐Ÿ‡ง๐Ÿ‡ทBrazil
          • ๐Ÿ‡จ๐Ÿ‡ฑChile
          • ๐Ÿ‡จ๐Ÿ‡ฆCanada
          • ๐Ÿ‡จ๐Ÿ‡ดColombia
          • ๐Ÿ‡ช๐Ÿ‡จEcuador
          • ๐Ÿ‡ฌ๐Ÿ‡นGuatemala
          • ๐Ÿ‡ฒ๐Ÿ‡ฝMexico
          • ๐Ÿ‡ต๐Ÿ‡พParaguay
          • ๐Ÿ‡ต๐Ÿ‡ชPeru
        • ๐ŸŒAfrica
          • ๐Ÿ‡ง๐Ÿ‡ผBotswana
          • ๐Ÿ‡จ๐Ÿ‡ฒCameroon
          • ๐Ÿ‡จ๐Ÿ‡ฌCongo Brazzaville
          • ๐Ÿ‡จ๐Ÿ‡ฉCongo DRC
          • ๐Ÿ‡ช๐Ÿ‡ฌEgypt
          • ๐Ÿ‡ฌ๐Ÿ‡ฆGabon
          • ๐Ÿ‡ฌ๐Ÿ‡ญGhana
          • ๐Ÿ‡จ๐Ÿ‡ฎIvory Coast
          • ๐Ÿ‡ฐ๐Ÿ‡ชKenya
          • ๐Ÿ‡ณ๐Ÿ‡ฌNigeria
          • ๐Ÿ‡ฒ๐Ÿ‡ผMalawi
          • ๐Ÿ‡ท๐Ÿ‡ผRwanda
          • ๐Ÿ‡ฟ๐Ÿ‡ฆSouth Africa
          • ๐Ÿ‡บ๐Ÿ‡ฌUganda
          • ๐Ÿ‡ฟ๐Ÿ‡ฒZambia
          • ๐Ÿ‡น๐Ÿ‡ฟTanzania
        • ๐ŸŒAsia
          • ๐Ÿ‡ง๐Ÿ‡ฉBangladesh
          • ๐Ÿ‡จ๐Ÿ‡ณChina
          • ๐Ÿ‡ญ๐Ÿ‡ฐHong Kong
          • ๐Ÿ‡ฎ๐Ÿ‡ณIndia
          • ๐Ÿ‡ฎ๐Ÿ‡ฉIndonesia
          • ๐Ÿ‡ฏ๐Ÿ‡ตJapan
          • ๐Ÿ‡ฒ๐Ÿ‡พMalaysia
          • ๐Ÿ‡ต๐Ÿ‡ฐPakistan
          • ๐Ÿ‡น๐Ÿ‡ญThailand
          • ๐Ÿ‡น๐Ÿ‡ทTurkey
          • ๐Ÿ‡ป๐Ÿ‡ณVietnam
      • API Codes
    • Cashouts API
      • Technical and Security Aspects
        • Calculating the Payload-Signature
      • Endpoints
        • Cashout Creation Endpoint
          • Notifications
        • Cashout Status Endpoint
        • Cashout Update Status Endpoint
        • Cashout Cancellation Endpoint
        • Cashout Bank Codes
      • Countries Validations
        • American Countries
          • ๐Ÿ‡ง๐Ÿ‡ดBolivia
          • ๐Ÿ‡ง๐Ÿ‡ทBrazil
          • ๐Ÿ‡จ๐Ÿ‡ฆCanada
          • ๐Ÿ‡จ๐Ÿ‡ฑChile
          • ๐Ÿ‡จ๐Ÿ‡ดColombia
          • ๐Ÿ‡ช๐Ÿ‡จEcuador
          • ๐Ÿ‡ฒ๐Ÿ‡ฝMexico
          • ๐Ÿ‡ต๐Ÿ‡ชPeru
          • ๐Ÿ‡ฆ๐Ÿ‡ทArgentina
          • ๐Ÿ‡ต๐Ÿ‡พParaguay
        • African Countries
          • ๐Ÿ‡ง๐Ÿ‡ผBotwsana
          • ๐Ÿ‡จ๐Ÿ‡ฒCameroon
          • ๐Ÿ‡จ๐Ÿ‡ฌCongo Brazzaville
          • ๐Ÿ‡จ๐Ÿ‡ฉCongo DRC
          • ๐Ÿ‡ช๐Ÿ‡ฌEgypt
          • ๐Ÿ‡ฌ๐Ÿ‡ฆGabon
          • ๐Ÿ‡ฌ๐Ÿ‡ญGhana
          • ๐Ÿ‡ฐ๐Ÿ‡ชKenya
          • ๐Ÿ‡ฒ๐Ÿ‡ผMalawi
          • ๐Ÿ‡ณ๐Ÿ‡ฌNigeria
          • ๐Ÿ‡ท๐Ÿ‡ผRwanda
          • ๐Ÿ‡ฟ๐Ÿ‡ฆSOUTH AFRICA
          • ๐Ÿ‡ฟ๐Ÿ‡ฒZambia
        • Asian Countries
          • ๐Ÿ‡ง๐Ÿ‡ฉBangladesh
          • ๐Ÿ‡จ๐Ÿ‡ณChina
          • ๐Ÿ‡ฎ๐Ÿ‡ณIndia
          • ๐Ÿ‡ฎ๐Ÿ‡ฉIndonesia
          • ๐Ÿ‡ฏ๐Ÿ‡ตJapan
          • ๐Ÿ‡ฒ๐Ÿ‡พMalaysia
          • ๐Ÿ‡น๐Ÿ‡ญThailand
          • ๐Ÿ‡น๐Ÿ‡ทTurkey
          • ๐Ÿ‡ต๐Ÿ‡ฐPakistan
          • ๐Ÿ‡ป๐Ÿ‡ณVietnam
        • Oceania Countries
          • ๐Ÿ‡ฆ๐Ÿ‡บAustralia
      • API Codes
    • Subscriptions API
      • Technical and Security Aspects
        • Calculating the Signature
      • Subscription Creation Endpoints
        • OneShot Subscription Creation
        • PCI Subscription Creation Endpoint
        • Notifications
      • Subscription Cancellation Endpoint
      • Subscription Status Endpoint
    • Card-On-File API
      • Technical and Security Aspects
        • Calculating the Signature
      • Create Card Token Endpoint
      • Retrieve Card Token Endpoint
      • Delete Card Token Endpoint
    • Bank Accounts Validation API
      • Technical and Security Aspects
        • Calculating the Signature
      • Endpoints
        • Bank Account Validation Endpoint
        • Pix Key Validation Endpoint
      • API Codes
    • KYC API
      • Technical and Security Aspects
        • Calculating the Signature
      • KYC Endpoint
      • API Codes
    • Reconciliation API
      • Technical and Security Aspects
      • Endpoints
      • API Codes
    • Quickpay
      • Endpoints
        • Deposit creation endpoint
          • Notifications
        • Deposit Status Endpoint
    • Tools for Platforms
      • Technical and Security Aspects
        • Calculating the Signature
      • SubMerchant Creation
        • Notifications
      • SubMerchant Status Endpoint
      • Commission Update Endpoint
  • PLUGINS
    • Shopify
      • Installation
      • Onboarding
      • Customer flow
      • Admin Flow
      • Tutorials
      • FAQ
    • WooCommerce
      • Installation
      • Configuration
  • Deposits Tools
    • Cards SDK
      • With User Interface
        • ๐Ÿš€Color Customization
      • Without User Interface
    • Java SDK
    • PHP SDK
  • Knowledge Base
    • Countries Specifications
    • Subscriptions with Card On File
    • Deposits with Cards SDK
      • With User Interface
      • Without User Interface
    • Deposits with 3DS Authentication
    • Deposits with Installments
  • v1 Developers Guide
  • Status Page
Powered by GitBook
On this page

Was this helpful?

  1. API Documentation
  2. Subscriptions API

Subscription Status Endpoint

This documentation details the endpoint used to retrieve the current status and information of existing subscriptions in our system.

PreviousSubscription Cancellation EndpointNextCard-On-File API

Last updated 2 months ago

Was this helpful?

Overview

The Subscription Status API allows merchants to retrieve comprehensive information about a subscription, including its current status, billing details, dates, and configuration.

Endpoint

GET https://api-stg.directa24.com/v3/subscriptions/{subscription_id}

Where {subscription_id} is the unique numeric identifier of the subscription you wish to retrieve.

Request Parameters

This endpoint uses only a path parameter to identify the subscription:

Parameter
Type
Required
Description

id

integer

Yes

Unique numeric identifier of the subscription to retrieve.

Response

Success Response

A successful request returns an HTTP 200 status code with the subscription details:

{
  "id": 219,
  "status": "PENDING",
  "start_date": "2020-10-10",
  "end_date": "2020-10-17",
  "creation_date": "2025-02-18T17:18:21.67708163",
  "subscription_plan": "WEEKLY",
  "amount": 10.90,
  "auto_renewal": true,
  "last_modified_date": "2025-02-18T13:49:16"
}

Response Fields

Field
Type
Description

id

integer

Unique identifier of the subscription

status

string

Current status of the subscription (PENDING, ACTIVE, CANCELLED, TERMINATED)

start_date

string

Date when the subscription started or will start (YYYY-MM-DD)

end_date

string

Date when the subscription will end if not renewed (YYYY-MM-DD)

creation_date

string

Timestamp when the subscription was created

subscription_plan

string

Frequency of the subscription (DAILY, WEEKLY, MONTHLY, ANNUALLY)

amount

number

Amount charged for each billing cycle

auto_renewal

boolean

Whether the subscription will automatically renew

last_modified_date

string

Timestamp when the subscription was last modified

Error Responses

The API may return the following errors:

Subscription Not Found

Returned when the specified subscription ID does not exist:

{
  "code": 420,
  "description": "Subscription does not exist.",
  "type": "SUBSCRIPTION_NOT_FOUND"
}

Generic Error

Returned when an unexpected error occurs:

{
  "code": 500,
  "description": "Subscription not found id 218 for merchantId 127,885",
  "type": "GENERIC_ERROR"
}

Subscription Statuses

A subscription can have one of the following statuses:

Status
Description

PENDING

Subscription has been created but payment has not been confirmed

ACTIVE

Subscription is active and billing cycles are in progress.

CANCELLED

Subscription was cancelled before completion.

TERMINATED

Subscription was terminated successfully, and all payments were charged accordingly.

Webhook Notifications and Payment Flow

When a payment related to a subscription is processed, our system will send notification updates to your configured notification URL. This notification includes a deposit_id which is crucial for tracking the payment status.

Complete Notification Flow

  1. Payment Processing: The system processes a payment (initial or recurring)

  2. Webhook Notification: A notification is sent to your configured URL with a deposit_id

  3. Subscription Identification: The deposit response includes the related subscription_id

  4. Subscription Status Check: Query GET v3/subscriptions/{subscription_id} to verify current status

Example Flow

Payment processed
    โ†“
Notification received with deposit_id=12345
    โ†“
GET v3/deposits/12345
    โ†“
Response contains subscription_id=219
    โ†“
GET v3/subscriptions/219
    โ†“
Verify and update subscription records

This complete flow ensures that you have full visibility into both payment status and subscription details.

It is important that you integrate the .

Deposit Status Endpoint: Query GET v3/deposits/{deposit_id} to get payment details. You can find details of the endpoint .

Deposit Status Endpoint
here

Get subscription details

get

This endpoint retrieves the details of a specific subscription by ID.

Path parameters
subscription_idinteger ยท int64Required

Unique numeric identifier of the subscription to retrieve.

Example: 219
Header parameters
Content-TypestringRequired

Media type of the body sent to the API.

Default: application/json
X-Datestring ยท date-timeRequired

ISO8601 Datetime with Timezone (yyyy-MM-dd'T'HH:mm:ssZ)

X-LoginstringRequired

Merchant X-Login API Key.

AuthorizationstringRequired

Authorization control hash.

X-Idempotency-KeystringOptional

Unique idempotency key for ensuring that the same request is not processed more than once.

Responses
200
Subscription details retrieved successfully
application/json
420
Subscription does not exist
application/json
500
Generic Error
application/json
get
GET /v3/subscriptions/{subscription_id} HTTP/1.1
Host: api-stg.directa24.com
Content-Type: application/json
X-Date: 2025-05-14T11:38:38.089Z
X-Login: text
Authorization: text
Accept: */*
{
  "subscription_id": 219,
  "status": "PENDING",
  "start_date": "2020-10-10",
  "end_date": "2020-10-17",
  "creation_date": "2025-02-18T17:18:21.67708163",
  "subscription_plan": "WEEKLY",
  "amount": 10.9,
  "auto_renewal": true,
  "last_modified_date": "2025-02-18T13:49:16"
}
  • Overview
  • Endpoint
  • GETGet subscription details
  • Request Parameters
  • Response
  • Subscription Statuses
  • Webhook Notifications and Payment Flow
  • Complete Notification Flow