v1

latestOpenAPI 3.0.02026-07-2431146358.7 KB
Order

Modify Mandate Token

This API is used to either modify certain attributes of an existing mandate or delete a mandate

post/pgsi/ve1_2/mandatetokens/update/create

Headers

BD-Traceidstring required
Example:20201203182838

BD-TraceID is a unique identifier passed by the merchant to ensure request idempotency. Requests with identical BD-TraceID within a 24 hour window would fail.

BD-Timestampstring required
Example:20201203182838

Request timestamp to identify date and time of origin of request. Example, a value of BD-Timestamp 20210113180403 identifies the request to have originated on 13th January 2021 at 06:04:03 PM.

Content-Typestring required
Example:application/json

Request Content-Type to take the values application/jose

Acceptstring required
Example:application/jose

Accept Response Content-Type to take the values application/jose

Request body

mercidstring required

Unique identifier as defined by BillDesk for each merchant

mandateidstring required

Unique mandateid created by BillDesk

action'modify' | 'delete' required

Attribute to specify if the mandate has to be edited or deleted

rustring required

Merchants URL where the customer will be redirected after a transaction is completed

Example request

{
  "mercid": "BDMERCID",
  "mandateid": "MA19E400049927",
  "mandate_edit": {
    "amount": "2400.00",
    "end_date": "2059-12-31"
  },
  "ru": "https://www.merchant.com"
}

Response

OK

objectid'transaction' | 'authentication' | 'mandate' | 'invoice' | 'cardaccount' | 'validatevpa' | 'dispute' | 'settlement' | 'altid' | 'mandate_token' | 'accountvalidation'

String representing the object's type. Objects of the same type share the same value.

mandate_tokenidstring

Unique value generated by BillDesk for each mandate_token created by the merchant

mandateidstring

Unique mandateid created by BillDesk

mercidstring

Unique identifier as defined by BillDesk for each merchant

customer_refidstring

Unique reference of the customer in the merchant system, and can be linked to different subscriptions of the same customer Required for mandate and tokenization

subscription_refidstring

Unique reference assigned by merchant for a subscription

subscription_descstring

Customer friendly description for the subscription, this narration is generally displayed to the customer at the issuer channel

start_datestring date

Subscription start date in yyyy-mm-dd format Note: Should be greater than or equal to current date (IST timezone). Note for UPI : Should be equal to mandate creation date for UPI. In UPI, an subsequent charge is created on a successful mandate. This includes the first charge as well along with mandate creation. Since first charge is done immediately, it is important that the mandate “start_date” should be today’s date

end_datestring date

Subscription end date in yyyy-mm-dd format Note: Should be greater than current date (IST timezone). For mandates that are valid ‘until cancelled’ by the customer, end_date year could be 2099, and for upi, maximum duration allowed for a mandate is 30 years

amountstring

Subscription amount in two decimals, eg. 2400.00

amount_type'maximum' | 'fixed'

Indicates whether subscription amount is fixed or has a maximum limit. The following values are possible • maximum - indicates the maximum amount that can be charged for the subscription • fixed – indicates the fixed amount to be charged for the subscription Please note: For upi, only "maximum" is allowed. This is required to allow for token debit (small value transaction)

currencystring

ISO currency of the transaction amount, for INR this value will be 356

frequency'week' | 'mnth' | 'bimn' | 'qurt' | 'bian' | 'year' | 'adho'

Frequency at which the subscription debits will be processed, possible values are: •week - weekly •mnth - monthly •bimn – bi-monthly •qurt - quarterly •bian – bi-annually •year - yearly •adho – adhoc

createdonstring date-time

object creation timestamp

rustring

Merchants URL where the customer will be redirected after a transaction is completed

statusstring

Represents the status of the mandate and depends upon the linked payment method.

The following values are possible: card, upi • initiated - mandate request has been initiated, and this status is applicable for the SDK based workflow • pending - mandate request has been initiated and the linked payment method is not yet validated • active – linked payment method has been validated and recurring charges can be processed • rejected - mandate has been rejected by the issuer or payment provider • deleted - mandate has been deleted by the customer from the merchant channel • cancelled – mandate has been stopped by customer from the issuer channel • suspended – mandate has been temporarily suspended by the issuer or payment provider bankaccount • pending – mandate request has been sent for account verification to NPCI • active – mandate is active and recurring charges can be processed • delete_initiated – mandate delete request is initiated by the customer or the merchant • deleted – mandate is deleted after confirmation from NPCI • rejected – mandate is rejected by NPCI

recurrence_rule'after'

Note: Required only where payment_method_type = upi. Default value : 'after'

debit_day'1'

Required only where payment_method_type = upi. Default value "1" to be passed

action'modify' | 'delete'
payment_method_typestring
next_step'redirect' | 'capture_otp' | '3ds2_challenge' | '3ds2_frictionless'

Refers to the action to be taken by the merchant, for eg. redirect or capture_otp

Example response

{
  "mandateid": "MA19E400049927",
  "mercid": "BDMERCID",
  "customer_refid": "CSREF00001",
  "subscription_refid": "SUBREF101",
  "subscription_desc": "Unlimited Plan",
  "start_date": "2021-05-08",
  "end_date": "2059-12-31",
  "amount": "2400.00",
  "ru": "https://www.merchant.com",
  "additional_info": {
    "additional_info1": "Details1",
    "additional_info2": "Details2",
    "additional_info3": "Details3",
    "additional_info4": "Details4",
    "additional_info5": "Details5",
    "additional_info6": "Details6",
    "additional_info7": "Details7"
  },
  "customer": {
    "first_name": "John",
    "last_name": "Doe",
    "mobile": "9022979988",
    "email": "abc@xyz.com"
  },
  "device": {
    "user_agent": "Mozilla/5.0(WindowsNT10.0;WOW64;rv: 51.0)Gecko/20100101Firefox/51.0",
    "accept_header": "application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
  },
  "debit_day": "1",
  "mandate_edit": {
    "end_date": "2059-12-31",
    "amount": "2400.00"
  },
  "links": [
    {
      "parameters": {
        "mercid": "BDMERCID"
      }
    }
  ]
}