Create Mandate

This API creates a UPI AutoPay mandate and generates a UPI link for customer approval. You can also configure an automatic debit plan by including the optional plan object in the request.

API Details

ParameterValue
MethodPOST
Endpoint/mandate-create
Base URL{{BASE_URL}}
Content-Typeapplication/json

Authentication

Include the following credentials in the JSON request body. These credentials are available in the WowPe Dashboard.

ParameterLocationTypeMandatoryDescription
clientIdRequest BodyStringYesMerchant Client ID provided in the WowPe Dashboard.
secretKeyRequest BodyStringYesMerchant Secret Key provided in the WowPe Dashboard.

Request Header

HeaderValue
Content-Typeapplication/json

Request Parameters

The following parameters are required or optional in addition to the authentication credentials.

ParameterTypeMandatoryDescription
orderIdStringYesUnique merchant reference for the mandate.
amountNumberYesMaximum or exact amount per debit, depending on amountRule.
amountRuleStringNoAmount rule. Accepted values: MAX or EXACT. Default: MAX.
validityStartString (Date)YesFirst valid date of the mandate. Must be today or a future date. Format: yyyy-MM-ddT00:00:00.
validityEndString (Date)YesLast valid date of the mandate. Must be after validityStart.
mandateNameStringNoName displayed to the customer in the UPI application.
noteStringNoAdditional remarks for the mandate.
purposeStringNoPurpose code. Default: 14.
recurStringNoRecurrence frequency. Default: ASPRESENTED.
recurValueNumberNoDebit day based on the selected recurrence frequency.
recurTypeStringNoRecurrence type: ON, BEFORE, or AFTER. Default: ON.
minAmountNumberNoMinimum debit amount. Must be lower than amount.
revocableStringNoIndicates whether the mandate is revocable. Accepted values: Y or N.
planObjectNoConfiguration for automatic debit plans, including initial, introductory, and recurring debits.

Supported Recurrence Values

The recur parameter accepts the following values:

  • ASPRESENTED
  • ONETIME
  • DAILY
  • WEEKLY
  • FORTNIGHTLY
  • MONTHLY
  • BIMONTHLY
  • QUARTERLY
  • HALFYEARLY
  • YEARLY

Recurrence Configuration

ParameterTypeDescription
recurValueNumberDebit day. For WEEKLY, the accepted range is 1–7; for FORTNIGHTLY, 1–16; and for MONTHLY and longer frequencies, 1–31.
recurTypeStringDefines whether the debit occurs ON, BEFORE, or AFTER the specified recurValue.

Optional plan Object

The optional plan object allows you to configure automatic debit collections after the customer approves the mandate.

ParameterTypeDescription
firstDebitAmountNumberInitial debit amount after mandate approval. validityStart must be the current date.
introDebit.amountNumberAmount for a one-time introductory debit.
introDebit.afterHoursNumberNumber of hours after approval for the introductory debit. Minimum: 24 hours. Alternatively, use introDebit.at.
introDebit.atString (DateTime)Fixed IST date-time for the introductory debit. Must be at least 24 hours and 10 minutes after approval.
recurring.amountNumberAmount for each recurring debit.
recurring.frequencyStringRecurring frequency: DAILY, WEEKLY, FORTNIGHTLY, MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY, or YEARLY.
recurring.dayOfMonthNumberDay of the month for monthly and longer frequencies. Accepted range: 1–31; 1–28 is recommended.
recurring.weekDayNumberDay of the week for weekly or fortnightly frequencies. Monday = 1 and Sunday = 7.
recurring.timeStringRecurring debit time in IST (HH:mm). Default: 10:00.
recurring.startFromStringDetermines when recurring debits begin: AFTER_APPROVAL or AFTER_INTRO. Default: AFTER_INTRO when an introductory debit is configured.
recurring.startDateString (Date)Fixed date for the first recurring debit, instead of using dayOfMonth or weekDay.
recurring.endDateString (Date)Last recurring debit date. Defaults to validityEnd.
recurring.notifyBeforeHoursNumberNotification lead time in hours. Accepted range: 25–71. Default: 26.

