AI-generated Key Takeaways
-
Lists payment methods (eWallets and cards) associated with a linked Partner user account.
-
Requires a
linkUserAccountRequestId
referencing the initial account linking request. -
Returns payment method details including billing address, card information (if applicable), and eWallet account ID (if applicable).
-
Supports Card Payment Data and Android device tokenization features for eligible cards.
-
Responds with an
ErrorResponse
in case of errors during processing.
Lists the payment methods contained within a linked Partner (Payment Integrator) User account.
The response must be "all or nothing", i.e. if it contains a
then it must contain all of the payment methods contained within the user's account. Do not return a partial result. E.g. if there is an error fetching one payment method but the other two succeed, return an error instead of a partial result containing the two successful payment methods.ListPaymentMethodsSuccessResult
Google drives its logic to add, update, or remove payment methods based on the difference of this result from the last successful result.
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": "randomRequestId67890",
"requestTimestamp": {
"epochMillis": "1481899949606"
},
"paymentIntegratorAccountId": "GoldenPartner123"
},
"linkUserAccountRequestId": "qierozie12345"
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481899949611"
}
},
"result": {
"success": {
"paymentMethods": [
{
"billingAddress": {
"addressLine": [
"123 Main St"
],
"localityName": "San Francisco",
"administrativeAreaName": "CA",
"postalCodeNumber": "94105",
"countryCode": "US"
},
"card": {
"cardInfo": {
"accountNumber": {
"value": "1111222233334444"
},
"expiryDate": {
"expiryMonth": "11",
"expiryYear": "25"
}
},
"cardholderFullName": "John Doe",
"cardMetadata": {
"getCardMetadataSuccessResult": {
"paymentCardProductId": {
"value": "F2NR1ZFSL1R8MON"
}
}
},
"cardFeatures": {
"supportsCardPaymentData": {},
"supportsAndroidDeviceTokenization": {}
}
}
},
{
"billingAddress": {
"addressLine": [
"123 Main St"
],
"localityName": "San Francisco",
"administrativeAreaName": "CA",
"postalCodeNumber": "94105",
"countryCode": "US"
},
"eWallet": {
"accountId": "sensitiveEWalletAccountId"
}
}
]
}
}
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/partner-user-account-linking-v1/listPaymentMethods
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"requestHeader": {
object ( |
Fields | |
---|---|
requestHeader |
REQUIRED: Common header for all requests. |
linkUserAccountRequestId |
REQUIRED: A reference to an earlier |
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 |
|
ListPaymentMethodsResponse
Response object for the listPaymentMethods
method.
JSON representation |
---|
{ "responseHeader": { object ( |
Fields | |
---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
REQUIRED: Contains the result of the request. |
ListPaymentMethodsResult
Contains the result of the request.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field result . REQUIRED: Contains the possible result types. Exactly one must be set. result can be only one of the following: |
|
success |
The request was successful. |
userAccountUnlinked |
Declined because the user's account has been unlinked. |