Web Top-Up API
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
통합업체는 충전을 위해 사용자를 리디렉션하는 웹 호스트를 구현해야 합니다.
이 충전은 다른 모달리티이지만 Android 충전에서 제공하는 충전과 목적은 동일합니다.
이 웹 호스트에는 모바일 친화적인 웹사이트가 있어야 합니다.
웹 호스트는 사용자 에이전트 헤더 값을 기준으로 모바일 웹 요청과 데스크톱 웹 요청을 비교하여 판단해야 합니다. 모바일 웹 요청으로 제공되는 페이지는 Android 및 iOS에서 모바일 웹에 적합해야 합니다. 사용자 에이전트 헤더 값 외에
클라이언트는 이 사용자가 요청하는 환경 (데스크톱 또는 웹)에 관한
다른 힌트를 제공하지 않습니다.
서버는 GET을 사용하여 HTTPS 프로토콜을 구현해야 합니다. 경로와 호스트는 통합자가 정의할 수 있습니다. 통합자는 URL 길이 2,048자(영문 기준)를 지원해야 합니다. 여기에는 스키마, 호스트, 포트, 경로, 매개변수가 포함됩니다.
모든 매개변수는 URL 인코딩 전에 UTF-8로 인코딩됩니다.
요청
요청이 있을 경우 Google은 다음을 URL 매개변수로 제공합니다.
필드 |
gspMajorVersion
|
int
이 요청의 주 버전 번호입니다.
|
gspTopUpRequest
|
TopUpRedirectRequest
충전 요청
|
gspAssociationId
|
string
사용자가 충전하는 계정의 사용자 인증 정보를 조회하는 데 사용하는 식별자가 포함됩니다. AssociateAccountRequest에서 계정을 연결하는 동안 전송되는 연결 ID입니다.
|
gspCallbackUrl
|
string
Google에서의 충전 흐름을 완료하기 위해 사용자를 리디렉션할 URL입니다. 이 값은 URL로 인코딩됩니다.
|
응답
충전이 완료되면 사용자는 HTTPS GET을 사용하여 gspCallbackUrl
로 리디렉션되어야 합니다. 이 URL에는 다음과 같은 쿼리 매개변수가 있어야 합니다.
필드 |
gspResult
|
int
100
|
충전이 완료되었습니다.
|
201
|
사용자가 흐름을 수동으로 취소했으며 흐름이 중단되어야 합니다.
|
202
|
치명적인 이유로 충전에 실패했으며 흐름을 중단해야 합니다.
|
|
redirectRequestId
|
string
필수: 원래/시작 리디렉션 결제 요청에서 전송된 requestId 입니다. Google에서는 이 URL이 전송된 requestId 과 일치하는지 확인하며, 일치하지 않으면 리디렉션 완료 플로우가 실패합니다.
|
gspTopUpResponse |
RedirectResponse
필수: TopUpRedirectResponse 는 PGP 또는 JWE+JWS를 사용하여 암호화하고 서명해야 합니다. 또한 이 값은 웹에 적합한 base64 로 인코딩되어야 합니다. |
All rights reserved. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-25(UTC)"],[[["Integrators must implement a mobile-friendly web host to facilitate user top-ups, determining mobile vs.desktop requests using the user-agent header."],["The web host must support HTTPS GET requests with URLs up to 2,048 characters and handle UTF-8 encoded parameters provided by Google."],["Google provides URL parameters including version, top-up request details, association ID, and a callback URL for redirecting the user after the top-up."],["Upon 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."]]],["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"]]