- HTTP request
- Request body
- Response body
- AccountInfo
- AccountStatus
- AccountIds
- AccountClosureInfo
- UpdateAssociatedAccountResponse
- 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 ErrorResponse
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.
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 1
},
"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/gsp/carriers-v1/updateAssociatedAccount/:PIAID
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "requestHeader": { object (RequestHeader) }, "googlePaymentToken": { object (GooglePaymentToken) }, "updateSequenceTimestampMillis": { object (Timestamp) }, "updateSequenceTimestamp": { object (Timestamp) }, // Union field |
Fields | |
---|---|
request |
REQUIRED: Common header for all requests. |
google |
REQUIRED: This is the token that both companies will use to identify the account to be updated. |
update |
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. |
update |
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
|
|
account |
A complete snapshot of the account information. |
account |
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
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 |
|
AccountInfo
JSON representation |
---|
{ "accountStatus": enum ( |
Fields | |
---|---|
account |
REQUIRED: The status of the user’s account with the integrator. |
transaction |
REQUIRED: Defines user scoped transaction limits. |
account |
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. |
AccountIds
JSON representation |
---|
{ "accountAlias": { object (AccountAlias) }, // Union field |
Fields | |
---|---|
account |
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
|
|
partial |
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. |
full |
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. |
AccountClosureInfo
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
account |
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. |
closed |
The account was closed at the request of the user. |
UpdateAssociatedAccountResponse
JSON representation |
---|
{
"responseHeader": {
object (ResponseHeader)
},
"result": {
object ( |
Fields | |
---|---|
response |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Contains the result of the request. |
UpdateAssociatedAccountResult
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
success |
The 'UpdateAssociatedAccountRequest' was received successfully by Google. The account will be updated. |
missing |
A required AccountAlias type is missing |
MissingAccountAliasType
JSON representation |
---|
{ "missingAccountAliasType": string } |
Fields | |
---|---|
missing |
REQUIRED: If a required AccountAlias type was not provided, the field name corresponding to that type will be given here. |