> ## 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.

# Submit a payment

> The SDK submits the payment credential; acquiring merges it with the session snapshot and creates the real order through the existing order-create kernel.



## OpenAPI

````yaml /api-reference/openapi.json post /web/v1/session/confirm
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/confirm:
    post:
      tags:
        - Payment session confirm
      summary: Submit a payment
      description: >-
        The SDK submits the payment credential; acquiring merges it with the
        session snapshot and creates the real order through the existing
        order-create kernel.
      operationId: sessionConfirm
      parameters:
        - name: x-sign-verified-mid
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionConfirmRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseSessionConfirmResponse'
components:
  schemas:
    SessionConfirmRequest:
      type: object
      properties:
        sessionId:
          type: string
          description: Payment session id returned by the session create api.
          minLength: 1
        payMethodName:
          type: string
          description: >-
            Pay method name chosen by the user. Required for wallets (APPLEPAY /
            GOOGLEPAY) and other non-card methods. Optional for cards: the
            actual card pay method (e.g. CC_VISA or DC_VISA) is resolved by the
            server from the card BIN.
        confirmToken:
          type: string
          description: >-
            Confirm token returned at the top level of session/info. Send it
            back unchanged.
          minLength: 1
        tokenRequestId:
          type: string
          description: >-
            Token request id returned by the card Element after the card is
            submitted. Waffo looks up the card token by it. Set it only for a
            newly entered card; mutually exclusive with userPaymentAccessToken
            and paymentTokenData.
          maxLength: 64
          minLength: 0
        userPaymentAccessToken:
          type: string
          description: >-
            Waffo card token of an already saved card. Set it only when paying
            with a saved card; mutually exclusive with tokenRequestId and
            paymentTokenData.
          maxLength: 256
          minLength: 0
        paymentTokenData:
          type: string
          description: >-
            Encrypted payment token returned by Apple Pay / Google Pay after
            user authorization. Set it only for wallet payments; mutually
            exclusive with tokenRequestId and userPaymentAccessToken.
          maxLength: 8192
          minLength: 0
        userFields:
          type: object
          additionalProperties:
            type: string
          description: >-
            Values collected by the SDK for the requiredFields list. Key is the
            field path identical to the order create request body, e.g.
            userInfo.userEmail.
      required:
        - confirmToken
        - sessionId
    ResponseSessionConfirmResponse:
      type: object
      description: response data
      properties:
        code:
          type: string
          example: 0
        msg:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/SessionConfirmResponse'
    SessionConfirmResponse:
      type: object
      properties:
        sessionType:
          type: string
          description: >-
            Session type: PAYMENT or SUBSCRIPTION. Read it first, then take the
            matching result group.
        payment:
          $ref: '#/components/schemas/SessionConfirmResponse.PaymentResult'
          description: Payment result, present only when sessionType is PAYMENT.
        subscription:
          $ref: '#/components/schemas/SessionConfirmResponse.SubscriptionResult'
          description: Subscription result, present only when sessionType is SUBSCRIPTION.
    SessionConfirmResponse.PaymentResult:
      type: object
      properties:
        acquiringOrderId:
          type: string
          description: Waffo acquiring order id.
        orderStatus:
          type: string
          description: >-
            Order status, e.g. PAY_IN_PROGRESS / AUTHORIZATION_REQUIRED /
            PAY_SUCCESS / ORDER_CLOSE.
        orderAction:
          type: string
          description: >-
            Redirect instruction, passed through unchanged (3DS redirect or
            cashier fallback).
    SessionConfirmResponse.SubscriptionResult:
      type: object
      properties:
        subscriptionId:
          type: string
          description: Waffo subscription id.
        subscriptionStatus:
          type: string
          description: >-
            Subscription status, e.g. IN_PROGRESS / AUTHORIZATION_REQUIRED /
            ACTIVE / CLOSE.
        subscriptionAction:
          type: string
          description: >-
            Redirect instruction for the first period, passed through unchanged
            (3DS redirect or cashier fallback).

````

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