# Match deposit

> Match a deposit transaction.

```yaml
openapi: 3.1.0
x-onerway-docs-version: original
x-onerway-spec-key: embedded-finance/deposits/match-deposit
info:
  title: Match deposit
  version: original
  description: Match a deposit transaction.
servers:
  - url: https://sandbox-baas.onerway.com/embedded-finance
    description: sandbox
  - url: https://baas.onerway.com
    description: production
paths:
  /api/v2/deposit/match:
    post:
      summary: Match deposit
      description: Match a deposit transaction.
      parameters:
        - name: apiKey
          in: header
          required: true
          description: API key assigned for Embedded Finance API access.
          schema:
            type: string
            description: API key assigned for Embedded Finance API access.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: integer
                  description: ID of the user associated with the deposit.
                rechargeId:
                  type: integer
                  description: Recharge ID to match with the deposit.
                sourceOrderNo:
                  type: string
                  description: Merchant order number.
                  x-onerway-constraints:
                    - kind: range
                      max: 64
                      unit: characters
              required:
                - userId
                - rechargeId
            examples:
              default:
                summary: Match a deposit
                value:
                  userId: 12345678
                  rechargeId: 2098358000329
                  sourceOrderNo: example_order_001
      responses:
        "200":
          description: Risk review passed; awaiting deposit matching result
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Response code returned by Onerway. `20000` indicates that the
                      request succeeded.
                  respMsg:
                    type: string
                    description: Human-readable response message.
                  data:
                    type: object
                    properties:
                      merchantNo:
                        type: string
                        description: Merchant number associated with the request.
                      userId:
                        type: integer
                        description: ID of the user associated with the deposit.
                      status:
                        type: string
                        description: Risk review status for the deposit match.
                        enum:
                          - S
                          - P
                        x-enum-descriptions:
                          S: Risk review passed. The deposit matching result will be reported through the
                            [Deposit matching
                            result](/embedded-finance/api-reference/webhooks/match-deposit-result)
                            webhook.
                          P: Risk review did not pass, and the request has been referred to compliance;
                            the deposit matching result is not yet determined.
                            Once compliance approves or rejects the request, the
                            result will be reported through the [Deposit
                            matching
                            result](/embedded-finance/api-reference/webhooks/match-deposit-result)
                            webhook. If additional documents are required, you
                            will receive a [Deposit matching information
                            request](/embedded-finance/api-reference/webhooks/match-deposit-rfi)
                            webhook and must respond through the [Deposit RFI
                            additional
                            materials](/embedded-finance/api-reference/endpoints/submit-deposit-rfi-response)
                            endpoint.
                    description: Deposit matching status returned for a successful request.
              examples:
                waiting:
                  summary: Risk review passed; awaiting deposit matching result
                  value:
                    respCode: "20000"
                    respMsg: Success
                    data:
                      merchantNo: 800***
                      userId: 12345678
                      status: S
      security:
        - apiKeyAuth:
            []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
```
