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

# Get payment session info

> Returns what the Waffo Element SDK needs before starting a payment: the wallet payload, the amount shown to the user, the confirm token and the fields still to collect.



## OpenAPI

````yaml /api-reference/openapi.json post /web/v1/session/info
openapi: 3.1.0
info:
  title: acquiring-order
  description: 接口文档
  termsOfService: https://www.waffo.com
  version: 1.0.0
servers:
  - url: https://waffo.com
    description: Sandbox API (auto-signed via waffo.com signing proxy)
security: []
tags:
  - name: Subscription inquiry
    description: Subscription inquiry api description
  - name: Subscription manage
    description: >
      This API allows the merchant to request a subscription management URL from
      Waffo

      Waffo will generate a subscription management URL which merchant can
      redirect user to this URL for managing subscription details (e.g. view
      subscription detail and cancel subscription). This management URL has a
      fixed expiration time (e.g., 1 day).
  - name: Subscription change inquiry
    description: >
      This API allows merchants to query the status of a subscription change
      (upgrade/downgrade) request.

      此接口允许商户查询订阅升降级请求的状态。
  - name: Subscription resume
    description: >
      Revoke a scheduled cancellation before it takes effect, so that the
      subscription keeps renewing. The next billing date stays unchanged.
  - name: Subscription update
    description: ' Subscription update api description'
  - name: Payment session update
    description: Payment session update api description
  - name: Order inquiry
    description: Order inquiry api description
  - name: Payout inquiry
    description: Payout inquiry api description
  - name: Order create
    description: ' Order create api description'
  - name: Pay Method Config Inquiry
    description: Pay Method Config Inquiry api description
  - name: Payment session create
    description: Payment session create api description
  - name: Order cancel
    description: Order cancel api description
  - name: Order capture
    description: Order capture api description
  - name: Subscription session create
    description: Subscription session create api description
  - name: Chargeback list
    description: Chargeback list api description
  - name: Payout create
    description: Payout create api description
  - name: Subscription session update
    description: Subscription session update api description
  - name: Payment session confirm
    description: Payment session confirm api description
  - name: Payment session validate
    description: Payment session validate api description
  - name: Payment session info
    description: Payment session info api description
  - name: Chargeback file download
    description: Chargeback file download api description
  - name: Subscription change
    description: >
      This API allows merchants to upgrade or downgrade a user's subscription
      plan. The change request will create a new subscription based on the
      original subscription, applying any remaining amount from the original
      subscription.


      此接口允许商户升级或降级用户的订阅计划。升降级请求将基于原订阅创建新订阅，并将原订阅的剩余金额应用到新订阅中。
  - name: Chargeback accept
    description: Chargeback accept api description
  - name: Chargeback file upload
    description: Chargeback file upload api description
  - name: Chargeback update
    description: Chargeback update api description
  - name: Wallet inquiry
    description: Wallet inquiry api description
  - name: Order refund
    description: Order refund api description
  - name: Refund inquiry
    description: Refund inquiry api description
  - name: Subscription cancel
    description: >
      Cancel an active subscription when the merchant no longer wishes to
      continue the recurring billing cycle. This endpoint can only be invoked
      when the subscription status is active
  - name: Merchant config inquiry
    description: Merchant config inquiry api description
  - name: Chargeback inquiry
    description: Chargeback inquiry api description
  - name: Subscription create
    description: Subscription create api description
  - name: Reported Fraud list
    description: Reported Fraud list api description
