HomeGuidesAPI Reference
API Reference

Recurring

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

The Recurring API allows merchants to charge customers on a recurring basis (e.g., monthly, weekly) for subscription-based services. This is an unscheduled recurring API, giving merchants the flexibility to manage their own billing cycles and call the recurring API as needed.

Recurring payment flow is shown below.

Endpoint

POST https://app-api.edfapay.com/api/v1/payment-gateway/recurring

Content-Type: application/json


Authentication

All requests to this endpoint must include a valid X-API-KEY in the request header for authentication. The X-API-KEY must be sent from the server side and should not be exposed on the client side.

How to generate API key


Request Body

FieldTypeRequiredDescription
transactionIdStringYesUnique identifier for the transaction.
recurringTokenStringYesToken received after the initial transaction with recurring_init=Y.
orderObjectYesOrder details object.
amountDecimalYesTotal transaction amount.

Order Object

FieldTypeRequiredDescription
numberStringYesUnique order number.
amountDecimalYesOrder amount.
currencyStringYesCurrency code in ISO 4217 format (e.g., SAR).
descriptionStringYesDescription of the order.

Example Request

curl --location 'https://app-api.edfapay.com/api/v1/payment-gateway/recurring' \
--header 'accept: */*' \
--header 'X-API-KEY: <Your API Key>' \
--header 'Content-Type: application/json' \
--data '{
  "transactionId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  "recurringToken": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  "order": {
    "number": "12345",
    "amount": 100,
    "currency": "SAR",
    "description": "Order"
  },
  "amount": 10
}'

How to Get recurringToken

To use the Recurring API, the recurringToken must be obtained in advance. This token is provided to the merchant’s notification endpoint under the following conditions:

  1. The initial Initiate API call must include "recurringInit": "Y"
  2. The initial payment must be successful

Response Example

{
    "statusCode": 200,
    "responseBody": {
        "result": "SUCCESS",
        "status": "SUCCESS",
        "payment_id": "XXXXXXXXXXXXXXXXXXXXXXXXXX"
    }
}
Response

Language
URL
LoadingLoading…