> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paymentoptions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 電子ウォレット

> 加盟店が例えばGCashに設定されている場合、ホスト型決済ページ（HPP）は、GCash支払い方法を使用して顧客が取引を完了できるようにEウォレットリンクを生成します。

### 重要なポイント

<Info>
  加盟店設定

  * **GCashの加盟店ID** は、ペイロードに含め、`payment_method` タイプを `gcash` に設定する必要があります。

  * 加盟店がGCashに設定されている場合、HPPはEウォレット決済リンクを生成し、顧客がGCashを通じて支払いを完了できるようにします。[サポートされているEウォレットのすべてを表示...](/documentation/paymentmethods/ewallets)

  Eウォレットリンク

  * HPPは、顧客がGCashを通じて支払うオプションを表示するか、顧客が使用できるEウォレットリンクを生成して提供します。

  * これにより、GCash Eウォレットを使用して取引を完了する顧客にとってスムーズなプロセスが確保されます。
</Info>


## OpenAPI

````yaml api-reference/jp/open-api-config/wallet/e-wallet.json POST /api/v1/server-to-server-interface/hpp/generate/link
openapi: 3.0.1
info:
  title: Payment Options API
  description: ホスト型決済ページ（HPP）リンクの生成と決済処理のためのAPI。
  version: 1.0.0
servers:
  - url: https://api-dev.paymentoptions.com
security:
  - apiKeyAuth: []
    xApiKeyAuth: []
