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

# Create withdrawal transaction (Payout)

> Creates a payout through an eligible provider connection. Use the payment method configured for the merchant, mode, currency and payout rail. Colibrix card payouts require sourceTransactionId from an eligible earlier sale. Bank payouts require a supported connection and its beneficiary fields. Money is a decimal string in major units (`"amount": "10.00"`), in the request and in the response.



## OpenAPI

````yaml /openapi.json post /v1/payment/payout
openapi: 3.1.0
info:
  contact:
    name: OrsunPay
  description: >-
    Server-to-server merchant payments. Money is always a decimal string in
    major units.
  title: OrsunPay Merchant API
  version: '1.0'
servers: []
security: []
tags:
  - description: Poll stored merchant transaction status
    name: Transactions
  - description: Create merchant sales and payouts
    name: Payments
  - description: Request refunds and read stored refund outcomes
    name: Refunds
  - description: Signed merchant event deliveries
    name: Webhooks
  - description: Create, list and deactivate shareable merchant payment links
    name: Payment links
paths:
  /v1/payment/payout:
    post:
      tags:
        - Payments
      summary: Create withdrawal transaction (Payout)
      description: >-
        Creates a payout through an eligible provider connection. Use the
        payment method configured for the merchant, mode, currency and payout
        rail. Colibrix card payouts require sourceTransactionId from an eligible
        earlier sale. Bank payouts require a supported connection and its
        beneficiary fields. Money is a decimal string in major units (`"amount":
        "10.00"`), in the request and in the response.
      operationId: createPayout
      parameters:
        - description: >-
            Optional, recommended. 1-255 printable ASCII characters without
            spaces (e.g. a UUID v4) generated once per payment attempt and
            reused for every retry of it. Scoped to the merchant, kept 24 h. A
            retry of a finished request returns the stored status and body with
            `Idempotency-Replayed: true`; a retry while the first request is
            still running gets 409 IDEMPOTENCY_IN_PROGRESS with `Retry-After`;
            the same key with a different body or endpoint gets 422
            IDEMPOTENCY_KEY_REUSED.
          in: header
          name: Idempotency-Key
          required: false
          schema:
            example: 0b6f2c1e-4c7a-4a43-9a51-6a4b1d7e9f10
            type: string
      requestBody:
        content:
          application/json:
            examples:
              full:
                summary: With method, customer and merchant metadata
                value:
                  amount: '12.30'
                  buyerId: buyer_example
                  callbackUrl: https://shop.example.com/webhooks/orsunpay
                  currency: EUR
                  customer:
                    country: US
                    email: buyer@example.com
                    firstName: Jane
                    lastName: Doe
                  failureUrl: https://shop.example.com/failure
                  locale: en-US
                  merchantId: mr_example
                  metadata:
                    cartId: cart_example
                  orderId: order_example_001
                  paymentMethod: cr_example
                  paymentMethodInput: {}
                  returnUrl: https://shop.example.com/return
                  successUrl: https://shop.example.com/success
              minimal:
                summary: Minimum required fields
                value:
                  amount: '12.30'
                  buyerId: buyer_example
                  callbackUrl: https://shop.example.com/webhooks/orsunpay
                  currency: EUR
                  failureUrl: https://shop.example.com/failure
                  merchantId: mr_example
                  orderId: order_example_001
                  paymentMethod: cr_example
                  returnUrl: https://shop.example.com/return
                  successUrl: https://shop.example.com/success
            schema:
              $ref: '#/components/schemas/PayoutRequestDto'
        required: true
      responses:
        '201':
          content:
            application/json:
              examples:
                businessError:
                  summary: Rejected by the payment core
                  value:
                    error: >-
                      INVALID_AMOUNT: amount 12.345 has more than 2 decimal
                      places allowed for EUR
                    status: false
                livemodeMismatch:
                  summary: >-
                    Payment declined before PSP dispatch because the credential
                    mode differs
                  value:
                    status: true
                    transaction:
                      action: PAYOUT
                      amount: '10.00'
                      buyerId: buyer_001
                      callbackUrl: https://merchant.com/callback
                      companyId: co_123
                      createdAt: '2025-08-27T08:49:34.336Z'
                      credentialConfigId: cr_hvntdai7ag38j8dmlbiunyga
                      currency: EUR
                      currencyRate: null
                      customerId: cu_a76ew9iilsw46mtvmif6tits
                      errorCode: LIVEMODE_MISMATCH
                      failureUrl: https://merchant.com/failure
                      feeAmount: '10'
                      feeCharge: PERCENTAGE
                      feeRoundingRemainder: '0'
                      feeType: TOP
                      finalStatusUpdatedAt: null
                      fxRoundingRemainder: null
                      id: tr_xv0p2q5scocndpejk0nud75q
                      isFeeEnabled: true
                      livemode: true
                      locale: en-US
                      merchantId: mr_hkvats9n1pmbznf1j6yu8bry
                      metadata:
                        cartId: cart_123
                        promoCode: SUMMER24
                      orderId: order_20240612_001
                      paymentMethod: mbway
                      processingAmount: '10.00'
                      processingAmountWithFee: '11.00'
                      processingCurrency: EUR
                      processingFeeAmount: '1.00'
                      provider: adyen
                      pspTransactionId: null
                      returnUrl: https://merchant.com/return
                      ruleId: null
                      status: DECLINED
                      successUrl: https://merchant.com/success
                      updatedAt: '2025-08-27T08:49:34.336Z'
                success:
                  summary: Successful withdrawal creation
                  value:
                    status: true
                    transaction:
                      action: PAYOUT
                      amount: '10.00'
                      buyerId: buyer_001
                      callbackUrl: https://merchant.com/callback
                      companyId: co_123
                      createdAt: '2025-08-27T08:49:34.336Z'
                      credentialConfigId: cr_hvntdai7ag38j8dmlbiunyga
                      currency: EUR
                      currencyRate: null
                      customerId: cu_a76ew9iilsw46mtvmif6tits
                      errorCode: null
                      failureUrl: https://merchant.com/failure
                      feeAmount: '10'
                      feeCharge: PERCENTAGE
                      feeRoundingRemainder: '0'
                      feeType: TOP
                      finalStatusUpdatedAt: null
                      fxRoundingRemainder: null
                      id: tr_xv0p2q5scocndpejk0nud75q
                      isFeeEnabled: true
                      livemode: true
                      locale: en-US
                      merchantId: mr_hkvats9n1pmbznf1j6yu8bry
                      metadata:
                        cartId: cart_123
                        promoCode: SUMMER24
                      orderId: order_20240612_001
                      paymentMethod: mbway
                      processingAmount: '10.00'
                      processingAmountWithFee: '11.00'
                      processingCurrency: EUR
                      processingFeeAmount: '1.00'
                      provider: adyen
                      pspTransactionId: null
                      returnUrl: https://merchant.com/return
                      ruleId: null
                      status: CREATED
                      successUrl: https://merchant.com/success
                      updatedAt: '2025-08-27T08:49:34.336Z'
              schema:
                $ref: '#/components/schemas/PaymentResponseDto'
          description: >-
            Transaction created, or `status: false` with a business `error`
            (e.g. `INVALID_AMOUNT: ...` when the amount has more decimals than
            the currency allows). Money fields are decimal strings in major
            units. LIVEMODE_MISMATCH is a declined transaction returned with
            status: true, not an HTTP error; no PSP operation is sent.
          headers:
            Idempotency-Replayed:
              description: >-
                Present (`true`) when the body is a replay of an earlier request
                with the same Idempotency-Key
              schema:
                enum:
                  - 'true'
                type: string
            RateLimit:
              description: >-
                Remaining requests (r) and seconds to reset/full refill (t), per
                evaluated policy. Absent when disabled; merchant quota is
                omitted during Redis outages, while IP/auth protection uses
                replica memory.
              schema:
                example: '"merchant";r=37;t=4'
                type: string
            RateLimit-Policy:
              description: >-
                Evaluated policies (draft-ietf-httpapi-ratelimit-headers-11). q
                is burst quota; w is the full refill window in seconds.
              schema:
                example: '"merchant";q=100;w=5'
                type: string
        '400':
          content:
            application/json:
              examples:
                amountAsNumber:
                  summary: amount sent as a JSON number
                  value:
                    error: Bad Request
                    message:
                      - >-
                        amount must be a decimal string in major units, e.g.
                        "12.30"; JSON numbers are not accepted for money (got
                        12.3)
                    statusCode: 400
                invalidKey:
                  summary: Invalid Idempotency-Key
                  value:
                    error: IDEMPOTENCY_KEY_INVALID
                    errorCode: IDEMPOTENCY_KEY_INVALID
                    message: >-
                      Idempotency-Key must be a single value of 1-255 printable
                      ASCII characters without spaces
                    status: false
                    statusCode: 400
                noCredentialsForMode:
                  summary: No usable credentials in the authenticated API key mode
                  value:
                    error: NO_CREDENTIALS_FOR_MODE
                    errorCode: NO_CREDENTIALS_FOR_MODE
                    message: No credentials are available for this payment mode
                    status: false
                    statusCode: 400
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ValidationErrorResponseDto'
                  - $ref: '#/components/schemas/ApiErrorResponseDto'
          description: >-
            Invalid request: body validation (e.g. `amount` sent as a JSON
            number) or an invalid `Idempotency-Key` (IDEMPOTENCY_KEY_INVALID),
            NO_CREDENTIALS_FOR_MODE (no usable credential in the key mode).
        '401':
          content:
            application/json:
              example:
                error: Unauthorized
                message: Invalid API key
                statusCode: 401
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponseDto'
          description: Invalid API key
        '409':
          content:
            application/json:
              examples:
                duplicateOrder:
                  summary: Duplicate orderId
                  value:
                    error: DUPLICATE_ORDER_ID
                    errorCode: DUPLICATE_ORDER_ID
                    existingTransactionId: tr_x8k2p0q5scocndpejk0nud75q
                    message: >-
                      A transaction with orderId "A-1001" already exists for
                      this merchant
                    orderId: A-1001
                    status: false
                    statusCode: 409
                inProgress:
                  summary: Same Idempotency-Key still in progress
                  value:
                    error: IDEMPOTENCY_IN_PROGRESS
                    errorCode: IDEMPOTENCY_IN_PROGRESS
                    idempotencyKey: 0b6f2c1e-4c7a-4a43-9a51-6a4b1d7e9f10
                    message: >-
                      A request with this Idempotency-Key is still being
                      processed; retry later
                    status: false
                    statusCode: 409
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
          description: >-
            DUPLICATE_ORDER_ID: the merchant already has a transaction with this
            `orderId` (see `existingTransactionId`); or IDEMPOTENCY_IN_PROGRESS:
            a request with the same Idempotency-Key is still running, retry
            after `Retry-After` seconds with the same key.
          headers:
            Idempotency-Replayed:
              description: >-
                Present when this 409 is a replay of an earlier answer for the
                same key
              schema:
                enum:
                  - 'true'
                type: string
            Retry-After:
              description: 'IDEMPOTENCY_IN_PROGRESS only: seconds to wait before retrying'
              schema:
                example: '1'
                type: string
        '422':
          content:
            application/json:
              examples:
                reusedKey:
                  value:
                    error: IDEMPOTENCY_KEY_REUSED
                    errorCode: IDEMPOTENCY_KEY_REUSED
                    idempotencyKey: 0b6f2c1e-4c7a-4a43-9a51-6a4b1d7e9f10
                    message: >-
                      Idempotency-Key was already used with a different request;
                      use a new key for a new request
                    status: false
                    statusCode: 422
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
          description: >-
            IDEMPOTENCY_KEY_REUSED: the Idempotency-Key was already used with a
            different request; ORDER_ID_RESERVED: the pl_ orderId prefix is
            reserved for payment links
        '429':
          content:
            application/json:
              example:
                error: RATE_LIMITED
                errorCode: RATE_LIMITED
                message: Too many requests. Retry after the indicated delay.
                status: false
                statusCode: 429
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
          description: >-
            RATE_LIMITED: IP, merchant or failed-auth quota exhausted, or
            auth-in-flight concurrency pressure (Retry-After: 1). Wait
            Retry-After seconds and retry with the same Idempotency-Key.
          headers:
            RateLimit:
              description: >-
                Remaining requests (r) and seconds to reset/full refill (t), per
                evaluated policy. Absent when disabled; merchant quota is
                omitted during Redis outages, while IP/auth protection uses
                replica memory.
              schema:
                example: '"merchant";r=37;t=4'
                type: string
            RateLimit-Policy:
              description: >-
                Evaluated policies (draft-ietf-httpapi-ratelimit-headers-11). q
                is burst quota; w is the full refill window in seconds.
              schema:
                example: '"merchant";q=100;w=5'
                type: string
            Retry-After:
              description: Minimum delay in whole seconds before retrying.
              schema:
                example: 1
                minimum: 1
                type: integer
        '502':
          content:
            application/json:
              example:
                error: UPSTREAM_ERROR
                errorCode: UPSTREAM_ERROR
                message: >-
                  The payment core failed to process the request; retry with the
                  same Idempotency-Key
                status: false
                statusCode: 502
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
          description: >-
            UPSTREAM_ERROR / UPSTREAM_UNAVAILABLE: the payment core failed or is
            unreachable. Retry with the same Idempotency-Key.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationUnavailableResponseDto'
          description: >-
            API key validation is temporarily unavailable; retry later with the
            same request
        '504':
          content:
            application/json:
              example:
                error: UPSTREAM_TIMEOUT
                errorCode: UPSTREAM_TIMEOUT
                message: >-
                  The payment core did not answer in time; the operation may
                  still complete. Retry with the same Idempotency-Key to get its
                  result
                status: false
                statusCode: 504
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
          description: >-
            UPSTREAM_TIMEOUT: no answer in time; the operation may still
            complete. Retry with the same Idempotency-Key to get its result.
      security:
        - X-API-Key: []
