Create S2S Subscription Payment
Create a payment request with recurring billing enabled using Server-to-Server (S2S) integration.
Endpoint Information
Name: Create S2S Subscription Payment
Method: POST
URL: {{base_url}}/api/v1/payment/process-transaction
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,
"subscriptionType": "managed", // self-managed
"customerBrowserUserAgent":"Chrome/96.0.4664.93",
"customerIP":"1.1.1.1",
"card_name": "Przemyslaw Poprawski",
"card": "{{test_card}}",
"secret": "123",
"expiry_date": "06/28"
}
Response
Success Response
{
"success": true,
"message": "Payment Request Processing",
"data": {
"success": true,
"reference_id": "DuqXNBv0014",
"container_type": "redirect",
"redirect_to": "https://api.sandbox.example.com/sessions-interceptor/sid_ymkricibcbeita3hevvc6bxxz4",
"errors": []
}
}