Skip to main content

Recurring Payment

Create a payment request with recurring billing enabled.

Endpoint Information

Name: Payment Request with Recurring Enable
Method: POST
URL: {{base_url}}/api/v1/payment/request

Description

If there is a trial/initial period before the recurring payment starts, then trialAmount and trialInterval should be added. For example: if trialAmount is 10 and trialInterval is 3 then first payment will be 10 and after 3 days, the actual recurring payment of 50 will occur every 30 days.

Authentication

Type: Basic Auth

  • Username: App Key
  • Password: Secret Key

Request Body

Content-Type: application/json

{
"firstName": "John",
"middleName": "",
"lastName": "Doe",
"reference": "DuqXNBv0QQ-13",
"email": "[email protected]",
"dob": "1990-01-01",
"contactNumber": "+12345678",
"address": "SE",
"country": "Sweden",
"state": "N/A",
"city": "N/A",
"zipCode": "1212",
"currency": "USD",
"amount": "55.00",
"ttl": 5,
"tagName": "VIP Tag",
"webhookUrl": "",
"merchantAccountId": "{{your_account_no}}",
"solutionUniqueId": [],
"isRecurring": 1,
"recurringInterval": 30,
"recurringAmount": 50,
"trialAmount": 10,
"trialInterval": 3
}

Response

Success Response

{
"success": true,
"message": "Payment Request Accepted",
"data": {
"payment_url": "https://sgw.paymid.com/checkout-page/38e65db8-5934-48a8-a569-4038c50d1b23"
}
}