Make Recurring

Create a recurring payment plan using DigetPay's Server-to-Server (S2S) API.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

The Make Recurring API allows merchants to create recurring payment plans by providing customer information, payment card details, and recurring billing configurations.

Merchants can define the billing frequency, number of payment iterations, and retry count.

The initial payment may require 3-D Secure (3DS) authentication. Once the initial payment is successfully completed, the recurring plan becomes active, and subsequent payments are processed automatically according to the configured billing schedule.


API Endpoint

Method: POST

Endpoint:

https://api.digetpay.com/v1/payment/s2s/MakeRecurring

Authentication

Include the following headers in your API request:

HeaderValue
x-api-keyYOUR_API_KEY
Content-Typeapplication/json

DigetPay uses a unified API base URL for both Test and Live environments.

  • Test API Key: Used for testing.
  • Live API Key: Used for production payments.

Request Example

The following example creates a monthly recurring payment plan of SAR 20, with 12 payment iterations and a retry count of 2.

curl --location 'https://api.digetpay.com/v1/payment/s2s/MakeRecurring' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "PaymentValue": 20,
  "Currency": "SAR",
  "RecurringModel": {
    "RecurringType": "Monthly",
    "IntervalDays": null,
    "Iteration": 12,
    "RetryCount": 2
  },
  "CustomerName": "fname lname",
  "CustomerEmail": "[email protected]",
  "CustomerMobile": "966512345678",
  "Card": {
    "Holder": "fname lname",
    "Number": "5123450000000008",
    "ExpiryMonth": "12",
    "ExpiryYear": "30",
    "Cvv": "100"
  },
  "CallBackUrl": "https://merchant.example/payment/success",
  "ErrorUrl": "https://merchant.example/payment/error"
}'

Note: Replace the example values with the appropriate payment details. Use only supported test cards with your Test API Key during testing.


Request Parameters

ParameterTypeDescription
PaymentValueNumberAmount to be charged for the recurring payment.
CurrencyStringTransaction currency, such as SAR.
RecurringModelObjectContains the recurring billing configuration.
CustomerNameStringCustomer's full name.
CustomerEmailStringCustomer's email address.
CustomerMobileStringCustomer's mobile number, including country code.
CustomerReferenceStringMerchant-defined customer reference.
CardObjectContains customer payment card information.
CallBackUrlStringCustomer return URL for the successful payment flow.
ErrorUrlStringCustomer return URL for the failed payment flow.

RecurringModel Object

ParameterTypeDescription
RecurringTypeStringBilling frequency: Daily, Weekly, Monthly, or Custom.
IntervalDaysInteger / NullNumber of days between recurring payments when using Custom.
IterationIntegerConfigured number of payment iterations.
RetryCountIntegerNumber of retry attempts for failed recurring payments.

Card Object

ParameterTypeDescription
HolderStringCardholder's name.
NumberStringPayment card number.
ExpiryMonthStringCard expiration month, e.g. 12.
ExpiryYearStringCard expiration year, e.g. 30.
CvvStringCard security code.

Supported Recurring Types

The RecurringType parameter determines how frequently recurring payments are scheduled.

Daily Recurring

{
  "RecurringType": "Daily",
  "IntervalDays": null,
  "Iteration": 1,
  "RetryCount": 1
}

Weekly Recurring

{
  "RecurringType": "Weekly",
  "IntervalDays": null,
  "Iteration": 4,
  "RetryCount": 3
}

Monthly Recurring

{
  "RecurringType": "Monthly",
  "IntervalDays": null,
  "Iteration": 12,
  "RetryCount": 2
}

Custom Recurring — Every 30 Days

{
  "RecurringType": "Custom",
  "IntervalDays": 30,
  "Iteration": 6,
  "RetryCount": 1
}

Custom Recurring — Every 180 Days

{
  "RecurringType": "Custom",
  "IntervalDays": 180,
  "Iteration": 2,
  "RetryCount": 0
}

Important: IntervalDays must be specified when RecurringType is set to Custom.


Response Example

The following response was returned after successfully submitting a Make Recurring request.

At this stage, the recurring plan has been created, but the initial payment is still awaiting authentication.

{
  "IsSuccess": true,
  "Message": "Success",
  "Data": {
    "RecurringId": "RECUR18",
    "InvoiceId": 7331354,
    "PaymentId": "07077331354392824673",
    "IsDirectPayment": false,
    "RecurringStatus": "PendingPayment",
    "ExecutedTimes": 0,
    "ThreeDS": {
      "Url": "https://pay.digetpay.com/En/KWT/PayInvoice/MpgsAuthentication?...",
      "Method": "GET",
      "Html": "<!DOCTYPE html>..."
    }
  }
}

Note: The ThreeDS.Url and ThreeDS.Html values have been shortened for readability. The actual API response contains the complete authentication URL and HTML document.


Response Parameters

ParameterTypeDescription
IsSuccessBooleanIndicates whether the API request was processed successfully.
MessageStringGeneral API response message.
DataObjectContains the created recurring plan and initial payment information.
Data.RecurringIdStringUnique identifier of the recurring payment plan.
Data.InvoiceIdNumberInvoice identifier associated with the initial payment.
Data.PaymentIdStringPayment identifier associated with the initial transaction.
Data.IsDirectPaymentBooleanIndicates whether the initial payment uses the direct payment flow.
Data.RecurringStatusStringCurrent recurring plan status.
Data.ExecutedTimesNumberNumber of payment executions recorded for the recurring plan.
Data.ThreeDSObjectContains 3-D Secure authentication information.
Data.ThreeDS.UrlStringAuthentication URL returned for the initial payment.
Data.ThreeDS.MethodStringHTTP method indicated for the authentication URL.
Data.ThreeDS.HtmlStringHTML document containing the payment authentication flow.