Sample Request

Example A: Create Mandate With Automatic Plan

This example creates a mandate with an initial debit, an introductory debit, and monthly recurring debits.

{
  "clientId": "YOUR_CLIENT_ID",
  "secretKey": "YOUR_SECRET_KEY",
  "orderId": "ORD10001",
  "amount": 99,
  "amountRule": "MAX",
  "validityStart": "2026-11-01T00:00:00",
  "validityEnd": "2027-10-31T00:00:00",
  "mandateName": "Monthly plan",
  "note": "Subscription",
  "recur": "ASPRESENTED",
  "plan": {
    "firstDebitAmount": 1,
    "introDebit": {
      "amount": 99,
      "afterHours": 24
    },
    "recurring": {
      "amount": 99,
      "frequency": "MONTHLY",
      "dayOfMonth": 3,
      "time": "10:00",
      "startFrom": "AFTER_INTRO"
    }
  }
}

Example B: Create Mandate Without Automatic Plan

Use this request when you intend to manage individual debits or create a standalone schedule separately.

{
  "clientId": "YOUR_CLIENT_ID",
  "secretKey": "YOUR_SECRET_KEY",
  "orderId": "ORDMANUAL01",
  "amount": 99,
  "amountRule": "MAX",
  "validityStart": "2026-11-01T00:00:00",
  "validityEnd": "2027-10-31T00:00:00",
  "mandateName": "Individual collections",
  "recur": "ASPRESENTED"
}

cURL Request

Save the applicable JSON request body as mandate-create.json and supply your credentials securely on your server.

curl --request POST '{{BASE_URL}}/mandate-create' \
  --header 'Content-Type: application/json' \
  --data-binary '@mandate-create.json'

Replace {{BASE_URL}} with the applicable WowPe API environment URL.

Sample Response

Success Response

The following is an illustrative response for Example A.

{
  "statusCode": 1,
  "message": "Success Plan saved: it starts automatically when the payer approves.",
  "orderId": "ORD10001",
  "mandateRef": "MD261101101530123456",
  "upiurl": "upi://mandate?pa=merchant@yesbank&pn=Merchant&mn=Monthly%20plan&validitystart=01112026&validityend=31102027&am=99.00&amrule=MAX&recur=ASPRESENTED&tr=MD261101101530123456&cu=INR&mc=5411&orgid=000000&mode=13&purpose=14&txnType=CREATE"
}

Response Parameters

ParameterTypeDescription
statusCodeNumberIndicates the API operation status. 0 = Failed, 1 = Succeeded, 2 = Pending.
messageStringProvides the response message, including the automatic plan creation status.
orderIdStringMerchant reference submitted in the request.
mandateRefStringUnique mandate reference generated by the API.
upiurlStringUPI link generated for customer mandate approval.

Error Handling

Status CodeDescriptionAction
0API operation failed.Check the response message and review the request parameters.
2API operation is pending.Use the relevant status API to check the operation outcome.

If a request times out or its outcome is unknown, check the existing operation before submitting another mandate creation request.

Important Notes

  • MAX allows debit amounts up to the authorised mandate limit, while EXACT specifies the exact debit amount.
  • Use the appropriate plan configuration for the intended collection flow.
  • The orderId is your merchant reference, while mandateRef is generated by the API.
  • The returned UPI link must be presented to the customer for approval. Do not construct the link manually.
  • A successful mandate creation response does not confirm customer approval. Use the Mandate Details API to verify that mandateStatus becomes Active.
  • Do not manually initiate a debit that is already configured as firstDebitAmount in the automatic plan.

What's Next

Once the mandate is created, present the returned UPI link to the customer for approval. Then use the Mandate Details API to verify the mandate status.