paths:
  /api/v1/server-to-server-interface/hpp/generate/link:
    post:
      summary: ホスト型決済ページ（HPP）リンクの生成
      description: このエンドポイントは、決済処理のためのホスト型決済ページ（HPP）リンクを生成します。
      operationId: generateHppLink
      requestBody:
        description: HPPリンクを生成するためのペイロード。
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - amount
                - currency
                - merchant_id
                - return_url
              properties:
                amount:
                  type: string
                  description: 取引の金額。空の文字列として渡された場合、カード所有者がHPP上で手動で金額を入力します。
                  example: '1000'
                currency:
                  type: string
                  description: 取引の処理通貨の略称（例：PHP＝フィリピンペソ）。
                  maxLength: 3
                  example: PHP
                payment_method:
                  type: object
                  additionalProperties: false
                  description: 決済方法の詳細を含むJSONオブジェクト。
                  properties:
                    type:
                      type: string
                      description: 決済方法の種類（例：ウォレットの場合「gcash」）。
                      maxLength: 128
                      example: gcash
                merchant_txn_ref:
                  type: string
                  description: 加盟店の取引参照ID。
                  maxLength: 45
                  example: qwe
                customer_ip:
                  type: string
                  description: 取引を開始する顧客のIPアドレス。
                  example: 127.0.0.1
                merchant_id:
                  type: string
                  description: 加盟店のユニーク識別子（DASMID）。
                  maxLength: 128
                  example: < Webhook url >
                return_url:
                  type: object
                  additionalProperties: false
                  description: リターンURLを含むJSONオブジェクト。（このフィールドは3Dセキュア取引で必須です。）
                  properties:
                    webhook_url:
                      type: string
                      description: 非同期通知のためのWebhook URL。
                      maxLength: 255
                      example: < Webhook url >
                    success_url:
                      type: string
                      description: 取引成功後にユーザーをリダイレクトするURL。
                      maxLength: 255
                      example: http://www.successurl.com/
                    decline_url:
                      type: string
                      description: 取引失敗後にユーザーをリダイレクトするURL。
                      maxLength: 255
                      example: http://www.declineurl.com/
                    cancel_url:
                      type: string
                      description: 取引キャンセル後にユーザーをリダイレクトするURL。
                      maxLength: 255
                      example: http://cancelurl.com/
                billing_address:
                  type: object
                  additionalProperties: false
                  description: カード所有者の請求先住所を含むJSONオブジェクト。
                  properties:
                    country:
                      type: string
                      description: カード所有者の請求先国コード。
                      maxLength: 2
                      example: JP
                    email:
                      type: string
                      description: カード所有者の請求先メールアドレス。
                      maxLength: 45
                      example: billing@testemail.com
                    phone_number:
                      type: string
                      description: カード所有者の請求先電話番号。
                      maxLength: 15
                      example: '8112345678'
                    address1:
                      type: string
                      description: カード所有者の請求先住所行。
                      maxLength: 199
                      example: 1-2-3 Shinjuku
                    city:
                      type: string
                      description: カード所有者の請求先市区町村。
                      maxLength: 65
                      example: Shinjuku-ku
                    state:
                      type: string
                      description: カード所有者の請求先都道府県。
                      maxLength: 65
                      example: Tokyo
                    postal_code:
                      type: string
                      description: カード所有者の請求先郵便番号。
                      maxLength: 45
                      example: '1600022'
                shipping_address:
                  type: object
                  additionalProperties: false
                  description: カード所有者の配送先住所を含むJSONオブジェクト。
                  properties:
                    country:
                      type: string
                      description: カード所有者の配送先国コード。
                      maxLength: 2
                      example: JP
                    email:
                      type: string
                      description: カード所有者の配送先メールアドレス。
                      maxLength: 45
                      example: shipping@testemail.com
                    phone_number:
                      type: string
                      description: カード所有者の配送先電話番号。
                      maxLength: 15
                      example: '8112345678'
                    address1:
                      type: string
                      description: カード所有者の配送先住所行。
                      maxLength: 199
                      example: 1-2-3 Shinjuku
                    city:
                      type: string
                      description: カード所有者の配送先市区町村。
                      maxLength: 65
                      example: Shinjuku-ku
                    state:
                      type: string
                      description: カード所有者の配送先都道府県。
                      maxLength: 65
                      example: Tokyo
                    postal_code:
                      type: string
                      description: カード所有者の配送先郵便番号。
                      maxLength: 45
                      example: '1600022'
                time_zone:
                  type: string
                  description: 取引のタイムゾーン。
                  example: Asia/Kuala_Lumpur
      responses:
        '200':
          description: HPPリンクが正常に生成されました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 取引参照ID。
                    example: c0728395-6a55-4f10-819e-03bdc917c4b1
                  url:
                    type: string
                    description: 生成されたホスト決済ページのURL。
                    example: >-
                      https://checkout-dev.paymentoptions.com/HostedPaymentPage/GGNDZOmv
                  amount:
                    type: integer
                    description: 取引金額。
                    example: 1000
                  currency:
                    type: string
                    description: 処理通貨。
                    example: PHP
                  merchant_txn_ref:
                    type: string
                    description: 加盟店取引参照ID。
                    example: qwe
                  merchant_id:
                    type: string
                    description: 取引の加盟店ID。
                    example: < Webhook url >
                  merchant_email:
                    type: string
                    description: 加盟店のメールアドレス（利用可能な場合）。
                    example: null
                  return_url:
                    type: object
                    description: 取引結果のリターンURL。
                    properties:
                      webhook_url:
                        type: string
                        description: 通知のためのWebhook URL。
                        example: < Webhook url >
                      success_url:
                        type: string
                        description: 成功時のリダイレクトURL。
                        example: http://www.successurl.com/
                      decline_url:
                        type: string
                        description: 取引失敗時のリダイレクトURL。
                        example: http://www.declineurl.com/
                      cancel_url:
                        type: string
                        description: キャンセル時のリダイレクトURL。
                        example: http://cancelurl.com/
                  billing_address:
                    type: object
                    description: 請求先住所の詳細。
                    properties:
                      city:
                        type: string
                        description: 請求先の市区町村。
                        example: Shinjuku-ku
                      email:
                        type: string
                        description: 請求先メールアドレス。
                        example: billing@testemail.com
                      state:
                        type: string
                        description: 請求先の都道府県。
                        example: Tokyo
                      country:
                        type: string
                        description: 請求先の国。
                        example: JP
                      address1:
                        type: string
                        description: 請求先住所の行。
                        example: 1-2-3 Shinjuku
                      postal_code:
                        type: string
                        description: 請求先の郵便番号。
                        example: '1600022'
                      phone_number:
                        type: string
                        description: 請求先の電話番号。
                        example: '8112345678'
                  shipping_address:
                    type: object
                    description: 配送先住所の詳細。
                    properties:
                      city:
                        type: string
                        description: 配送先の市区町村。
                        example: Shinjuku-ku
                      email:
                        type: string
                        description: 配送先メールアドレス。
                        example: shipping@testemail.com
                      state:
                        type: string
                        description: 配送先の都道府県。
                        example: Tokyo
                      country:
                        type: string
                        description: 配送先の国。
                        example: JP
                      address1:
                        type: string
                        description: 配送先住所の行。
                        example: 1-2-3 Shinjuku
                      postal_code:
                        type: string
                        description: 配送先の郵便番号。
                        example: '1600022'
                      phone_number:
                        type: string
                        description: 配送先の電話番号。
                        example: '8112345678'
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
      description: '認証のためのAPIキー。フォーマット: ''Basic YOUR_API_KEY_HERE'''
    xApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: x-api-key専用のAPIキー。

````