- HTTP request
- Request body
- Response body
- PreNotifyUserResponse
- PreNotifyUserResult
- Success
- PreNotificationFailed
- MandateAmountExceeded
Notifies a user of pending transaction for a recurring payment.
This informs the user that a new charge on an existing mandate is pending. This notification must be performed before a new charge and each charge is tied to one notification.
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": 1
},
"requestId": "cmVxdWVzdDE",
"requestTimestamp": {
"epochMillis": "1481899949606"
},
"paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR"
},
"notificationNumber": "AdWords1234",
"notificationDisplayNumber": "Adwords1234",
"customerReferenceId": "customer57",
"recurringPaymentReferenceId": "subscription201",
"mandateId": "MA061B00045154",
"notificationDate": {
"year":2021,
"month":2,
"day":21
},
"dueDate": {
"year":2021,
"month":2,
"day":22
},
"debitDate": {
"year":2021,
"month":2,
"day":22
},
"amount": {
"amountMicros": "728000000",
"currencyCode": "INR"
},
"netAmount": {
"amountMicros": "728000000",
"currencyCode": "INR"
},
"description": "Google TV subscription"
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481899949611"
}
},
"result": {
"success": {
"paymentIntegratorNotificationId": "invoiceid1234"
}
}
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-authenticated-card-fop-api/preNotifyUser
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "requestHeader": { object ( |
Fields | |
---|---|
request |
REQUIRED: Common header for all requests. |
notification |
REQUIRED: A number to associate with the notification for this payment. |
notification |
REQUIRED: This number is associated with the notification and can be displayed to the user.`. |
customer |
REQUIRED: The Google generated customer reference ID that is associated with the mandate for this recurring payment. It is the same ID that is provided when the mandate creation is requested and is unique to that mandate. |
recurring |
REQUIRED: The Google generated recurring payment ID. It is the same ID that is provided when the mandate creation is requested and is unique to that mandate. |
mandate |
REQUIRED: The payment integrator generated ID that represents the mandate for this recurring payment. This is returned in the |
notification |
REQUIRED: Date of when this notification was generated. |
due |
REQUIRED: Date of when the payment is due. |
debit |
REQUIRED: Date of when the payment will be debited. |
amount |
REQUIRED: The amount of the pending payment. |
net |
REQUIRED: The current net amount of the payment, including any discount or late payment penalties, if applicable. |
description |
REQUIRED: A brief description of the payment. |
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 |
|
HTTP 4XX / 5XX Status |
|
PreNotifyUserResponse
Response object for the payment integrator hosted india-cards-v1.preNotifyUser method.
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
response |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Result of this request |
PreNotifyUserResult
The result of the PreNotifyUserResponse.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field pre_notify_user_result_code . Result codes for preNotifyUser . pre_notify_user_result_code can be only one of the following: |
|
success |
The user was or will be notified and the scheduled payment can occur. |
pre |
The user could not be notified and a payment should not occur. |
mandate |
The specified mandate is not currently active and can not be used for payments. |
mandate |
The mandate's amount limit is lower than the proposed charge. |
mandate |
The instrument associated with the mandate on the integrator side is not valid. For example, when a mandate is created on card which is not migrated to a cloud token and deleted from the integrator's end. |
Success
An object to represent a successful preNotifyUserRequest
.
JSON representation |
---|
{ "paymentIntegratorNotificationId": string } |
Fields | |
---|---|
payment |
REQUIRED: A payment integretor created ID for this notification. It will be supplied with the related payment when that payment is made. |
PreNotificationFailed
Object used to convey error responses for when the pre notification failed.
JSON representation |
---|
{ "errorCode": string, "errorType": string, "errorDescription": string } |
Fields | |
---|---|
error |
REQUIRED: Error code. |
error |
REQUIRED: Error type. |
error |
REQUIRED: Error description. |
MandateAmountExceeded
Object used to convey information about a mandate's charge amount if the preNotifyUser
was attempting to charge more than the mandate supports.
JSON representation |
---|
{
"mandateMaximumAmount": {
object ( |
Fields | |
---|---|
mandate |
OPTIONAL: The maximum amount that can be used to charge this mandate. |