Web Top-Up API
Stay organized with collections
Save and categorize content based on your preferences.
Integrators must implement a web host to redirect the users for top-up purposes.
This top-up is a different modality, but the same purpose as the top-up provided
by
Android Top-ups.
This web host must have a mobile-friendly web site.
The web host must determine mobile web requests vs desktop web requests based on
the user-agent header value. The page delivered on mobile web requests must be
mobile web friendly on Android and iOS. Beside the user-agent header value, the
client will provide you no other hint as to the environment where this user is
making the request (desktop or web).
The server must implement an HTTPS protocol using GET. The path and host are
definable by the integrator. The integrator must support URL lengths of 2,048
chars. This includes the scheme, host, port, path and parameters.
All parameters will be UTF-8 encoded prior to being URL-encoded.
Request
Upon request, Google provides the following as URL parameters:
Fields |
gspMajorVersion
|
int
Major version number for this request.
|
gspTopUpRequest
|
TopUpRedirectRequest
Top-up request.
|
gspAssociationId
|
string
Contains an identifier that the integrator uses to look up credentials
for the account that the user is topping up. This is the association ID
that is sent during account linking in the AssociateAccountRequest.
|
gspCallbackUrl
|
string
URL to redirect the user to in order to finish the top-up flow on
Google. This value is url encoded.
|
Response
Upon completion of the top-up, the user must be redirected to the
gspCallbackUrl
using HTTPS GET. This URL must have the following query
parameters:
Fields |
gspResult
|
int
100
|
Top-up was successful.
|
201
|
User canceled the flow manually and the flow should be aborted.
|
202
|
Top-up failed for a fatal reason and the flow should be
aborted.
|
|
redirectRequestId
|
string
REQUIRED: The requestId sent in the original/initiating redirect payment request. Google will verify this matches the sent requestId , and the Complete Redirect flow will fail if it doesn't match.
|
gspTopUpResponse |
RedirectResponse
REQUIRED: The TopUpRedirectResponse should be encrypted and signed using PGP or JWE+JWS. Further, this value should be web-safe base64 encoded. |
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-03 UTC."],[[["\u003cp\u003eIntegrators must implement a mobile-friendly web host to facilitate user top-ups, determining mobile vs.desktop requests using the user-agent header.\u003c/p\u003e\n"],["\u003cp\u003eThe web host must support HTTPS GET requests with URLs up to 2,048 characters and handle UTF-8 encoded parameters provided by Google.\u003c/p\u003e\n"],["\u003cp\u003eGoogle provides URL parameters including version, top-up request details, association ID, and a callback URL for redirecting the user after the top-up.\u003c/p\u003e\n"],["\u003cp\u003eUpon top-up completion, redirect the user to the provided callback URL with parameters indicating the result, original request ID, and an encrypted, signed, and base64-encoded top-up response.\u003c/p\u003e\n"]]],["Integrators must set up a mobile-friendly web host using HTTPS GET to handle user top-up redirects, similar to Android top-ups. The host must distinguish between mobile and desktop requests via the user-agent header, supporting URLs up to 2,048 characters. Upon request, Google provides parameters like `gspMajorVersion`, `gspTopUpRequest`, `gspAssociationId`, and `gspCallbackUrl`. Upon top-up completion, users must be redirected to the `gspCallbackUrl` with `gspResult` (status), `redirectRequestId`, and a `gspTopUpResponse` (encrypted and signed).\n"],null,["# Web Top-Up API\n\nIntegrators must implement a web host to redirect the users for top-up purposes.\nThis top-up is a different modality, but the same purpose as the top-up provided\nby\n[Android Top-ups](/standard-payments/v1/payment-integrator-hosted-api/top-up-redirect/android-api).\nThis web host must have a mobile-friendly web site.\n\nThe web host must determine mobile web requests vs desktop web requests based on\nthe user-agent header value. The page delivered on mobile web requests must be\nmobile web friendly on Android and iOS. Beside the user-agent header value, the\nclient will provide you no other hint as to the environment where this user is\nmaking the request (desktop or web).\n\nThe server must implement an HTTPS protocol using GET. The path and host are\ndefinable by the integrator. The integrator must support URL lengths of 2,048\nchars. This includes the scheme, host, port, path and parameters.\n\nAll parameters will be UTF-8 encoded prior to being URL-encoded.\n\nRequest\n-------\n\nUpon request, Google provides the following as URL parameters:\n\n| Fields ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `gspMajorVersion` | `int` Major version number for this request. |\n| `gspTopUpRequest` | [TopUpRedirectRequest](/pay/e-wallets-v1/payment-integrator-e-wallets-api/TopUpRedirectRequest) Top-up request. |\n| `gspAssociationId` | `string` Contains an identifier that the integrator uses to look up credentials for the account that the user is topping up. This is the association ID that is sent during account linking in the AssociateAccountRequest. |\n| `gspCallbackUrl` | `string` URL to redirect the user to in order to finish the top-up flow on Google. This value is url encoded. |\n\nResponse\n--------\n\nUpon completion of the top-up, the user must be redirected to the\n`gspCallbackUrl` using HTTPS GET. This URL must have the following query\nparameters:\n\n| Fields ||\n|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `gspResult` | `int` |-------|------------------------------------------------------------------| | `100` | Top-up was successful. | | `201` | User canceled the flow manually and the flow should be aborted. | | `202` | Top-up failed for a fatal reason and the flow should be aborted. | |\n| redirectRequestId | `string` **REQUIRED** : The `requestId` sent in the original/initiating redirect payment request. Google will verify this matches the sent `requestId`, and the Complete Redirect flow will fail if it doesn't match. |\n| `gspTopUpResponse` | [`RedirectResponse`](/pay/e-wallets-v1/google-e-wallets-api/TopUpRedirectResponse) **REQUIRED** : The `TopUpRedirectResponse` should be encrypted and signed using **PGP** or **JWE+JWS** . Further, this value should be web-safe `base64` encoded. |"]]