components:
  schemas:
    PayoutRequestDto:
      properties:
        amount:
          description: >-
            Amount as a decimal **string** in **major** units of `currency`:
            `"12.30"` EUR, `"5000"` JPY, `"0.00000001"` BTC. Must be greater
            than zero. JSON numbers (`12.3`, `1230`) are rejected with 400. At
            most 18 decimals here; the payment core also rejects more decimals
            than the currency allows (`"12.345"` EUR, `"1.5"` JPY).
          example: '10.00'
          pattern: ^(0|[1-9]\d{0,19})(\.\d{1,18})?$
          type: string
        buyerId:
          description: Buyer ID in merchant system
          example: customer_123
          type: string
        callbackUrl:
          description: Callback URL
          example: https://example.com/callback
          type: string
        currency:
          description: Currency
          example: USD
          type: string
        customer:
          allOf:
            - $ref: '#/components/schemas/CustomerDto'
          description: Customer
          example:
            address: 123 Main St
            address2: Apt 1
            city: Anytown
            country: US
            dob: '1990-01-01'
            email: test@test.com
            firstName: John
            ip: 123.45.67.89
            lastName: Doe
            phone: '+1234567890'
            state: CA
            userAgent: >-
              Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
              (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3
            zip: '12345'
        failureUrl:
          description: Failure URL
          example: https://example.com/failure
          type: string
        locale:
          description: Locale in BCP 47 format
          enum:
            - en-US
            - ru-RU
            - uk-UA
            - en-GB
            - pl-PL
            - cs-CZ
            - de-DE
            - de-AT
            - de-CH
          example: en-US
          type: string
        merchantId:
          description: Merchant ID
          example: mr_clyv2goxb0000z8b8j5y6fl1j
          type: string
        metadata:
          description: >-
            Metadata: at most 16 KiB encoded JSON, 50 entries per container,
            nesting depth 5.
          example: {}
          maxProperties: 50
          type: object
        orderId:
          description: >-
            Transaction ID in merchant system. The pl_ prefix is reserved for
            payment links (422 ORDER_ID_RESERVED).
          example: transaction_123
          type: string
        paymentMethod:
          description: Payment method
          example: cr_clyv2goxb0000z8b8j5y6fl1j
          type: string
        paymentMethodInput:
          description: Payment method input
          example: {}
          type: object
        returnUrl:
          description: Return URL
          example: https://example.com/return
          type: string
        sourceTransactionId:
          description: >-
            Required for Colibrix payouts: OrsunPay ID of a successful card sale
            belonging to the same merchant, customer, payment configuration and
            mode
          example: tr_source
          maxLength: 128
          type: string
        successUrl:
          description: Success URL
          example: https://example.com/success
          type: string
      required:
        - amount
        - currency
        - paymentMethod
        - merchantId
        - orderId
        - buyerId
        - successUrl
        - failureUrl
        - returnUrl
        - callbackUrl
      type: object
    PaymentResponseDto:
      properties:
        error:
          description: Error message (if operation failed)
          example: Payment method not available
          type: string
        nextAction:
          description: Validated app confirmation or voucher instructions for the payer
          type: object
        paymentPageUrl:
          description: >-
            Sales only: the hosted payment page, when the buyer still has to
            pick a method or type payment details (no `paymentMethod`, or
            incomplete `paymentMethodInput`). Redirect the buyer there; `url`
            carries the same value. Valid until the sale expires (48 h by
            default); the token in it is the only key to the page, so treat the
            URL like a secret link.
          example: >-
            https://pay.example.com/pay/hpp1.dHJfeHYwcDJxNXNjb2NuZHBlamswbnVkNzVxOjE3NjAxMDAwMDA.X8f…
          type: string
        pending:
          description: >-
            Accepted payment awaiting confirmation. On PSP_OUTCOME_UNKNOWN poll
            the transaction; do not resubmit or create a new order.
          example: true
          type: boolean
        status:
          description: Operation status
          example: true
          type: boolean
        transaction:
          allOf:
            - $ref: '#/components/schemas/TransactionDto'
          description: Transaction details
        url:
          description: Redirect URL for payment completion (if required)
          example: https://payment-provider.com/pay/abc123
          type: string
      required:
        - status
      type: object
    ValidationErrorResponseDto:
      properties:
        error:
          example: Bad Request
          type: string
        message:
          example:
            - >-
              amount must be a decimal string in major units, e.g. "12.30"; JSON
              numbers are not accepted for money (got 12.3)
          items:
            type: string
          type: array
        statusCode:
          example: 400
          type: number
      required:
        - statusCode
        - error
        - message
      type: object
    ApiErrorResponseDto:
      properties:
        error:
          description: Same as errorCode
          example: DUPLICATE_ORDER_ID
          type: string
        errorCode:
          description: >-
            Machine-readable, extensible code. Known values: ADYEN_REFUSED,
            CARD_DATA_NOT_ACCEPTED, RATE_LIMITED, PAYMENT_LINK_INVALID_AMOUNT,
            PAYMENT_LINK_UNSUPPORTED_CURRENCY, PAYMENT_LINK_INVALID_EXPIRY,
            PAYMENT_LINK_INVALID_MAX_USES,
            PAYMENT_LINK_REDIRECT_URL_NOT_ALLOWED,
            PAYMENT_LINK_METADATA_TOO_LARGE, PAYMENT_LINK_INVALID_TEXT,
            PAYMENT_LINK_NOT_FOUND, PAYMENT_LINK_INVALID_LIMIT,
            PAYMENT_LINK_INVALID_CURSOR, API_KEY_ROTATION_REQUIRED,
            ORDER_ID_RESERVED, NO_CREDENTIALS_FOR_MODE, LIVEMODE_MISMATCH,
            PSP_OUTCOME_UNKNOWN, PAYMENT_METHOD_REQUIRED,
            PAYMENT_METHOD_INPUT_WITHOUT_METHOD, NO_PAYMENT_METHODS,
            IDEMPOTENCY_KEY_INVALID, DUPLICATE_ORDER_ID,
            IDEMPOTENCY_IN_PROGRESS, IDEMPOTENCY_KEY_REUSED, UPSTREAM_ERROR,
            UPSTREAM_UNAVAILABLE, UPSTREAM_TIMEOUT, REFUND_INVALID_AMOUNT,
            REFUND_INVALID_REASON, REFUND_INVALID_METADATA,
            REFUND_INPUT_INVALID, REFUND_EXCEEDS_AMOUNT,
            TRANSACTION_NOT_REFUNDABLE, REFUND_NOT_FOUND, REFUND_NOT_SUPPORTED,
            IDEMPOTENCY_LEASE_LOST, REFUND_SERVICE_UNAVAILABLE. New codes may be
            added; clients must handle unknown values.
          example: DUPLICATE_ORDER_ID
          type: string
        existingTransactionId:
          description: >-
            DUPLICATE_ORDER_ID only: the transaction that already uses this
            orderId
          example: tr_x8k2p0q5scocndpejk0nud75q
          type: string
        fields:
          description: >-
            Invalid or missing buyer contact fields for
            CUSTOMER_CONTACT_REQUIRED
          example:
            - customer.email
            - customer.country
          items:
            type: string
          type: array
        idempotencyKey:
          description: IDEMPOTENCY_* errors only
          example: 0b6f2c1e-4c7a-4a43-9a51-6a4b1d7e9f10
          type: string
        message:
          example: A transaction with orderId "A-1001" already exists for this merchant
          type: string
        orderId:
          description: DUPLICATE_ORDER_ID only
          example: A-1001
          type: string
        status:
          example: false
          type: boolean
        statusCode:
          example: 409
          type: number
      required:
        - status
        - statusCode
        - errorCode
        - error
        - message
      type: object
    UnauthorizedErrorResponseDto:
      properties:
        error:
          example: Unauthorized
          type: string
        errorCode:
          description: Stable authentication error code when available
          example: API_KEY_ROTATION_REQUIRED
          type: string
        message:
          example: Invalid API key
          type: string
        statusCode:
          description: HTTP status when included by the error handler
          example: 401
          type: number
      required:
        - message
      type: object
    AuthenticationUnavailableResponseDto:
      properties:
        error:
          example: Service Unavailable
          type: string
        message:
          example: API_KEY_VALIDATION_UNAVAILABLE
          type: string
        statusCode:
          example: 503
          type: number
      required:
        - statusCode
        - error
        - message
      type: object
    CustomerDto:
      properties:
        address:
          description: Customer address
          example: 123 Main St
          type: string
        address2:
          description: Customer address2
          example: Apt 1
          type: string
        city:
          description: Customer city
          example: Anytown
          type: string
        country:
          description: >-
            Customer ISO alpha-2 country code; Adyen requires uppercase, Brite
            accepts either case. Provider-specific missing/invalid contact
            returns 422 CUSTOMER_CONTACT_REQUIRED.
          enum:
            - AD
            - ad
            - AE
            - ae
            - AF
            - af
            - AG
            - ag
            - AI
            - ai
            - AL
            - al
            - AM
            - am
            - AN
            - an
            - AO
            - ao
            - AQ
            - aq
            - AR
            - ar
            - AS
            - as
            - AT
            - at
            - AU
            - au
            - AW
            - aw
            - AX
            - ax
            - AZ
            - az
            - BA
            - ba
            - BB
            - bb
            - BD
            - bd
            - BE
            - be
            - BF
            - bf
            - BG
            - bg
            - BH
            - bh
            - BI
            - bi
            - BJ
            - bj
            - BL
            - bl
            - BM
            - bm
            - BN
            - bn
            - BO
            - bo
            - BQ
            - bq
            - BR
            - br
            - BS
            - bs
            - BT
            - bt
            - BV
            - bv
            - BW
            - bw
            - BY
            - by
            - BZ
            - bz
            - CA
            - ca
            - CC
            - cc
            - CD
            - cd
            - CF
            - cf
            - CG
            - cg
            - CH
            - ch
            - CI
            - ci
            - CK
            - ck
            - CL
            - cl
            - CM
            - cm
            - CN
            - cn
            - CO
            - co
            - CR
            - cr
            - CU
            - cu
            - CV
            - cv
            - CW
            - cw
            - CX
            - cx
            - CY
            - cy
            - CZ
            - cz
            - DE
            - de
            - DJ
            - dj
            - DK
            - dk
            - DM
            - dm
            - DO
            - do
            - DZ
            - dz
            - EC
            - ec
            - EE
            - ee
            - EG
            - eg
            - EH
            - eh
            - ER
            - er
            - ES
            - es
            - ET
            - et
            - FI
            - fi
            - FJ
            - fj
            - FK
            - fk
            - FM
            - fm
            - FO
            - fo
            - FR
            - fr
            - GA
            - ga
            - GB
            - gb
            - GD
            - gd
            - GE
            - ge
            - GF
            - gf
            - GG
            - gg
            - GH
            - gh
            - GI
            - gi
            - GL
            - gl
            - GM
            - gm
            - GN
            - gn
            - GP
            - gp
            - GQ
            - gq
            - GR
            - gr
            - GS
            - gs
            - GT
            - gt
            - GU
            - gu
            - GW
            - gw
            - GY
            - gy
            - HK
            - hk
            - HM
            - hm
            - HN
            - hn
            - HR
            - hr
            - HT
            - ht
            - HU
            - hu
            - ID
            - id
            - IE
            - ie
            - IL
            - il
            - IM
            - im
            - IN
            - in
            - IO
            - io
            - IQ
            - iq
            - IR
            - ir
            - IS
            - is
            - IT
            - it
            - JE
            - je
            - JM
            - jm
            - JO
            - jo
            - JP
            - jp
            - KE
            - ke
            - KG
            - kg
            - KH
            - kh
            - KI
            - ki
            - KM
            - km
            - KN
            - kn
            - KP
            - kp
            - KR
            - kr
            - KW
            - kw
            - KY
            - ky
            - KZ
            - kz
            - LA
            - la
            - LB
            - lb
            - LC
            - lc
            - LI
            - li
            - LK
            - lk
            - LR
            - lr
            - LS
            - ls
            - LT
            - lt
            - LU
            - lu
            - LV
            - lv
            - LY
            - ly
            - MA
            - ma
            - MC
            - mc
            - MD
            - md
            - ME
            - me
            - MF
            - mf
            - MG
            - mg
            - MH
            - mh
            - MK
            - mk
            - ML
            - ml
            - MM
            - mm
            - MN
            - mn
            - MO
            - mo
            - MP
            - mp
            - MQ
            - mq
            - MR
            - mr
            - MS
            - ms
            - MT
            - mt
            - MU
            - mu
            - MV
            - mv
            - MW
            - mw
            - MX
            - mx
            - MY
            - my
            - MZ
            - mz
            - NA
            - na
            - NC
            - nc
            - NE
            - ne
            - NF
            - nf
            - NG
            - ng
            - NI
            - ni
            - NL
            - nl
            - 'NO'
            - 'no'
            - NP
            - np
            - NR
            - nr
            - NU
            - nu
            - NZ
            - nz
            - OM
            - om
            - PA
            - pa
            - PE
            - pe
            - PF
            - pf
            - PG
            - pg
            - PH
            - ph
            - PK
            - pk
            - PL
            - pl
            - PM
            - pm
            - PN
            - pn
            - PR
            - pr
            - PS
            - ps
            - PT
            - pt
            - PW
            - pw
            - PY
            - py
            - QA
            - qa
            - RE
            - re
            - RO
            - ro
            - RS
            - rs
            - RU
            - ru
            - RW
            - rw
            - SA
            - sa
            - SB
            - sb
            - SC
            - sc
            - SD
            - sd
            - SE
            - se
            - SG
            - sg
            - SH
            - sh
            - SI
            - si
            - SJ
            - sj
            - SK
            - sk
            - SL
            - sl
            - SM
            - sm
            - SN
            - sn
            - SO
            - so
            - SR
            - sr
            - SS
            - ss
            - ST
            - st
            - SV
            - sv
            - SX
            - sx
            - SY
            - sy
            - SZ
            - sz
            - TC
            - tc
            - TD
            - td
            - TF
            - tf
            - TG
            - tg
            - TH
            - th
            - TJ
            - tj
            - TK
            - tk
            - TL
            - tl
            - TM
            - tm
            - TN
            - tn
            - TO
            - to
            - TR
            - tr
            - TT
            - tt
            - TV
            - tv
            - TW
            - tw
            - TZ
            - tz
            - UA
            - ua
            - UG
            - ug
            - UM
            - um
            - US
            - us
            - UY
            - uy
            - UZ
            - uz
            - VA
            - va
            - VC
            - vc
            - VE
            - ve
            - VG
            - vg
            - VI
            - vi
            - VN
            - vn
            - VU
            - vu
            - WF
            - wf
            - WS
            - ws
            - YE
            - ye
            - YT
            - yt
            - ZA
            - za
            - ZM
            - zm
            - ZW
            - zw
          example: US
          type: string
        dob:
          description: Customer date of birth
          example: '1990-01-01T00:00:00.000Z'
          format: date-time
          type: string
        email:
          description: Customer email
          example: test@test.com
          type: string
        firstName:
          description: Customer first name
          example: John
          type: string
        ip:
          description: Customer IP
          example: 123.45.67.89
          type: string
        lastName:
          description: Customer last name
          example: Doe
          type: string
        phone:
          description: Customer phone
          example: '+1234567890'
          type: string
        state:
          description: Customer state
          example: CA
          type: string
        userAgent:
          description: Customer user agent
          example: >-
            Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
            like Gecko) Chrome/58.0.3029.110 Safari/537.3
          type: string
        zip:
          description: Customer zip
          example: '12345'
          type: string
      type: object
    TransactionDto:
      properties:
        action:
          description: Transaction action type
          enum:
            - SALE
            - PAYOUT
            - AUTHORIZE
            - REFUND
            - CHARGEBACK
          example: SALE
          type: string
        amount:
          description: >-
            Transaction amount in `currency`. Decimal string in major units,
            padded to the currency exponent ("10.00" EUR, "5000" JPY). Parse
            with a decimal library, never with parseFloat.
          example: '10.00'
          pattern: ^(0|[1-9]\d{0,19})(\.\d{1,18})?$
          type: string
        createdAt:
          description: Transaction creation timestamp
          example: '2023-12-25T10:00:00.000Z'
          format: date-time
          type: string
        currency:
          description: Transaction currency
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CAD
            - CDF
            - CHF
            - CLF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XAG
            - XAU
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMW
            - ZWL
          example: USD
          type: string
        currencyRate:
          anyOf:
            - description: Effective DCC rate as a plain decimal string; null without DCC.
              example: '0.9573935814433348'
              type: string
            - type: 'null'
        errorCode:
          anyOf:
            - description: >-
                Payment error/outcome reason. LIVEMODE_MISMATCH means the
                transaction was DECLINED before PSP dispatch; creation still
                returns HTTP 201 with status: true. PSP_OUTCOME_UNKNOWN means
                reconcile or poll; do not create another order.
                PSP_INPUT_INVALID identifies local legacy-submit
                serialization/codec failures; PSP_REQUEST_REJECTED identifies a
                definitive upstream rejection.
              example: PSP_OUTCOME_UNKNOWN
              type: string
            - type: 'null'
        feeAmount:
          anyOf:
            - description: >-
                Configured fee: money in `processingCurrency` for FIXED fees, a
                percent ("10" = 10 %) for PERCENTAGE fees. Decimal string.
              example: '10'
              pattern: ^(0|[1-9]\d{0,19})(\.\d{1,18})?$
              type: string
            - type: 'null'
        id:
          description: Transaction ID
          example: tr_xv0p2q5scocndpejk0nud75q
          type: string
        livemode:
          description: >-
            True for live payments; false for sandbox payments. Derived from the
            authenticated API key.
          example: true
          type: boolean
        orderId:
          description: Order ID from merchant system
          example: transaction_123
          type: string
        processingAmount:
          anyOf:
            - description: >-
                Amount in `processingCurrency`. Decimal string in major units,
                padded to the currency exponent ("10.00" EUR, "5000" JPY). Parse
                with a decimal library, never with parseFloat.
              example: '9.57'
              pattern: ^(0|[1-9]\d{0,19})(\.\d{1,18})?$
              type: string
            - type: 'null'
        processingAmountWithFee:
          anyOf:
            - description: >-
                Processing amount including a TOP fee, in `processingCurrency`.
                Decimal string in major units, padded to the currency exponent
                ("10.00" EUR, "5000" JPY). Parse with a decimal library, never
                with parseFloat.
              example: '10.53'
              pattern: ^(0|[1-9]\d{0,19})(\.\d{1,18})?$
              type: string
            - type: 'null'
        processingCurrency:
          description: Currency the PSP is charged in (differs from `currency` with DCC)
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CAD
            - CDF
            - CHF
            - CLF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VES
            - VND
            - VUV
            - WST
            - XAF
            - XAG
            - XAU
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMW
            - ZWL
          example: EUR
          type: string
        processingFeeAmount:
          anyOf:
            - description: >-
                Fee charged, in `processingCurrency`. Decimal string in major
                units, padded to the currency exponent ("10.00" EUR, "5000"
                JPY). Parse with a decimal library, never with parseFloat.
              example: '0.96'
              pattern: ^(0|[1-9]\d{0,19})(\.\d{1,18})?$
              type: string
            - type: 'null'
        status:
          description: Transaction status
          enum:
            - CREATED
            - WAIT_APPROVE
            - PROCESSING
            - CANCELED
            - DECLINED
            - SUCCESS
            - EXPIRED
          example: PROCESSING
          type: string
      required:
        - livemode
        - id
        - orderId
        - status
        - action
        - amount
        - currency
        - createdAt
      type: object
  securitySchemes:
    X-API-Key:
      in: header
      name: x-api-key
      type: apiKey

````

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