Method: asynchronousCapture

Triggers the start of a money movement operation between a customer's account and the integrator. The integrator should acknowledge the request and perform whatever actions need to happen in order to complete the capture (e.g., collect a PIN from the user). The integrator will inform Google of the capture's final result by calling the CaptureResultNotification API.

The combination of requestId within the header and paymentIntegratorAccountId is the idempotency key and uniquely identifies this transaction. All mutations on this transaction (refunds) populate the requestId value in the captureRequestId field.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 2
    },
    "requestId": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
    "requestTimestamp": {
      "epochMillis": "1502220196077"
    },
    "paymentIntegratorAccountId": "InvisiCashIN_INR"
  },
  "upiDetails": {
      "vpa": "foo@icici"
  },
  "transactionDescription": "Google - Music",
  "amount": {
    "amountMicros": "728000000",
    "currencyCode": "INR"
  }
}

An example response looks like:


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

HTTP request

POST https://www.integratordomain.com/v2/asynchronousCapture

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "transactionDescription": string,
  "amount": {
    object (Amount)
  },

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

object (RequestHeader)

REQUIRED: Common header for all requests.

transactionDescription

string

REQUIRED: This is the description of the transaction that can be put on the customer's statement. Localized to the userLocale found in the requestHeader. This format can be changed without notice and must never be parsed.

amount

object (Amount)

REQUIRED: The amount of the purchase.

Union field fopDetails.

fopDetails can be only one of the following:

upiDetails

object (UpiDetails)

Payment details specific to UPI instruments.

tokenizedInstrumentDetails

object (TokenizedInstrumentDetails)

Payment details specific to Tokenized instruments.

Response body

If successful, the response body contains data with the following structure:

Response object for the capture method.

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

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (AsynchronousCaptureResult)

REQUIRED: The result of the asynchronous capture call.

UpiDetails

Details about the UPI account to capture from.

JSON representation
{
  "vpa": string
}
Fields
vpa

string

REQUIRED: The user's Virtual Payment Address (VPA) used for moving money using the UPI protocol. For example foo@icici.

TokenizedInstrumentDetails

Details about the account to capture from.

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.

AsynchronousCaptureResult

Result codes for asynchronousCapture.

JSON representation
{

  // Union field result can be only one of the following:
  "acknowledged": {
    object (Empty)
  },
  "accountClosed": {
    object (Empty)
  },
  "accountClosedAccountTakenOver": {
    object (Empty)
  },
  "accountOnHold": {
    object (Empty)
  },
  "accountClosedFraud": {
    object (Empty)
  }
  // End of list of possible types for union field result.
}
Fields

Union field result.

result can be only one of the following:

acknowledged

object (Empty)

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

accountClosed

object (Empty)

The user's account held with the integrator has been closed.

Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.

accountClosedAccountTakenOver

object (Empty)

The user's account with the integrator has been closed, suspected account take over.

Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.

accountOnHold

object (Empty)

The account is on hold.

accountClosedFraud

object (Empty)

The user's account held with the integrator has been closed because of fraud.

Returning this value will cause the user's instrument to be closed with Google. The user will be forced to add a new instrument by going through the association flow again.