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

# Create Payment

> Create new Payment (off-session) for an existing `payment_method_id`.

To iniitate an off-session payment, a user (sender) must have `autopay_consent` = `true` (set via the Payment Link flow or Mandate setup flow), and a valid payment method (Mandate or Card).

To initiate an on-session payment for a user (sender) with a stored payment method but `autopay_consent` = `false`, use `POST /payment_links` instead (passing the user's `external_user_id`).

**Authorization**: `customer_token`

## Request headers

### payment_details (object, required)

Details describing the payment.

## Response fields

The response is a Payment object.

Refer to Payment object data model in `GET /payments/{payment_id}`.



## OpenAPI

````yaml /api-reference/openapi.json post /payments
openapi: 3.0.0
info:
  description: Documentation of the early finverse services
  title: Finverse Public
  termsOfService: https://example.com
  contact:
    name: Maintainers
    email: info@finverse.com
  license:
    name: unknown license
  version: 0.0.1
servers:
  - url: https://api.prod.finverse.net
security:
  - Oauth2:
      - test
tags:
  - name: public
    description: Publicly accessible endpoints
    x-group: Public
  - name: customer
    description: Customer app and institution endpoints
    x-group: Customer
  - name: link
    description: Finverse Link flows
    x-group: Link
  - name: login_identity
    description: Login identity lifecycle and metadata
    x-group: Login identity
  - name: accounts
    description: Accounts, balances, and account numbers
    x-group: Accounts
  - name: statements
    description: Statements and composite statements
    x-group: Statements
  - name: transactions
    description: Transaction history
    x-group: Transactions
  - name: identity_income
    description: Identity and income insights
    x-group: Identity & income
  - name: payment_links
    description: Payment link creation and checkout
    x-group: Payment links
  - name: mandates
    description: Direct debit mandates
    x-group: Mandates
  - name: payments
    description: Payment initiation and status
    x-group: Payment operations
  - name: payouts
    description: Payouts and scheduled payouts
    x-group: Payouts
  - name: payment_users
    description: Payment user profiles
    x-group: Payment users
  - name: payment_accounts
    description: Payment accounts for users
    x-group: Payment accounts
  - name: payment_methods
    description: Stored payment methods
    x-group: Payment methods
  - name: bills
    description: Bill presentment
    x-group: Bills
  - name: disputes
    description: Payment disputes
    x-group: Disputes
  - name: ledger
    description: Ledger and statements
    x-group: Ledger
paths:
  /payments:
    post:
      tags:
        - payments
      summary: Create Payment
      description: >-
        Create new Payment (off-session) for an existing `payment_method_id`.


        To iniitate an off-session payment, a user (sender) must have
        `autopay_consent` = `true` (set via the Payment Link flow or Mandate
        setup flow), and a valid payment method (Mandate or Card).


        To initiate an on-session payment for a user (sender) with a stored
        payment method but `autopay_consent` = `false`, use `POST
        /payment_links` instead (passing the user's `external_user_id`).


        **Authorization**: `customer_token`


        ## Request headers


        ### payment_details (object, required)


        Details describing the payment.


        ## Response fields


        The response is a Payment object.


        Refer to Payment object data model in `GET /payments/{payment_id}`.
      operationId: createPayment
      parameters:
        - description: >-
            A random key provided by the customer, per unique payment. The
            purpose for the Idempotency key is to allow safe retrying without
            the operation being performed multiple times.
          name: Idempotency-Key
          in: header
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentRequest'
            examples:
              create_payment:
                summary: Create Payment
                value:
                  amount: 6969
                  currency: AUD
                  metadata:
                    key: value
                    branch: branch1
                  payment_details:
                    description: Test payment
                    external_transaction_reference: '{{$timestamp}}'
                  payment_method_id: '{{payment_method_id}}'
              create_mandate_payment_payment_rejected_scenario:
                summary: 'Create Mandate Payment: PAYMENT_REJECTED scenario'
                value:
                  amount: 500
                  currency: HKD
                  metadata:
                    key: value
                    employer_name: Apple Inc
                  payment_details:
                    description: Test payment
                    external_transaction_reference: '{{$timestamp}}'
                  payment_method_id: '{{payment_method_id}}'
        description: request body for creating payment
        required: true
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
              examples:
                mandate_payment_processing:
                  summary: Success (mandate payment processing)
                  value:
                    amount: 500
                    created_at: '2024-08-16T15:27:41.534Z'
                    currency: HKD
                    fees:
                      - amount: 500
                        currency: HKD
                        paid_by: RECIPIENT
                        paid_by_account_id: 01H5VH5YCFDVH80YZ8D0TG3HET
                    metadata:
                      employer_name: Apple Inc
                      key: value
                    payment_details:
                      collection_entity_name: Finverse Technologies Limited
                      description: Test payment
                      external_transaction_reference: '1723822061'
                      mandate_id: 01HW1W33TGWTZHNE0CR4VNB4WB
                      processor_entity_name: Finverse Technologies Limited
                      transaction_reference_id: '1723822061'
                    payment_id: 01J5DWTDMNNGT58N913GSZPKPP
                    payment_method_id: 01HW1W33X48J0SVTMM344K6SPD
                    recipient:
                      name: Demo App
                    recipient_account:
                      account_id: 01H5VH5YCFDVH80YZ8D0TG3HET
                      account_type: SETTLEMENT_ACCOUNT
                    sender:
                      external_user_id: user_id_1||1713754935
                      name: John Doe
                      user_details: []
                      user_id: 01HW1W246Y9MSN22T50J3CD04T
                      user_type: INDIVIDUAL
                    sender_account:
                      account_id: 01HW1W3MH68XRDS9W2XFZMJJEP
                      account_number:
                        number: 01HW1W3MQ339JXA66JF8P62042
                        type: LOCAL
                      account_number_masked: 939XXXXXX94
                      account_type: EXTERNAL_ACCOUNT
                      accountholder_name: 01HW1W3MP3VMSTFR7FSB2YJ50F
                      bank_code: '420'
                      institution_id: testbank-dbs-hk
                      institution_name: Testbank (HK) Payments - Personal
                      user_id: 01HW1W246Y9MSN22T50J3CD04T
                    status: PROCESSING
                    type: MANDATE
                    updated_at: '2024-08-16T15:27:41.534Z'
                card_payment_processing:
                  summary: Success (card payment processing)
                  value:
                    amount: 500
                    created_at: '2024-08-16T15:15:38.648Z'
                    currency: HKD
                    fees:
                      - amount: 252
                        currency: HKD
                        paid_by: SENDER
                        paid_by_account_id: 01H5VEQWDZGWMY6D9EFFX7GXJQ
                      - amount: 261
                        currency: HKD
                        paid_by: RECIPIENT
                        paid_by_account_id: 01H5VEQWDZGWMY6D9EFFX7GXJQ
                    metadata:
                      employer_name: Apple Inc
                      key: value
                    payment_details:
                      collection_entity_name: Demo Company Ltd
                      description: Test payment
                      external_transaction_reference: '1723821338'
                      transaction_reference_id: '1723821338'
                    payment_id: 01J5DW4BSEA4A2WH3W0KZ843N2
                    payment_method:
                      card:
                        card_details:
                          brand: Visa
                          last4: '4242'
                    payment_method_id: 01J5DVNBGRCPVBHKBBS1GC1EQD
                    recipient:
                      name: Demo App
                    recipient_account:
                      account_id: 01H5VEQWDZGWMY6D9EFFX7GXJQ
                      account_type: SETTLEMENT_ACCOUNT
                    sender:
                      external_user_id: user_id_1||1723820830
                      name: John Doe
                      user_details: []
                      user_id: 01J5DVMX7JSXWRA97MYAK3NT5P
                      user_type: UNKNOWN
                    status: PROCESSING
                    type: CARD
                    updated_at: '2024-08-16T15:15:38.648Z'
                async_error_case_payment_rejected:
                  summary: 'Created payment (async error case: PAYMENT_REJECTED)'
                  value:
                    amount: 500
                    amount_total_with_surcharge: 500
                    created_at: '2025-02-21T12:50:11.454Z'
                    currency: HKD
                    fees:
                      - amount: 500
                        currency: HKD
                        paid_by: RECIPIENT
                        paid_by_account_id: 01H5VH5YCFDVH80YZ8D0TG3HET
                    metadata:
                      employer_name: Apple Inc
                      key: value
                    payment_details:
                      collection_entity_name: Finverse Technologies Limited
                      description: Test payment
                      external_transaction_reference: '1740142206'
                      mandate_id: 01JMM75577DFW6GQ63A11PZ6YZ
                      processor_entity_name: Finverse Technologies Limited
                      transaction_reference_id: '1740142206'
                    payment_id: 01JMM8XW2AYWGKARERMP2W9E84
                    payment_method_id: 01JMM755BVX0N577AYTW8D3YAN
                    recipient:
                      name: Demo App
                    recipient_account:
                      account_id: 01H5VH5YCFDVH80YZ8D0TG3HET
                      account_type: SETTLEMENT_ACCOUNT
                    sender:
                      external_user_id: user_id_1_{{timestamp}}
                      name: John Doe
                      user_details: []
                      user_id: 01JMM755APSP5RMY58HKKH01T9
                      user_type: INDIVIDUAL
                    sender_account:
                      account_id: 01JMM77JQ40RAZTXFFR0313XSB
                      account_number:
                        number: 01JMM77K2MPDTJVGZWPE2MEZAE
                        type: LOCAL
                      account_number_masked: 309XXXXXX9494
                      account_type: EXTERNAL_ACCOUNT
                      accountholder_name: 01JMM77K1QM1B81QJA9Z1XTNV0
                      bank_code: '420'
                      institution_id: testbank-dbs-hk
                      institution_name: Testbank (HK) Payments - Personal
                      user_id: 01JMM755APSP5RMY58HKKH01T9
                    status: PROCESSING
                    surcharge_amount: 0
                    type: MANDATE
                    updated_at: '2025-02-21T12:50:11.454Z'
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrBodyModelV2'
              examples:
                invalid_parameter:
                  summary: Error (invalid parameter)
                  value:
                    code: 602
                    error:
                      details: currency in body is required
                      error_code: INVALID_PARAMETER
                      message: The parameters provided are invalid. See details.
                      request_id: '1705593660'
                      type: API_ERROR
                    message: currency in body is required
                invalid_amount_type:
                  summary: Error (invalid amount type)
                  value:
                    code: 400
                    error:
                      details: >-
                        parsing createPaymentRequest body from "" failed,
                        because json: cannot unmarshal number 500.1 into Go
                        struct field CreatePaymentRequest.amount of type int64
                      error_code: INVALID_PARAMETER
                      message: The parameters provided are invalid. See details.
                      request_id: '1705593838'
                      type: API_ERROR
                    message: >-
                      parsing createPaymentRequest body from "" failed, because
                      json: cannot unmarshal number 500.1 into Go struct field
                      CreatePaymentRequest.amount of type int64
                invalid_payment_method_id:
                  summary: Error (invalid payment method ID)
                  value:
                    error:
                      details: ''
                      error_code: RESOURCE_NOT_FOUND
                      message: >-
                        Resource cannot be found. Resource does not exist, has
                        been deleted, or is not accessible.
                      request_id: '1705593892'
                      type: API_ERROR
                currency_not_supported_by_payment_method:
                  summary: Error (currency not supported by payment method)
                  value:
                    error:
                      details: ''
                      error_code: PAYMENT_CURRENCY_UNAUTHORIZED
                      message: >-
                        The currency is not authorized in the mandate. Please
                        use an authorized currency.
                      request_id: '1705594322'
                      type: PAYMENT_ERROR
                mandate_expired:
                  summary: Error (mandate expired)
                  value:
                    error:
                      details: ''
                      error_code: PAYMENT_MANDATE_EXPIRED
                      message: >-
                        Cannot create payment because the referred mandate has
                        expired.
                      request_id: '1709289519'
                      type: PAYMENT_ERROR
                mandate_pending_or_not_yet_authorized:
                  summary: Error (mandate pending or not yet authorized)
                  value:
                    error:
                      details: ''
                      error_code: PAYMENT_MANDATE_STATUS_INVALID
                      message: >-
                        The mandate has not been setup properly. Please check
                        our documentation and try again.
                      request_id: '1705594919'
                      type: PAYMENT_ERROR
                mandate_not_yet_effective:
                  summary: Error (mandate not yet effective)
                  value:
                    error:
                      details: ''
                      error_code: PAYMENT_MANDATE_NOT_EFFECTIVE
                      message: >-
                        Cannot create payment because the referred mandate is
                        not effective yet.
                      request_id: '1705594770'
                      type: PAYMENT_ERROR
                mandate_transaction_limits_exceeded:
                  summary: Error (mandate transaction limits exceeded)
                  value:
                    error:
                      details: >-
                        You have reached the maximum total payment value allowed
                        for this mandate over the specified period
                      error_code: PAYMENT_LIMITS_EXCEEDED
                      message: Payment limits exceeded
                      request_id: '{unique_id}}'
                      type: PAYMENT_ERROR
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrBodyModelV2'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrBodyModelV2'
      security:
        - Oauth2:
            - payment:create
components:
  schemas:
    CreatePaymentRequest:
      required:
        - payment_details
        - amount
        - currency
      properties:
        amount:
          description: Amount of the payment (in minor currency unit)
          type: integer
          example: 100
        currency:
          description: Currency of the payment (e.g. HKD)
          type: string
          maxLength: 3
          example: HKD
        metadata:
          $ref: '#/components/schemas/CreateMetadata'
          description: >-
            Customer-supplied attributes in key:value format. E.g.
            `employer_name`: `Apple Inc`
        payment_details:
          $ref: '#/components/schemas/PaymentDetails2'
          description: Details on the payment
        payment_method_id:
          description: >-
            Finverse `payment_method_id`. Required unless `mandate_id` is
            provided in `payment_details`.
          type: string
    PaymentResponse:
      required:
        - amount
        - surcharge_amount
        - amount_total_with_surcharge
      properties:
        amount:
          description: Amount of the payment (in minor currency unit)
          type: integer
          example: 100
        amount_total_with_surcharge:
          description: >-
            Total amount of the payment including any transaction fee
            `surcharge_amount` paid by the sender (in minor currency unit). See
            `surcharge_amount` on transaction fee surcharges.
          type: integer
          example: 100
        created_at:
          description: Timestamp when the payment was first created
          type: string
          format: date-time
        currency:
          type: string
          example: HKD
          description: Currency of the payment (e.g. HKD)
        error:
          $ref: '#/components/schemas/FvEmbeddedErrorModel'
          description: >-
            Details on why the payment failed (returned when `status` =
            `FAILED`). Note: this is used to detail any asynchronous e errors
            occuring after payment creation; any synchronous errors (e.g. API
            validation errors, real-time payment errors) will instead be
            returned directly during `POST /payments`.
        fees:
          type: array
          items:
            $ref: '#/components/schemas/Fee'
          description: Details on the fee(s) to be charged
        metadata:
          description: >-
            Customer-supplied attributes in key:value format. E.g.
            `employer_name`: `Apple Inc`
          type: object
          additionalProperties:
            type: string
        payment_details:
          $ref: '#/components/schemas/PaymentDetails2'
          description: Details on the payment
        payment_id:
          description: >-
            Finverse Payment ID for this payment. Always unique. Creating a
            payment with different idempotency keys will result in two payments
            with different IDs.
          type: string
        payment_method:
          $ref: '#/components/schemas/PaymentSnapshotPaymentMethod'
          description: Details on the payment method
        payment_method_id:
          description: (TO BE DEPRECATED) Finverse unique ID for the payment method
          type: string
        recipient:
          $ref: '#/components/schemas/MandateRecipient'
          description: Details on the recipient of the payment
        recipient_account:
          $ref: '#/components/schemas/MandateRecipientAccount'
          description: >-
            Details on the recipient's account for the payment (i.e. the
            Customer App's settlement account at Finverse)
        sender:
          $ref: '#/components/schemas/GetMandateSender'
          description: Details on the sender of the payment
        sender_account:
          $ref: '#/components/schemas/MandateSenderAccount'
          description: >-
            (IN DEVELOPMENT) Details on the Sender's source institution and
            account, which is funding the payment
        status:
          description: >-
            Current status of the payment. Possible values: `CREATED`,
            `AUTHORIZATION_REQUIRED`, `PROCESSING`, `SUBMITTED, EXECUTED`,
            `CANCELLED`, `FAILED`
          type: string
          enum:
            - AUTHORIZATION_REQUIRED
            - AUTHORIZING
            - PROCESSING
            - SUBMITTED
            - EXECUTED
            - FAILED
            - REVOKED
            - CANCELLED
            - CREATED
        surcharge_amount:
          description: >-
            Transaction fee surcharge_amount paid by the sender, if any
            surcharge has been configured (in minor currency unit). Transaction
            fee surcharges are off by default, but can be set for specific
            payment methods, or for custom scenarios (e.g. based on transaction
            amount, payment flow, etc). Contact
            [support@Finverse.com](mailto:support@Finverse.com) to configure
            surcharges.
          type: integer
          example: 100
        type:
          description: >-
            Specified payment type. Possible values: - `CARD`: payment via card
            gateway (e.g. Stripe) \- `MANDATE`: direct debit bank payment \-
            `MANUAL`: manual bank transfer (e.g. FPS, PayNow) \- `SINGLE`: not
            used (reserved for future use)
          type: string
          enum:
            - MANDATE
            - SINGLE
            - CARD
            - MANUAL
            - WALLET
        updated_at:
          description: Timestamp of the last update to the payment's record
          type: string
          format: date-time
    ErrBodyModelV2:
      properties:
        error:
          $ref: '#/components/schemas/FvErrorModelV2'
    CreateMetadata:
      type: object
      additionalProperties:
        type: string
        maxLength: 1000
    PaymentDetails2:
      properties:
        collection_entity_name:
          type: string
          description: >-
            Name of the legal entity directly collecting the payment. This name
            may be displayed to users in the Finverse UI and in email
            notifications and in the sender's bank statements. For payments
            directly collected by the merchant (e.g. SG eGIRO payments),
            `collection_entity_name` is typically the merchant's legal entity
            name, configured by Finverse during customer onboarding. Contact
            [support@finverse.com](mailto:support@finverse.com) to configure
            your merchant details. For payments collected through Finverse (e.g.
            HK eDDA payments), `collection_entity_name` will be the same as
            `processor_entity_name`
        description:
          description: >-
            User-facing description for the payment transaction. SWIFT character
            set includes the following characters: alphanumeric, space, and
            symbols `/ - ? : ( ) . , ' +`
          type: string
          maxLength: 100
        external_transaction_reference:
          description: >-
            User-facing transaction reference for the payment transaction. SWIFT
            character set includes the following characters: alphanumeric,
            space, and symbols / - ? : ( ) . , ' +
          type: string
          maxLength: 35
        mandate_id:
          description: >-
            `mandate_id` from Mandates object. Only returned if `type` =
            `MANDATE`.
          type: string
        processor_details:
          $ref: '#/components/schemas/PaymentProcessorDetails'
          description: Additional details on how the payment was processed
        processor_entity_name:
          type: string
          description: >-
            Name of the payment processor (if any) through which payments are
            collected. This name may be displayed to users in the Finverse UI,
            in email notifications and in the sender's bank/card statements. For
            payments directly collected by the merchant (e.g. SG eGIRO payments,
            most card payments), no `processor_entity_name` is returned. For
            payments collected through Finverse (e.g. HK eDDA payments),
            `processor_entity_name` will be Finverse's legal entity name.
        recurring_payment_mode:
          description: >-
            Flag used to identify recurring payment use cases (for which some
            payment methods can be eligible for discounted pricing). Possible
            values: - `FIXED_SCHEDULE`: used for subscriptions (fixed schedule,
            fixed or variable amount) \- `NON_RECURRING`: used for one-off,
            user-initiated payments (like an Uber ride or Amazon shopping order)
            \- `VARIABLE_RECURRING`: used for variable schedule + amount
            recurring contracts (e.g. usage based contracts like Cloud / SaaS
            services, or property rentals with additional adhoc charges for
            value-added services)
          type: string
        references:
          $ref: '#/components/schemas/PaymentDetailsReferences'
          description: >-
            Additional references for the Payment (e.g. transaction IDs
            generated by Finverse or the payment gateway)
        transaction_reference_id:
          description: >-
            (DEPRECATED - replaced by `external_transaction_reference`)
            User-facing transaction reference ID for the payment transaction.
            SWIFT character set includes the following characters: alphanumeric,
            space, and symbols `/ - ? : ( ) . , ' +`
          type: string
    FvEmbeddedErrorModel:
      required:
        - type
        - error_code
        - message
        - details
      properties:
        details:
          type: string
        error_code:
          type: string
          example: CREDENTIALS_INVALID
        message:
          type: string
        type:
          description: The error type
          type: string
          enum:
            - LINK_ERROR
            - API_ERROR
          example: LINKING_ERROR
    Fee:
      required:
        - amount
      properties:
        amount:
          description: Amount of the fee (in minor currency unit)
          type: integer
          example: 100
        currency:
          type: string
          example: HKD
          description: Currency of the fee (e.g. HKD)
        paid_by:
          type: string
          enum:
            - RECIPIENT
            - SENDER
          example: RECIPIENT
          description: >-
            Party who will be charged the fee. Possible values: `RECIPIENT`,
            `SENDER`
        paid_by_account_id:
          description: >-
            Finverse Payment Account ID of the party who will be charged the
            fee. This references the `account_id` of either the
            `recipient_account` or the `sender_account`.
          type: string
          example: The payment account ID
    PaymentSnapshotPaymentMethod:
      properties:
        bank_transfer:
          properties:
            bank_transfer_details:
              $ref: '#/components/schemas/BankTransferDetails'
            risk_data:
              $ref: '#/components/schemas/RiskData'
        card:
          properties:
            card_details:
              $ref: '#/components/schemas/FVCardDetails'
        wallet:
          properties:
            risk_data:
              $ref: '#/components/schemas/RiskData'
            wallet_details:
              $ref: '#/components/schemas/FVWalletDetails'
    MandateRecipient:
      required:
        - name
      properties:
        name:
          description: Merchant account name
          type: string
    MandateRecipientAccount:
      required:
        - account_id
        - account_type
      properties:
        account_id:
          description: Merchant account ID assigned by Finverse
          type: string
        account_type:
          description: Type of recipient account.
          type: string
          enum:
            - EXTERNAL_ACCOUNT
            - SETTLEMENT_ACCOUNT
          example: SETTLEMENT_ACCOUNT
    GetMandateSender:
      required:
        - user_id
        - external_user_id
        - user_type
      properties:
        external_user_id:
          description: >-
            Customer App's user ID, representing the end-user making the
            payment.
          type: string
        name:
          type: string
        user_details:
          description: Sender details which will be used for fraud checking.
          type: array
          items:
            $ref: '#/components/schemas/SenderDetail'
        user_id:
          description: A unique identifier generated after creating sender
          type: string
        user_type:
          description: >-
            Type of account held by the Sender at the Institution. Possible
            values are INDIVIDUAL, BUSINESS
          type: string
          enum:
            - INDIVIDUAL
            - BUSINESS
    MandateSenderAccount:
      type: object
      properties:
        account_id:
          description: A unique identifier generated after creating sender account
          type: string
          example: sender_account_id
        account_number:
          $ref: '#/components/schemas/RecipientAccountNumber'
          description: Bank account number details, including account number in plaintext
        account_number_masked:
          description: Masked Account number of the sender’s account
          type: string
        account_type:
          description: Type of sender account.
          type: string
          enum:
            - EXTERNAL_ACCOUNT
          example: EXTERNAL_ACCOUNT
        accountholder_name:
          description: Tokenized accountholder name of the sender's account
          type: string
          example: 01EP4A1MZDHKETZFRPF0K62S6S
        accountholder_name_plaintext:
          description: Accountholder name in plaintext.
          type: string
          example: Chan Li Pak
          nullable: true
        bank_code:
          type: string
        institution_id:
          description: Finverse Institution ID for the sender’s institution.
          type: string
          example: hsbc-hk
        institution_name:
          description: Institution Name for the sender’s institution.
          type: string
          example: HSBC
        metadata:
          description: >-
            Additional attributes of the sender account in key:value format
            (e.g. sender_id: 1234). It supports up to 10 key:value pairs,
            whereas the key and value supports up to 50 and 1000 characters
            respectively.
          type: object
          additionalProperties:
            type: string
        user_id:
          description: >-
            A unique identifier generated after creating sender (Finverse
            Payment User ID)
          type: string
          example: 01GY6H0JA7BS8EVGY56NSHFX2E
    FvErrorModelV2:
      required:
        - type
        - error_code
        - message
        - details
        - request_id
      properties:
        details:
          type: string
        error_code:
          type: string
          example: CREDENTIALS_INVALID
        message:
          type: string
        request_id:
          description: The request_id provided in the request header
          type: string
        type:
          description: The error type
          type: string
          enum:
            - LINK_ERROR
            - API_ERROR
          example: LINKING_ERROR
    PaymentProcessorDetails:
      properties:
        auth_code:
          type: string
          description: Authorization code returned by the payment gateway
        processor_id:
          type: string
          description: >-
            ID of the payment gateway which processed the payment. Possible
            values: - `ADYEN`
        processor_reference:
          type: string
          description: Transaction reference returned by the payment gateway
        result:
          $ref: '#/components/schemas/PaymentProcessorResult'
          description: Additional details on the payment processing result
        scheme:
          description: Scheme like becs, bacs, ach, etc. (applicable to Gocardless for now)
          type: string
        virtual_account_bank_code:
          description: >-
            Bank code for the virtual account without a BK prefix (e.g. KCP
            manual virtual account payments).
          type: string
        virtual_account_number:
          description: >-
            Virtual account number issued by the processor (e.g. KCP manual
            virtual account payments).
          type: string
    PaymentDetailsReferences:
      properties:
        bank_transaction_reference:
          type: string
          description: Unique bank reference ID for the payment.
        dda_reference:
          type: string
          description: >-
            (Direct debit mandate payments only) Unique reference ID for the
            Direct Debit Authorization registered with the user's bank, used to
            authorized the payment. The user's bank may quote this reference in
            notifications to the user, and in the user's bank statements.
        finverse_transaction_reference:
          type: string
          description: >-
            Finverse-generated unique transaction ID for the payment. This value
            may be generated and passed to 3rd party payment gateways when using
            the Finverse `payment_id` is not possible or desirable (e.g. when
            the transaction reference is user-facing, making a more
            user-friendly transaction reference preferable).
    BankTransferDetails:
      properties:
        transfer_type:
          description: The transfer type
          type: string
          example: PayNow
    RiskData:
      properties:
        processor_risk_data:
          $ref: '#/components/schemas/ProcessorRiskData'
    FVCardDetails:
      properties:
        acquirer_authorization_reference:
          description: The acquirer authorization reference
          type: string
          example: '524506894419'
        brand:
          description: >-
            Card brand. Common values: American Express, Diners Club, JCB,
            Mastercard, UnionPay, Visa.
          type: string
          example: VISA
        brand_product_name:
          description: The brand product name
          type: string
          example: visacommercialpremiumcredit
        card_number_alias:
          description: >-
            Unique fingerprint for the card number, if provided by the card
            payment gateway. The card number alias can be used to check whether
            the card number is the same (for example across multiple users).
            Unlike the card `fingerprint`, the card number alias will change if
            the card is reissued with a new number (e.g. upon card expiry). See
            also: `fingerprint` field.
          type: string
          example: F046886807590403
        collection_entity_name:
          type: string
          description: >-
            Name of the legal entity directly collecting the payment. This name
            may be displayed to users in the Finverse UI and in email
            notifications and in the sender's card statements. For card
            payments, `collection_entity_name` is typically the merchant's legal
            entity name, configured by Finverse during customer onboarding.
            Contact [support@finverse.com](mailto:support@finverse.com) to
            configure your merchant details.
        country:
          description: Card country of issuance (e.g. "SG")
          type: string
          example: HK
        expiry_month:
          description: Card expiry month (e.g. 3 = March)
          type: integer
          example: 7
        expiry_year:
          description: 4-digit card expiry year (e.g. 2025)
          type: integer
          example: 2028
        fingerprint:
          type: string
          example: V0010013822052427221044754993
          description: >-
            Unique fingerprint for the card account, if provided by the card
            payment gateway. The card fingerprint remains the same even when a
            card expires and a new card is issued with a new card number. The
            fingerprint can be used to check whether the card is the same (for
            example across multiple users). See also: `card_number_alias` field.
        finverse_authorization_reference:
          type: string
          description: >-
            Finverse-generated unique ID for the payment method authorization
            setup. This value may be generated and passed to 3rd party payment
            gateways when using the Finverse `payment_id` is not possible or
            desirable (e.g. when the reference is user-facing, making a more
            user-friendly reference preferable).
        funding:
          description: >-
            Card funding type. Possible values: `CREDIT`, `DEBIT`, `PREPAID`,
            `UNKNOWN`
          type: string
          enum:
            - UNKNOWN
            - CREDIT
            - DEBIT
            - PREPAID
        is_commercial:
          description: Whether the card is a commercial card
          type: boolean
          example: true
          nullable: true
        last4:
          description: Last 4 digits of the card number
          type: string
          example: '1234'
        processor_details:
          $ref: '#/components/schemas/FVCardProcessorDetails'
          description: >-
            Additional details on how the payment method authorization was
            processed
        processor_entity_name:
          type: string
          description: >-
            Name of the payment processor (if any) through which payments are
            collected. This name may be displayed to users in the Finverse UI,
            in email notifications and in the sender's bank/card statements. For
            payments directly collected by the merchant (e.g. SG eGIRO payments,
            most card payments), no `processor_entity_name` is returned. For
            payments collected through Finverse (e.g. HK eDDA payments),
            `processor_entity_name` will be Finverse's legal entity name.
        recurring_payment_mode:
          description: >-
            Flag used to identify whether the payment method specifically has
            been setup for recurring payment use cases (for which some payment
            methods can be eligible for discounted pricing). Possible values: -
            `FIXED_SCHEDULE`: used for subscriptions (fixed schedule, fixed or
            variable amount) \- `NON_RECURRING`: used for one-off,
            user-initiated payments (like an Uber ride or Amazon shopping order)
            \- `VARIABLE_RECURRING`: used for variable schedule + amount
            recurring contracts (e.g. usage based contracts like Cloud / SaaS
            services, or property rentals with additional adhoc charges for
            value-added services)
          type: string
    FVWalletDetails:
      properties:
        brand:
          description: The wallet brand
          type: string
          example: Alipay
        brand_product_name:
          description: The brand product name
          type: string
          example: alipay_hk
        country:
          description: The issuer country
          type: string
          example: HK
    SenderDetail:
      properties:
        details_type:
          description: >-
            Type of the user identity information submitted. Possible values:
            `HK_ID`, `PASSPORT`, `HK_BUSINESS_REGISTRATION`,
            `HK_CERTIFICATE_OF_INCORPORATION`, `ACCOUNTHOLDER_NAME`
          type: string
          enum:
            - HK_ID
            - PASSPORT
            - HK_BUSINESS_REGISTRATION
            - HK_CERTIFICATE_OF_INCORPORATION
        values:
          description: >-
            Value(s) of the user identity information submitted. Min 1 value
            required, max 10 values. Values in responses are tokenized by
            Finverse.
          type: array
          maxItems: 10
          items:
            type: string
    RecipientAccountNumber:
      type: object
      required:
        - type
        - number
      properties:
        number:
          description: >-
            Account number. Account numbers in responses are tokenized by
            Finverse.
          type: string
          maxLength: 100
          minLength: 1
        number_plaintext:
          description: Account number in plaintext
          type: string
          maxLength: 100
          minLength: 1
          nullable: true
        type:
          description: 'Type of account number format. Possible values: `IBAN`, `LOCAL`'
          type: string
          enum:
            - LOCAL
            - IBAN
    PaymentProcessorResult:
      properties:
        decline_code:
          description: Payment processor's decline code (e.g. "2")
          type: string
        decline_reason:
          description: >-
            Decline reason returned by the payment gateway (if payment was
            declined)
          type: string
        last_action:
          description: >-
            Last action taken by the payment processor (e.g. "created",
            "captured", "failed", etc.)
          type: string
        result_code:
          description: Payment result code returned by the payment gateway
          type: string
        status:
          description: >-
            Status of the payment reported by processor (e.g. "authorized",
            "captured", "failed", etc.)
          type: string
    ProcessorRiskData:
      properties:
        browser_type:
          description: The browser type
          type: string
          example: Chrome
        device_type:
          description: The device type
          type: string
          example: Desktop
        shopper_country:
          description: The shopper country
          type: string
          example: HK
        shopper_ip:
          description: The shopper IP address
          type: string
          example: 127.0.0.1
        shopper_locale:
          description: The shopper locale
          type: string
          example: en-HK
    FVCardProcessorDetails:
      properties:
        auth_code:
          type: string
          description: Authorization code returned by the payment gateway
        network_transaction_reference:
          description: The network transaction reference
          type: string
        processor_id:
          type: string
          description: >-
            ID of the payment gateway which processed the payment method
            authorization. Possible values: - `ADYEN`
        processor_reference:
          type: string
          description: Transaction reference returned by the payment gateway
        token_id:
          type: string
          description: >-
            Token ID returned by the payment gateway (for tokenized payment
            methods)
  securitySchemes:
    Oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://finverse-dev.us.auth0.com/oauth/token
          scopes:
            account: Account
            balance: Balance
            credit: Credit
            institution: Institution
            investment: Investment
            link: Link
            test: Test
            transaction: Transaction

````