Method: asynchronousCreateMandate

Triggers the start of a mandate creation operation between a user's account and the integrator. The integrator should acknowledge the request and perform whatever actions need to happen in order to complete the mandate creation (e.g., collect a PIN out of band from the user for confirmation). The integrator will inform Google of the final result by calling the createMandateResultNotification method.

The requestId within the header is the idempotency key and uniquely identifies this transaction. All subsequent operations on this mandate will populate the requestId value in the mandateId field.

If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type ErrorResponse.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 2
    },
    "requestId": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
    "requestTimestamp": {
      "epochMillis": "1502220196077"
    },
    "paymentIntegratorAccountId": "InvisiCashIN_INR"
  },
  "tokenizedInstrumentDetails": {
      "googlePaymentToken": {
        "issuerId": {
            "value": "invisicash"
        },
        "token": "ZXhhbXBsZSB1bmlxdWUgcGF5bWVudCB0b2tlbiB2YWx1ZQ"
      }
  },
  "mandateName": "Google - Music",
  "mandateDescription": "Monthly subscription for Google - Music",
  "startDate": {
    "epochMillis": "1502220194077"
  },
  "endDate": {
    "epochMillis": "1502220196000"
  },
  "maximumAmount": {
    "amountMicros": "728000000",
    "currencyCode": "INR"
  },
  "frequency": {
    "monthly" : {}
  }
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": "1581900013178"
    }
  },
  "result": {
    "acknowledged": {}
  }
}

HTTP request

POST https://www.integratorhost.example.com/integrator-base-path/e-wallets-v2/asynchronousCreateMandate

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "mandateName": string,
  "mandateDescription": string,
  "startDate": {
    object (Timestamp)
  },
  "endDate": {
    object (Timestamp)
  },

  // Union field fopDetails can be only one of the following:
  "tokenizedInstrumentDetails": {
    object (TokenizedInstrumentDetails)
  }
  // End of list of possible types for union field fopDetails.

  // Union field mandate_amount can be only one of the following:
  "fixedAmount": {
    object (Amount)
  },
  "maximumAmount": {
    object (Amount)
  }
  // End of list of possible types for union field mandate_amount.
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

mandateName

string

REQUIRED: The name of the mandate to be displayed to the user. This could be treated like a title of the mandate for the user. This format can be changed without notice and must never be parsed.

mandateDescription

string

REQUIRED: A description of the mandate that can be displayed to the user. This would be an informative explanation of the mandate for the user. This format can be changed without notice and must never be parsed.

startDate

object (Timestamp)

REQUIRED: The start date of the mandate to be created. This is represented as a Timestamp.

This is the first millisecond of the day (in UTC) of the mandate start, 00:00:00.000

endDate

object (Timestamp)

REQUIRED: The end date of the mandate to be created. This is represented as a Timestamp.

This is the first millisecond of the day (in UTC) of the mandate end, 00:00:00.000

Union field fopDetails. REQUIRED: Details regarding the form of payment for which the mandate needs to be created. fopDetails can be only one of the following:
tokenizedInstrumentDetails

object (TokenizedInstrumentDetails)

Details regarding the Tokenized instrument.

Union field mandate_amount. REQUIRED: The amount for which the mandate needs to be created. mandate_amount can be only one of the following:
fixedAmount

object (Amount)

A fixed amount that would be deducted on every recurrence. Every subsequent transaction on this mandate will be for this amount.

maximumAmount

object (Amount)

A maximum amount up to which can be deducted on every recurrence. Subsequent transactions on this mandate could be of any amount less than or equal to this amount.

Response body

This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse, consult the ErrorResponse object and HTTP status codes documentation.

Possible response messages
HTTP 200 Status

object (AsynchronousCreateMandateResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

TokenizedInstrumentDetails

Details about the account for which mandate needs to be created.

JSON representation
{
  "googlePaymentToken": {
    object (GooglePaymentToken)
  }
}
Fields
googlePaymentToken

object (GooglePaymentToken)

REQUIRED: This is the token that both companies will use to identify the account for purchases between each other.

AsynchronousCreateMandateResponse

Response object for the create mandate method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": {
    object (AsynchronousCreateMandateResult)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (AsynchronousCreateMandateResult)

REQUIRED: The result of the asynchronous create mandate call.

AsynchronousCreateMandateResult

Result codes for asynchronousCreateMandate method call.

JSON representation
{

  // Union field result can be only one of the following:
  "acknowledged": {
    object (Empty)
  }
  // End of list of possible types for union field result.
}
Fields
Union field result. REQUIRED: The result must contain exactly one of these messages. result can be only one of the following:
acknowledged

object (Empty)

The mandate creation has been requested and the integrator will do additional steps to determine if the mandate creation was successful or declined. Once the integrator knows the result of the creation, they will inform Google of the result by calling the createMandateResultNotification API.