- HTTP request
- Request body
- Response body
- GooglePaymentToken
- IssuerId
- AccountInfo
- AccountStatus
- TransactionLimits
- TransactionLimit
- Amount
- AccountIds
- AccountAlias
- PhoneNumber
- AccountClosureInfo
- UpdateAssociatedAccountResult
- MissingAccountAliasType
Requests an update to an associated user account.
This method requires that a complete snapshot of the associated account information be provided, along with an update sequence timestamp. The update sequence timestamp is used to determine the most recent update. Updates with an update sequence timestamp older than the current Google record are dropped.
The update sequence timestamp should reflect the time the state of the account was read in milliseconds. The update sequence timestamp must be within +/- 1 min of the Google server time when the request is received, or the request will be rejected with response code 401.
Failed requests may be retried until a 401 response code is received. If a 401 response code is received, the client should refresh the updateSequenceTimestamp prior to retrying the request.
If the endpoint encounters an error while processing the request, the response from this endpoint will be of type
.ErrorResponse
Responses to this query may be empty if this method does not return an HTTP 200. The response body is empty in situations where an
with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return an HTTP 404 with an empty body. If the request signature could be verified, additional information regarding the error will be returned in the response body.ErrorResponse
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 2
},
"requestId": "8a986fe8-5a2c-45a4-a1bb-3bed6e651020",
"requestTimestamp": {
"epochMillis": "1482452962000"
},
"paymentIntegratorAccountId": "InvisiCashUSA_USD"
},
"googlePaymentToken": {
"issuerId": {
"value": "InvisiCashUSA"
},
"token": "xcoNWE23812Sflks9an01%s"
},
"updateSequenceTimestamp": {
"epochMillis": "1482452962000"
},
"accountInfo": {
"accountStatus": "ACCOUNT_AVAILABLE",
"transactionLimits": {
"transactionMaxLimit": {
"limitAmount": {
"amountMicros": "100000000",
"currencyCode": "JPY"
}
}
},
"accountIds": {
"partialAccountNickname": "(XXX) XXX-5555",
"accountAlias": {
"phoneNumber": {
"value": "+15555555555"
}
}
}
}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1482452962840"
}
},
"result": {
"success": {}
}
}
HTTP request
POST https://vgw.googleapis.com/secure-serving/gsp/v2/updateAssociatedAccount/:PIAID
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "requestHeader": { object ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
googlePaymentToken |
REQUIRED: This is the token that both companies will use to identify the account to be updated. |
updateSequenceTimestampMillis |
DEPRECATED: A timestamp describing when this update request was sent. This timestamp is compared to the updateSequenceTimestamp of the current Google record. Updates with an updateSequenceTimestamp older than the current Google record are dropped. |
updateSequenceTimestamp |
REQUIRED: A timestamp describing when this update request was sent. This timestamp is compared to the updateSequenceTimestamp of the current Google record. Updates with an updateSequenceTimestamp older than the current Google record are dropped. |
Union field
|
|
accountInfo |
A complete snapshot of the account information. |
accountClosureInfo |
Information about the closure of a user account held with the integrator. Returning this value will cause the user’s account to be closed with Google. Closed accounts may not be re-opened via UpdateAssociatedAccount. The user will be forced to add a new account by going through the association flow again. |
Response body
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Contains the result of the request. |
GooglePaymentToken
Describes a GooglePaymentToken (GPT), including the token and the issuer of the backing user account.
JSON representation |
---|
{
"issuerId": {
object ( |
Fields | |
---|---|
issuerId |
REQUIRED: The identifier of the issuer of the backing user account. |
token |
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 |
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 via the payment integrator. |
AccountInfo
JSON representation |
---|
{ "accountStatus": enum ( |
Fields | |
---|---|
accountStatus |
REQUIRED: The status of the user’s account with the integrator. |
transactionLimits |
REQUIRED: Defines user scoped transaction limits. |
accountIds |
REQUIRED: Defines a nickname for the user account. |
AccountStatus
Enums | |
---|---|
ACCOUNT_STATUS_UNSPECIFIED |
Do not ever set this default value! |
ACCOUNT_AVAILABLE |
The user’s account held with the integrator is available for transactions. |
ACCOUNT_ON_HOLD |
The account is on hold. |
TransactionLimits
JSON representation |
---|
{
"transactionMaxLimit": {
object ( |
Fields | |
---|---|
transactionMaxLimit |
REQUIRED: Defines the value and currency of a maximum per transaction limit for this account, or states that no maximum per transaction limit exists. |
TransactionLimit
Defines a transaction limit amount or the absence of a limit.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
limitAmount |
The value of the allowable transaction. This is used to determine whether or not the user should be given this integrator as an option to process a specific transaction. |
noLimit |
Indicates that there is no transaction limit. This is used to determine whether or not the user should be given this integrator as an option to process a specific transaction. |
Amount
Associates an amount in micros with a currency code.
JSON representation |
---|
{ "amountMicros": string, "currencyCode": string } |
Fields | |
---|---|
amountMicros |
REQUIRED: An amount in micros. |
currencyCode |
REQUIRED: ISO 4217 3-letter currency code |
AccountIds
JSON representation |
---|
{ "accountAlias": { object ( |
Fields | |
---|---|
accountAlias |
OPTIONAL: An additional account alias the user associates with their vendor account. These are used for Google risk to understand account re-use and account relationships and Google customer operation agents to help customers diagnose issues. These aliases should be user recognizable (for example the user knows this alias because it appears on their statement or appears on the website after they log into the account). |
Union field
|
|
partialAccountNickname |
String by which the user knows this account for display purposes. This is a suffix of the account nickname. For example last four digits of a phone number. Google will indicate in the user interface that this is only a suffix of the nickname. This value will be displayed in UIs like the purchase flow to allow the user to distinguish between payment methods. |
fullAccountNickname |
String by which the user knows this account for display purposes. Unlike This value will be displayed in UIs like the purchase flow to allow the user to distinguish between payment methods. |
AccountAlias
Defines the type and value of an alias that a user associates with their vendor account.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field account_alias . REQUIRED: An account alias the user has with the integrator. account_alias can be only one of the following: |
|
phoneNumber |
The phone number the user has on file with the integrator. |
emailAddress |
The email address the user has on file with the integrator. |
PhoneNumber
An E.164 formatted phone number. Examples include +14035551111 and +918067218000. This will always lead with a + and include only numbers afterwards (no dashes).
JSON representation |
---|
{ "value": string } |
Fields | |
---|---|
value |
REQUIRED: This is a E.164 formatted phone number. Examples include +14035551111 and +918067218000. This will always lead with a + and include only numbers afterwards (no dashes). |
AccountClosureInfo
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
accountTakenOver |
The user’s account held with the integrator has been closed. The integrator suspects the user's account has been taken over. |
fraud |
The user’s account held with the integrator has been closed because of fraud. |
closedByUser |
The account was closed at the request of the user. |
UpdateAssociatedAccountResult
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
success |
The 'UpdateAssociatedAccountRequest' was received successfully by Google. The account will be updated. |
missingAccountAliasType |
A required AccountAlias type is missing |
MissingAccountAliasType
JSON representation |
---|
{ "missingAccountAliasType": string } |
Fields | |
---|---|
missingAccountAliasType |
REQUIRED: If a required AccountAlias type was not provided, the field name corresponding to that type will be given here. |