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
    • 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
    • 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
  • Overview
  • Key Features
  • Integration Flow
  • Subscription Creation Endpoints
  • Subscription Cancellation Endpoint
  • Deposit Status Endpoint
  • Subscription Status Endpoint
  • Payment Notification Flow
  • Subscription Lifecycle
  • Authentication Requirements
  • Response Codes
  • Getting Started

Was this helpful?

  1. API Documentation

Subscriptions API

The Subscriptions API enables merchants to create and manage recurring billing relationships with their customers.

Overview

The Subscriptions API provides a complete solution for managing the entire subscription lifecycle, from initial creation to status monitoring and cancellation. The following operations are included in our API

  1. Subscription Creation -Create new subscriptions with predetermined billing frequencies

  2. Subscription Cancellation - Terminate existing subscriptions when needed.

  3. Subscription Status - Retrieve detailed information about existing subscriptions

Key Features

  • Multiple Integration Options: Choose between OneShot Flow (redirect-based) or PCI Flow (direct card processing) based on your compliance status

  • Flexible Billing Frequencies: Support for DAILY, WEEKLY, MONTHLY, and ANNUALLY billing cycles

  • Automatic Renewals: Configure subscriptions to automatically renew or expire after a set period

  • Webhook Notifications: Receive real-time updates about payment and subscription status changes

  • Comprehensive Reporting: Access detailed information about subscription status and payment history

Integration Flow

A typical integration with the Subscriptions API follows this sequence:

  1. Create Subscription (POST /v3/subscriptions)

    • Submit customer and billing information

    • For non-PCI flow: Redirect customer to payment page

    • For PCI flow: Submit payment details directly

  2. Monitor Status (GET /v3/subscriptions/{id})

    • Verify subscription activation

    • Check payment processing status

  3. Manage Lifecycle (as needed)

    • Cancel subscription (DELETE /v3/subscriptions/{id})

    • Check status changes (GET /v3/subscriptions/{id})

Integration Requirements

To receive full integration approval and move to production, merchants must successfully implement all core endpoints. Our certification process requires demonstration of:

Only after all endpoints have been verified in the staging environment will merchants receive clearance to use the Subscriptions API in production. This ensures a complete integration that can properly manage the entire subscription lifecycle from creation to termination, including payment verification.

Subscription Creation Endpoints

The API offers two distinct flows for creating subscriptions, catering to merchants with different PCI compliance levels:

OneShot Flow (Non-PCI)

POST https://api-stg.directa24.com/v3/subscriptions

The standard flow requires redirection to our secure payment page where customers can safely enter their payment details. All payment information is processed on our PCI-compliant servers.

PCI Flow

POST https://cc-api-stg.directa24.com/v3/subscriptions

The PCI flow enables merchants to collect and transmit credit card details directly within the API request, facilitating a seamless checkout experience without redirections.

Note: To access the PCI flow, merchants must provide valid PCI AOC documentation and use the designated PCI endpoint.

Subscription Cancellation Endpoint

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

When a subscription is cancelled:

  • No further charges will be processed

  • The subscription status will change to CANCELLED

  • Existing transactions will remain unaffected.

Deposit Status Endpoint

GET https://api-stg.directa24.com/v3/deposits/{deposit_id}

The response includes comprehensive details about the deposit, including:

  • Payment status

  • Transaction amount

  • Payment method used

  • Associated subscription ID

  • Processing date and time

  • More information

Subscription Status Endpoint

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

The response includes comprehensive details about the subscription, including:

  • Current status

  • Payment history

  • Upcoming billing dates

  • Subscription terms

Payment Notification Flow

When a payment event occurs for a subscription, our system notifies you through this process:

  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

Subscription Lifecycle

A typical subscription follows this lifecycle:

  1. Creation: A subscription is created with customer, payment, and billing details

  2. Activation: The initial payment is processed and the subscription becomes active

  3. Recurring Billing: Payments are automatically processed according to the billing frequency

  4. Updates: Subscription details may be modified (coming soon).

  5. Cancellation: The subscription is terminated, stopping future payments.

  6. Completion: The subscription reaches its natural end date (if not set to auto-renew)

Authentication Requirements

  • X-Login: Your merchant API key

  • X-Date: Current timestamp in ISO 8601 format

  • Authorization: Authentication hash

  • Content-Type: application/json

Response Codes

The API uses standard HTTP response codes and includes detailed information in the response body:

  • 2xx: Success

  • 4xx: Client errors (invalid input, authentication issues)

  • 5xx: Server errors

Each error response includes a code, description, and type field to help with troubleshooting.


Getting Started

To begin integrating with the Subscriptions API:

    1. Choose your integration method: OneShot or PCI!

  1. Set up status monitoring and notifications.

  2. Configure webhook handling for real-time notifications

PreviousAPI CodesNextTechnical and Security Aspects

Last updated 1 month ago

Was this helpful?

Successful (either via OneShot or PCI flow)

Proper payment verification using the endpoint

Proper verification

Correct handling

For merchants without PCI certification, flow allows subscription creation without handling sensitive payment data directly.

For PCI-certified merchants, flow allows subscription creation with direct credit card submission.

endpoint enables merchants to cancel active subscriptions.

endpoint enables merchants to retrieve detailed information about a payment deposit associated with a subscription. Note that those deposits will be generated automatically by the Subscription API.

endpoint enables merchants to retrieve detailed information about a subscription.

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

All Subscriptions API endpoints require the following headers:

Review our

Implement the

Implement the and .

Implement functionality

subscription creation
deposits status
subscription status
subscription cancellation
this
this
This
This
This
here
Technical and Security Aspects documentation
Subscription Creation Endpoints
Deposit Status Endpoint
Subscription Status Endpoint
Subscription Cancellation
authentication