paths:
  /web/v1/session/info:
    post:
      tags:
        - Payment session info
      summary: Get payment session info
      description: >-
        Returns what the Waffo Element SDK needs before starting a payment: the
        wallet payload, the amount shown to the user, the confirm token and the
        fields still to collect.
      operationId: sessionInfo
      parameters:
        - name: x-sign-verified-mid
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionInfoRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseSessionInfoResponse'
components:
  schemas:
    SessionInfoRequest:
      type: object
      properties:
        sessionId:
          type: string
          description: Payment session id returned by the session create api.
          minLength: 1
        payMethodNames:
          type: array
          description: >-
            Pay method names to fetch. Wallets use APPLEPAY / GOOGLEPAY, cards
            use the brand name such as CC_VISA. Omit it to get every pay method
            available on this session.
          items:
            type: string
        needTokenSession:
          type: boolean
          description: >-
            Set it only when a card tokenization session is actually needed;
            deriving one is a real downstream call.
      required:
        - sessionId
    ResponseSessionInfoResponse:
      type: object
      description: response data
      properties:
        code:
          type: string
          example: 0
        msg:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/SessionInfoResponse'
    SessionInfoResponse:
      type: object
      properties:
        confirmToken:
          type: string
          description: >-
            Confirm token for this session. Send it back unchanged when
            submitting the payment.
        quoteExpiresAt:
          type: integer
          format: int64
          description: >-
            Earliest quote expiry among all pay methods, in epoch milliseconds.
            Refresh the session after it passes.
        tokenSessionId:
          type: string
          description: >-
            Card tokenization session id for this session. Filled only when
            needTokenSession is set on the request.
        card:
          $ref: '#/components/schemas/SessionInfoResponse.SessionPayMethod'
          description: >-
            Card pay methods of this session merged into one entry, since the
            SDK renders a single card form. Null when this session has no card
            pay method.
        payMethods:
          type: array
          description: >-
            Per pay method information needed to start the payment. Card pay
            methods are not listed here, they are in card.
          items:
            $ref: '#/components/schemas/SessionInfoResponse.SessionPayMethod'
        desc:
          type: string
          description: >-
            Description the merchant gave when creating the session, for
            display: orderDescription of a payment session, or
            productInfo.description of a subscription session. Named desc to
            match the cashier order query.
        sessionType:
          type: string
          description: >-
            Session type: PAYMENT for a session created by order/session/create,
            SUBSCRIPTION for one created by subscription/session/create.
    SessionInfoResponse.SessionPayMethod:
      type: object
      properties:
        payMethodType:
          type: string
          description: >-
            Pay method type, such as APPLEPAY or EWALLET. The merged card entry
            uses CARD.
        payMethodName:
          type: string
          description: >-
            Pay method name. Send it back unchanged as payMethodName in
            session/confirm. Wallets use APPLEPAY / GOOGLEPAY. Null on the
            merged card entry, whose candidates are in cardPayMethodNames.
        payMethodCashierName:
          type: string
          description: >-
            Pay method name to display, same as the cashier page shows: the
            configured display name of this pay method, falling back to
            payMethodName when none is configured. Null on the merged card
            entry, which stands for several card pay methods.
        cardPayMethodNames:
          type: array
          description: >-
            Card pay method names available on this session, deduplicated, e.g.
            CC_VISA / DC_MASTERCARD. Filled only on the merged card entry, empty
            elsewhere. These are pay method names, not card brands: one brand
            splits into a credit and a debit name, so Visa appears as both
            CC_VISA and DC_VISA. Derive the card scheme and funding type from
            the card number and send the matched name back as payMethodName in
            session/confirm; a value not in this list is rejected.
          items:
            type: string
        body:
          type: string
          description: >-
            Wallet payment sheet payload. Null for pay methods whose channel
            asks for none.
        userAmount:
          type: string
          description: Amount the user pays with this pay method, as a decimal string.
        userCurrency:
          type: string
          description: Currency the user pays in.
        requiredFields:
          type: array
          description: Fields the user still has to fill in for this pay method.
          items:
            $ref: '#/components/schemas/SessionInfoResponse.SessionRequiredFieldView'
        userFeeAmount:
          type: string
          description: >-
            User fee charged on this pay method, as a decimal string in
            userCurrency. Already included in userAmount, do not add it again.
            Null when there is no user fee.
        quoteExpiresAt:
          type: integer
          format: int64
          description: >-
            Quote expiry of this entry's amount, in epoch milliseconds. On the
            merged card entry it is the earliest among its card pay methods.
            Refresh the session after it passes.
    SessionInfoResponse.SessionRequiredFieldView:
      type: object
      properties:
        field:
          type: string
          description: Field path, identical to the one in the order create request body.
        required:
          type: boolean
          description: >-
            Always true: the payment consult only reports missing mandatory
            fields.
        options:
          type: array
          description: >-
            Allowed values, for example the bank list of a bank transfer. Empty
            when the field is free text.
          items:
            $ref: '#/components/schemas/SessionInfoResponse.SessionFieldOptionView'
        value:
          type: string
          description: >-
            Current value to prefill, editable by the user. Null when there is
            nothing to prefill.
        challengeMethod:
          type: string
          description: >-
            How the filled value must be verified, e.g. EMAIL_OTP_CHALLENGE for
            an email one-time code. Null when filling it in is enough. When set,
            payment completion is handed to the Waffo cashier page for
            verification.
    SessionInfoResponse.SessionFieldOptionView:
      type: object
      properties:
        name:
          type: string
          description: Option label.
        code:
          type: string
          description: Option value.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.