Method: listPaymentMethods

  • 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 ListPaymentMethodsSuccessResult 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.

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 (RequestHeader)
  },
  "linkUserAccountRequestId": string
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

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

HTTP 4XX / 5XX Status

object (ErrorResponse)

ListPaymentMethodsResponse

Response object for the listPaymentMethods method.

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

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (ListPaymentMethodsResult)

REQUIRED: Contains the result of the request.

ListPaymentMethodsResult

Contains the result of the request.

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (ListPaymentMethodsSuccessResult)
  },
  "userAccountUnlinked": {
    object (Empty)
  }
  // End of list of possible types for union field result.
}
Fields
Union field result. REQUIRED: Contains the possible result types. Exactly one must be set. result can be only one of the following:
success

object (ListPaymentMethodsSuccessResult)

The request was successful.

userAccountUnlinked

object (Empty)

Declined because the user's account has been unlinked.