Handling 3-D Secure Authentication

The initial recurring payment may require the customer to complete 3-D Secure authentication.

When the response includes the ThreeDS object:

  1. Retrieve the authentication information from Data.ThreeDS.
  2. Initiate the authentication flow using the supported ThreeDS.Url or ThreeDS.Html integration method.
  3. Allow the customer to complete the authentication process.
  4. Handle the customer return through the configured CallBackUrl or ErrorUrl.
  5. Retrieve the recurring plan status to verify that the initial payment has been completed successfully.

The supplied response contains both a ThreeDS.Url with Method: GET and an HTML document that automatically submits a POST form with browser information. The required integration approach should be verified against the supported DigetPay 3DS implementation before production deployment.

PendingPayment Status

Immediately after creating the recurring plan, the API may return:

{
  "RecurringStatus": "PendingPayment",
  "ExecutedTimes": 0
}

This indicates that:

  • The Make Recurring request was accepted.
  • A recurring plan identifier was generated.
  • The initial payment is still pending.
  • No completed payment executions have been recorded.

Important: IsSuccess: true confirms successful processing of the API request, not successful completion of the initial payment.


Recurring Plan Activation

Once the customer completes the initial payment successfully, the recurring plan becomes active.

The merchant can retrieve the updated plan information using the Get Recurring API.

Example: Active Recurring Plan

The following data was returned after the initial payment was completed successfully.

{
  "RecurringId": "RECUR18",
  "RecurringStatus": "Active",
  "RecurringValue": 20,
  "RecurringType": "Monthly",
  "IntervalDays": null,
  "ExecutedTimes": 1,
  "Iteration": 12,
  "RetryCount": 2,
  "LastPayDate": "2026-11-02T09:57:49.852Z",
  "NextPayDate": "2026-12-01T21:00:00.000Z",
  "IsActive": true,
  "RecurringInvoices": [
    {
      "InvoiceId": 7331354,
      "PaymentId": "07077331354392824673",
      "InvoiceStatus": "Paid",
      "Kind": "INITIAL"
    }
  ]
}

This example is an excerpt from the Get Recurring API response.

Understanding the Activation Status

FieldDescription
RecurringStatus: ActiveThe recurring plan is active.
IsActive: trueIndicates that the plan is currently active.
ExecutedTimes: 1One payment execution has been recorded, including the initial payment.
Iteration: 12The configured number of payment iterations.
LastPayDateDate and time of the most recent payment.
NextPayDateDate and time of the next scheduled recurring payment.
InvoiceStatus: PaidThe initial invoice has been paid.
Kind: INITIALIdentifies the initial payment associated with the recurring plan.

Important: Merchants should confirm the recurring plan is active before activating the customer's subscription or providing paid services.


Recurring Payment Flow

sequenceDiagram
    autonumber
    participant Customer
    participant Merchant
    participant DigetPay
    participant Gateway

    Merchant->>DigetPay: POST /payment/s2s/MakeRecurring
    DigetPay->>Gateway: Initiate initial payment
    Gateway-->>DigetPay: Authentication required
    DigetPay-->>Merchant: RecurringId + PendingPayment + ThreeDS

    Merchant-->>Customer: Start 3DS authentication
    Customer->>Gateway: Complete authentication
    Gateway-->>DigetPay: Payment result

    Merchant->>DigetPay: GET /payment/s2s/GetRecurring
    DigetPay-->>Merchant: Active + ExecutedTimes: 1

    Note over DigetPay: Recurring plan activated

    loop Scheduled recurring payments
        DigetPay->>Gateway: Process scheduled charge
        Gateway-->>DigetPay: Payment result
    end

The diagram illustrates the expected recurring payment flow, including the confirmed initial activation sequence. Scheduled renewal execution should be validated separately.


Validation Rules

The supplied Postman collection includes the following validation test cases:

ParameterExpected Behavior
RetryCountValues above 3 are expected to return HTTP 400.
IntervalDaysValues above 180 are expected to return HTTP 400.
IntervalDaysA null value with RecurringType: Custom is expected to return HTTP 400.
RecurringTypeExamples cover Daily, Weekly, Monthly, and Custom.

These rules are based on the supplied Postman test cases and should be verified against actual API responses.


Security Considerations

The S2S Recurring API involves transmitting customer payment card information.

Merchants must:

  • Send requests from a secure backend environment.
  • Keep API keys confidential.
  • Protect cardholder information during transmission.
  • Comply with applicable PCI DSS requirements.
  • Never store CVV/CVC after authorization.
  • Never expose raw card information in application logs or analytics.
  • Verify the final payment result before activating subscriptions.
  • Store RecurringId securely for subscription management.

Related APIs

  • Get Recurring — Retrieve details of an existing recurring plan.
  • List Recurring Plans — Retrieve recurring plans using pagination.
  • Cancel Recurring — Cancel an existing recurring payment plan.

For additional information, refer to the Recurring Payments Overview.

Response
200
Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here!