| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
DigetPay Checkout Recurring enables merchants to collect subscription payments automatically through DigetPay Hosted Checkout.
Merchants configure the subscription billing frequency and duration in the DigetPay Merchant Dashboard. After the customer's initial successful payment, DigetPay automatically processes subsequent payments according to the configured subscription schedule.
No additional API requests are required from the merchant for scheduled recurring charges.
How Checkout Recurring Works
Step 1 — Configure the Subscription Plan
Before initiating a recurring payment, the merchant must configure recurring payments in the DigetPay Merchant Dashboard.
- Log in to the Merchant Dashboard.
- Enable Recurring Payments.
- Select the subscription billing frequency.
- Configure the subscription duration.
- Save the recurring configuration.
Supported Billing Frequencies
| Frequency | Description |
|---|---|
| Daily | Automatically charge the customer every day. |
| Weekly | Automatically charge the customer every week. |
| Monthly | Automatically charge the customer every month. |
Important: The recurring frequency and subscription duration are configured in the Merchant Dashboard, not in the API request.
Step 2 — Create a Recurring Checkout Session
Once recurring payments are enabled, use the standard Create Payment Link API with payWithRecurring set to true.
Endpoint
POST https://api.digetpay.com/v1/payment/checkout/intiate
Request Example
curl --location 'https://api.digetpay.com/v1/payment/checkout/intiate' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchantOrderId": "SUB-ORDER-1001",
"amount": 100,
"currency": "SAR",
"customerName": "Ahmed Ali",
"customerEmail": "[email protected]",
"customerPhone": "+966501234567",
"payWithRecurring": true,
"successUrl": "https://yourwebsite.com/success",
"failureUrl": "https://yourwebsite.com/failure"
}'Recurring Parameter
| Field | Type | Description |
|---|---|---|
payWithRecurring | boolean | Set to true to enable recurring enrollment through Hosted Checkout. |
The payment amount and customer information are included in the standard checkout request. The subscription frequency does not need to be sent.
Step 3 — Redirect the Customer to Hosted Checkout
When the checkout session is created successfully, DigetPay returns a session ID and redirect URL.
Example Response
{
"id": "e2c723fa-088a-4367-972d-dc2207deb363",
"redirectUrl": "https://pay.digetpay.com/pay/checkout?sessionId=e2c723fa-088a-4367-972d-dc2207deb363"
}Redirect the customer to redirectUrl to complete the initial payment.
Step 4 — Automatic Recurring Payments
After the initial payment succeeds and recurring enrollment is completed, DigetPay automatically processes future payments according to the merchant's configured schedule.
For example, if a merchant configures a monthly subscription:
- The customer completes the initial payment through Hosted Checkout.
- DigetPay processes subsequent charges automatically on the scheduled renewal dates.
- The merchant does not need to submit another Create Payment Link request for each renewal.
- Payments continue until the configured subscription duration ends or the merchant cancels the subscription.
Important: Scheduled recurring payments are handled automatically by DigetPay. The merchant only needs to initiate the recurring-enabled checkout for the customer's initial enrollment.
Step 5 — Manage or Cancel Subscriptions
Merchants can manage their recurring subscriptions directly from the DigetPay Merchant Dashboard.
If a merchant cancels an active subscription, future scheduled charges for that subscription stop.
Subscriptions also stop when their configured duration expires.
Payment Verification
After the initial checkout payment, merchants should verify payment status using the Checkout Status API.
Endpoint
GET https://api.digetpay.com/v1/payment/checkout/status?sessionId={sessionId}
Authentication
x-api-key: YOUR_API_KEY
Merchants should use the appropriate payment notifications and verification mechanisms to track payment outcomes and reconcile their records.
Important: Creating a checkout session does not confirm payment success. Always verify the actual payment result before considering the initial payment completed.
Important Notes
- Recurring Payments must be enabled in the Merchant Dashboard before using this flow.
- Supported billing frequencies include Daily, Weekly, and Monthly.
- The subscription frequency and duration are configured by the merchant.
- Use
payWithRecurring: trueto enroll a customer through Hosted Checkout. - DigetPay automatically processes scheduled renewal payments.
- No additional merchant API request is required for each scheduled renewal.
- The merchant can cancel an active subscription through the Merchant Dashboard.
- Automatic payments stop when the subscription is canceled or reaches its configured end.
- Test and Live API Keys use the same base URL:
https://api.digetpay.com/v1.
Related Documentation
200
