Method: transferFunds

Initiates money movement between a customer's account held with Google and the payment processor. The combination of requestId within the header and paymentIntegratorAccountId is the idempotency key and uniquely identifies this transaction.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 0,
      "revision": 0
    },
    "requestId": "liUrreQY233839dfFFb24gaQM",
    "requestTimestamp": "1502220434778"
  },
  "googlePaymentToken": {
    "issuerId": {
      "value": "InvisiCash"
    },
    "token": "ZXhhbXBsZSB1bmlxdWUgcGF5bWVudCB0b2tlbiB2YWx1ZQ"
  },
  "transactionDescription": "Google - Music",
  "amount": {
    "amountMicros": "728000000",
    "currencyCode": "INR"
  },
  "payeeProxy": {
    "payeeProxyKey": {
      "qrCode": "QrCode",
      "networkId": "PaymentNetwork1"
    }
  }
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": "1481900013178"
  },
  "result": { "success": {} },
  "paymentIntegratorTransactionId": "aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA"
}

HTTP request

POST https://www.integratorhost.example.com/integrator-base-path/e-wallets-v1/transferFunds

Request body

The request body contains data with the following structure:

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

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

  // Union field funds_destination can be only one of the following:
  "payeeProxy": {
    object (PayeeProxyDestination)
  }
  // End of list of possible types for union field funds_destination.
}
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 transfer

Union field payment_token. REQUIRED: This is the token that both companies will use to identify the tokenized account that was associated during the associateAccount method. This identifies the payer tokenized account in this call. payment_token can be only one of the following:
googlePaymentToken

object (GooglePaymentToken)

Union field funds_destination.

funds_destination can be only one of the following:

payeeProxy

object (PayeeProxyDestination)

Payee that is referenced by a PayeeProxyKey

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 (TransferFundsResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

GooglePaymentToken

Describes a GooglePaymentToken (GPT), including the token and the issuer of the backing user account.

JSON representation
{
  "issuerId": {
    object (IssuerId)
  },
  "token": string
}
Fields
issuerId

object (IssuerId)

REQUIRED: The identifier of the issuer of the backing user account.

token

string

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

IssuerId

A unique identifier for an issuer of user accounts.

JSON representation
{
  "value": string
}
Fields
value

string

REQUIRED: The string value of the identifier. This unique identifier is defined by Google. Google will share a list with the identifiers for all external issuers available through the payment integrator.

PayeeProxyDestination

Destination for Payee that uses a PayeeProxy key to reference a payee.

JSON representation
{
  "payeeProxyKey": {
    object (PayeeProxyKey)
  },
  "payeeProxyLookupRequestId": string
}
Fields
payeeProxyKey

object (PayeeProxyKey)

REQUIRED: Proxy Key that will be used for the Payee.

payeeProxyLookupRequestId

string

OPTIONAL: requestId from a lookup for this PayeeProxyKey (if applicable). This value will be set when there was a DisplayInfo lookup done for this PayeeProxyKey in the context of this transfer.

PayeeProxyKey

ProxyKey that may be used as a Payee if the proxy key is registered with a PayeeProxy directory and may be used to query the registration status or to retrieve display information from the directory.

JSON representation
{
  "networkId": string,

  // Union field proxy_key can be only one of the following:
  "phoneNumber": string,
  "nationalId": {
    object (ProxyKeyNationalId)
  },
  "businessId": string,
  "virtualPaymentAddress": string,
  "qrCode": string
  // End of list of possible types for union field proxy_key.
}
Fields
networkId

string

REQUIRED: Network Id for the payee proxy. For example, 'PaymentNetwork1', 'PaymentNetwork2', etc.

Union field proxy_key. Oneof proxy key for payee proxy key. proxy_key can be only one of the following:
phoneNumber

string

A proxy key that is a phone number.

nationalId

object (ProxyKeyNationalId)

A proxy key that is a national ID number.

businessId

string

A proxy key that is a business ID number.

virtualPaymentAddress

string

A proxy key that is a virtual payment address.

qrCode

string

A proxy key that is a QR code. For example, an EMVCo QR.

ProxyKeyNationalId

A proxy key that is a national ID number.

JSON representation
{
  "nationalId": string,
  "issuingCountryCode": string
}
Fields
nationalId

string

REQUIRED: The value of the national ID number.

issuingCountryCode

string

REQUIRED: ID issuing country's country code, expected to be ISO-3166-1 Alpha-2.

TransferFundsResponse

Response object for the funds transfer method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "paymentIntegratorTransactionId": string,

  // Union field transaction_status can be only one of the following:
  "result": {
    object (TransferFundsResult)
  },
  "resultNotKnownYet": {
    object (TransactionResultNotKnownYet)
  }
  // End of list of possible types for union field transaction_status.
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

paymentIntegratorTransactionId

string

OPTIONAL: This identifier is specific to the integrator and is generated by the integrator. This is the identifier that the integrator knows this transaction by.

For convenience, this identifier is included with in the remittance details

Union field transaction_status. REQUIRED: The result of this funds transfer. transaction_status can be only one of the following:
result

object (TransferFundsResult)

Result of the FundsTransfer operation.

resultNotKnownYet

object (TransactionResultNotKnownYet)

Captures the scenario where the integrator itself doesn't have a definite status, maybe because they have not received it from the underlying payment network.