Skip to main content

Create Subscription

Initiate a recurring payment request.

Endpoint Information

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

Description

To start a subscription, create a standard payment request with isRecurring: 1. You can also define trial periods.

For example: if trialAmount is 10 and trialInterval is 3, the first payment will be 10. After 3 days, the actual recurring payment (e.g., 50) will occur every 30 days.

Authentication

Type: Basic Auth

  • Username: App Key
  • Password: Secret Key

Request Body

Content-Type: application/json

{
"isRecurring": 1,
"recurringInterval": 30,
"recurringAmount": 50,
"trialAmount": 10, // optional
"trialInterval": 3, // optional
"merchantAccountId": "{{your_account_no}}",
"amount": "55.00",
"currency": "USD",
"reference": "DuqXNBv0QQ-13",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"dob": "1990-01-01",
"contactNumber": "+12345678",
"address": "SE",
"country": "Sweden",
"zipCode": "1212"
}

Key Parameters

ParameterTypeRequiredDescription
isRecurringintegerYesSet to 1 to enable
recurringIntervalintegerYesDays between payments
recurringAmountnumberYesAmount for recurring charges
trialAmountnumberNoInitial charge amount
trialIntervalintegerNoDays before recurring starts

Response

Success Response

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