Embedded Recurring Charge

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

Charge a customer using a previously stored recurring token obtained from an initial recurring-enabled payment.

📘

Recurring payments: Before using this endpoint, you must complete an initial payment with recurring enabled and store the returned recurringToken securely.

Flow

sequenceDiagram
    autonumber
    participant Merchant as Your Server
    participant DigetPay as DigetPay API
    participant Gateway as Payment Gateway

    Note over Merchant: Initial payment created recurringToken
    Merchant->>DigetPay: POST /payment/s2s/recurring
    Note right of Merchant: transactionId<br/>recurringToken<br/>amount + order
    DigetPay->>Gateway: Charge stored token
    Gateway-->>DigetPay: Payment result
    DigetPay-->>Merchant: SUCCESS / DECLINED

Request

MethodPOST
URL{baseUrl}/payment/s2s/recurring
Authx-api-key (required)

Body parameters

FieldTypeRequiredDescription
transactionIdstringYesOriginal gateway transaction ID from the initial payment
recurringTokenstringYesToken received from the initial recurring-enabled payment
amountnumberYesAmount to charge
orderobjectYesOrder information (number, amount, currency, description)
🚧

Important: Use the same transactionId that generated the recurringToken. Tokens cannot be used with unrelated transactions.

Request payload

{
  "transactionId": "c09fba3c-59e2-434a-9ec1-5d2e71a44a8d",
  "recurringToken": "token_from_initial_sale",
  "amount": 50,
  "order": {
    "number": "ORD-REC-001",
    "amount": 50,
    "currency": "SAR",
    "description": "Monthly subscription"
  }
}
❗️

Security: Never expose the recurringToken in browser JavaScript, URLs, mobile applications, or logs. Store it securely on your backend.

Responses

{
  "success": {
    "status": 200,
    "body": {
      "statusCode": 200,
      "responseBody": {
        "result": "SUCCESS",
        "status": "SUCCESS",
        "payment_id": "0808779145497567115585"
      }
    }
  }
}

Response fields

FieldDescription
resultOverall recurring payment result (SUCCESS, DECLINED)
statusCurrent payment status
payment_idGateway payment reference for the recurring charge
decline_reasonReason for failure when the transaction is declined

Successful recurring payment: Treat the payment as successful only when both result and status are SUCCESS.

📘

Best practice: Save the returned payment_id for reconciliation, refunds, and transaction tracking. Monitor recurring payments using webhooks or the appropriate transaction status API.

🚧

If the recurring token becomes invalid, expires, or is revoked by the issuer, the transaction will be declined and a new customer authorization may be required.


Body Params
string
required
string
required
number
required
order
object
required
Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json