Coinflow refund API

The refund API from Coinflow — 4 operation(s) for refund.

OpenAPI Specification

coinflow-refund-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference authentication refund API
  version: 1.0.0
servers:
- url: https://api-sandbox.coinflow.cash/api
  description: https://api-sandbox.coinflow.cash/api
tags:
- name: refund
paths:
  /refunds:
    get:
      operationId: get-refunds
      summary: Get Refunds
      tags:
      - refund
      parameters:
      - name: since
        in: query
        required: false
        schema:
          type: string
      - name: until
        in: query
        required: false
        schema:
          type: string
      - name: status
        in: query
        required: false
        schema:
          type: string
      - name: source
        in: query
        required: false
        schema:
          type: string
      - name: method
        in: query
        required: false
        schema:
          type: string
      - name: merchantId
        in: query
        required: false
        schema:
          type: string
      - name: search
        in: query
        description: Payment ID or User ID / Customer ID
        required: false
        schema:
          type: string
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RefundInfo'
  /refunds/{refundId}/retry:
    post:
      operationId: retry-refund
      summary: Retry a Failed Refund
      tags:
      - refund
      parameters:
      - name: refundId
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refund_RetryRefund_Response_200'
  /refunds/payment/{paymentId}/all:
    get:
      operationId: get-refunds-via-payment-id
      summary: View All Refunds for Payment
      tags:
      - refund
      parameters:
      - name: paymentId
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IRefund'
  /refunds/payment/{paymentId}:
    get:
      operationId: get-refund-via-payment-id
      summary: View Refund Information for Payment
      tags:
      - refund
      parameters:
      - name: paymentId
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refund_GetRefundViaPaymentId_Response_200'
components:
  schemas:
    Blockchain.ETH:
      type: string
      enum:
      - eth
      title: Blockchain.ETH
    IPaymentMongooseTypesObjectIdDelayedSettlement:
      type: object
      properties:
        disbursedAt:
          type: string
          format: date-time
        isDisbursed:
          type: boolean
        days:
          type: number
          format: double
        scheduledDate:
          type: string
          format: date-time
        isScheduled:
          type: boolean
      required:
      - isDisbursed
      - days
      - scheduledDate
      - isScheduled
      title: IPaymentMongooseTypesObjectIdDelayedSettlement
    Blockchain.STELLAR:
      type: string
      enum:
      - stellar
      title: Blockchain.STELLAR
    SettlementLocations:
      type: string
      enum:
      - circle
      - brale
      - paper
      - brale_youpay
      - bastion
      title: SettlementLocations
    ApplePayIntegratorRegistration:
      type: object
      properties:
        domainNames:
          type: array
          items:
            type: string
        partnerMerchantName:
          type: string
        partnerMerchantValidationURI:
          type: string
        partnerInternalMerchantIdentifier:
          type: string
      required:
      - domainNames
      - partnerMerchantName
      - partnerMerchantValidationURI
      - partnerInternalMerchantIdentifier
      title: ApplePayIntegratorRegistration
    NameCustomerInfo:
      type: object
      properties:
        verificationId:
          type: string
        displayName:
          type: string
        address:
          type: string
        city:
          type: string
        state:
          type: string
        zip:
          type: string
        country:
          type: string
        ip:
          type: string
        lat:
          type: string
        lng:
          type: string
        dob:
          type: string
          description: Date of birth in YYYY-MM-DD format
        email:
          type: string
        name:
          type: string
      title: NameCustomerInfo
    IVenmoPaymentInfo:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/VenmoPaymentStatus'
        processor:
          $ref: '#/components/schemas/VenmoProcessor'
        token:
          type: string
        authOnly:
          type: boolean
        transaction:
          type: string
        capturePending:
          type: boolean
        sandboxSimulations:
          $ref: '#/components/schemas/IVenmoPaymentInfoSandboxSimulations'
      required:
      - status
      - processor
      - token
      title: IVenmoPaymentInfo
    CrbMerchantSettings:
      type: object
      properties:
        customerId:
          type: string
        cifNumber:
          type: string
        subledgerAccountNumber:
          type: string
        environment:
          $ref: '#/components/schemas/CrbEnvironment'
      required:
      - customerId
      description: 'The merchant''s CRB banking identity. CRB is onboarded manually in CRB''s

        dashboard — these values are pasted into our merchant dashboard and

        verified live against CRB before being persisted.'
      title: CrbMerchantSettings
    IMerchantUser:
      type: object
      properties:
        email:
          type: string
        password:
          type: string
        scope:
          $ref: '#/components/schemas/MerchantScope'
        secret:
          type: string
        resetNonce:
          type: string
        resetNonceUsed:
          type: boolean
        ssoProvider:
          $ref: '#/components/schemas/SsoProvider'
        ssoId:
          type: string
      required:
      - email
      - scope
      title: IMerchantUser
    ICustomerStringBlockConfigOverride:
      type: object
      properties:
        maxDistinctTokensPer30Days:
          type: number
          format: double
      description: Per-customer overrides of merchant `blockConfig`. Only honored when they raise the effective limit.
      title: ICustomerStringBlockConfigOverride
    PayoutProviderOption:
      type: string
      enum:
      - aptpay
      - coinfx
      - checkbook
      - BRAID
      - brale
      - mock
      title: PayoutProviderOption
    VenmoPaymentStatus:
      type: string
      enum:
      - INITIATED
      - AUTHORIZED
      - DEPOSITED
      - SETTLED
      - REFUNDED
      - FAILED
      - CHARGEBACK
      - CHARGEBACK_LOST
      - CHARGEBACK_WON
      - VOIDED
      title: VenmoPaymentStatus
    IMerchantStringRiskControls:
      type: object
      properties:
        topup:
          $ref: '#/components/schemas/TopupRiskControls'
      title: IMerchantStringRiskControls
    Blockchain.ARBITRUM:
      type: string
      enum:
      - arbitrum
      title: Blockchain.ARBITRUM
    ApaPaymentStatus:
      type: string
      enum:
      - INITIATED
      - APPROVED
      - DEPOSITED
      - SETTLED
      - FAILED
      - REFUNDED
      title: ApaPaymentStatus
    EftPayoutProvider:
      type: string
      enum:
      - checkbook
      - aptpay
      - mock
      title: EftPayoutProvider
    OverrideMethod.CustomerOverride:
      type: string
      enum:
      - customer_override
      title: OverrideMethod.CustomerOverride
    CustomWithdrawFeesConfig:
      type: object
      properties:
        asap:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        same_day:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        standard:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        card:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        iban:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        pix:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        eft:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        venmo:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        paypal:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        wire:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        interac:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        global:
          $ref: '#/components/schemas/CustomWithdrawFeeValue'
        lineItemLabel:
          type: string
        isBundled:
          type: boolean
      required:
      - global
      - lineItemLabel
      - isBundled
      description: Make all properties in T optional
      title: CustomWithdrawFeesConfig
    BlockedLevel:
      type: string
      enum:
      - Unverified
      - Suspended
      title: BlockedLevel
    ReserveStatus:
      type: string
      enum:
      - Disabled
      - Active
      - SweepFixed
      title: ReserveStatus
    MerchantRfiRef:
      type: object
      properties:
        name:
          type: string
        status:
          $ref: '#/components/schemas/RfiStatus'
        url:
          type: string
        assignmentFormId:
          type: string
      required:
      - name
      - status
      - url
      title: MerchantRfiRef
    ISubscriptionMongooseTypesObjectIdCustomer:
      oneOf:
      - $ref: '#/components/schemas/mongoose.Types.ObjectId'
      - $ref: '#/components/schemas/ICustomer_mongoose.Types.ObjectId_'
      title: ISubscriptionMongooseTypesObjectIdCustomer
    RefundStatus:
      type: string
      enum:
      - Pending
      - Invoiced
      - Settled
      - Failed
      title: RefundStatus
    ACHSettings:
      type: object
      properties:
        processor:
          $ref: '#/components/schemas/AchProcessor'
        feeMode:
          $ref: '#/components/schemas/FeePayerMode'
        maxAmount:
          $ref: '#/components/schemas/Cents'
        nameMatchThreshold:
          type: number
          format: double
        requireKycBeforePurchase:
          type: boolean
        withdrawNameMatchThreshold:
          type: number
          format: double
        allowDelayedTransactions:
          type: boolean
        customerEmailNotifications:
          type: boolean
        merchantEmailNotifications:
          type: boolean
        instantSettle:
          type: boolean
        minFee:
          $ref: '#/components/schemas/Cents'
        maxFee:
          $ref: '#/components/schemas/Cents'
        feeBps:
          type: number
          format: double
        fixedFee:
          $ref: '#/components/schemas/Cents'
        settlementDays:
          type: number
          format: double
        refundFeeSettings:
          $ref: '#/components/schemas/RefundFeeSettings'
      required:
      - allowDelayedTransactions
      - customerEmailNotifications
      - merchantEmailNotifications
      - instantSettle
      title: ACHSettings
    IPayment_mongoose.Types.ObjectId_:
      type: object
      properties:
        _id:
          $ref: '#/components/schemas/mongoose.Types.ObjectId'
        paymentId:
          type: string
        paymentIntentId:
          type: string
        totals:
          $ref: '#/components/schemas/TotalsResponse'
        customer:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdCustomer'
        merchant:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdMerchant'
        chargebackProtectionDecision:
          $ref: '#/components/schemas/ChargebackProtectionDecision'
        liabilityOwner:
          $ref: '#/components/schemas/LiabilityOwner'
        error:
          type: string
        signature:
          type: string
        webhookInfo:
          $ref: '#/components/schemas/AnyObject'
        createdAt:
          type: string
          format: date-time
        velocityDate:
          type: string
          format: date-time
          description: 'Date when velocity check was done and used to bucket payments into velocity days

            Should match when a velocity hold was created if one was'
        cardInfo:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdCardInfo'
        bankTransferInfo:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdBankTransferInfo'
        pixInfo:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdPixInfo'
        ibanInfo:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdIbanInfo'
        wireInfo:
          $ref: '#/components/schemas/IWirePaymentInfo'
        cashAppInfo:
          $ref: '#/components/schemas/ICashAppPaymentInfo'
        paypalInfo:
          $ref: '#/components/schemas/IPayPalPaymentInfo'
        venmoInfo:
          $ref: '#/components/schemas/IVenmoPaymentInfo'
        apaInfo:
          $ref: '#/components/schemas/IApaPaymentInfo'
        interacInfo:
          $ref: '#/components/schemas/IInteracPaymentInfo'
        cryptoInfo:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdCryptoInfo'
        exchangeInfo:
          $ref: '#/components/schemas/ExchangeInfo'
        subscription:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdSubscription'
        settlementType:
          $ref: '#/components/schemas/SettlementType'
        blockchain:
          $ref: '#/components/schemas/OperationalBlockchain'
        wallet:
          type: string
        redemptionCheck:
          type: boolean
        marketplaceInfo:
          $ref: '#/components/schemas/MarketplaceInfo'
        destination:
          type: string
        destinationSettlementToken:
          type: string
        overrideAuditLog:
          $ref: '#/components/schemas/OverrideAuditLog'
        customerUsdcTransferData:
          $ref: '#/components/schemas/CustomerUsdcTransferData'
        customerUsdcTransferDataV2:
          $ref: '#/components/schemas/CustomerUsdcTransferDataV2'
        delayedSettlement:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdDelayedSettlement'
        referrer:
          type: string
        alertStatus:
          $ref: '#/components/schemas/KytAlertStatus'
        refundInfo:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdRefundInfo'
        userLocation:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdUserLocation'
          description: 'Browser-captured geolocation at the time of the request, when the caller

            supplied one. Stored independently of payment method so the merchant

            dashboard can render a map for any purchase type. `resolved*` fields are

            populated when the GEOLOCATION enforcement step happened to reverse-

            geocode the coordinates — they''re a free piggyback on the lock cache,

            not a guarantee.'
        entityTag:
          $ref: '#/components/schemas/EntityTag'
        vendorTransfer:
          $ref: '#/components/schemas/IPaymentMongooseTypesObjectIdVendorTransfer'
        feesInvoicedPeriod:
          type: string
        vendorInfo:
          $ref: '#/components/schemas/Record_string.string_'
      required:
      - _id
      - paymentId
      - totals
      - customer
      - merchant
      - chargebackProtectionDecision
      - createdAt
      title: IPayment_mongoose.Types.ObjectId_
    ICustomerStringMerchant:
      oneOf:
      - type: string
      - $ref: '#/components/schemas/IMerchant_string_'
      title: ICustomerStringMerchant
    RainAutoTopUpCadence:
      type: string
      enum:
      - transaction
      - hour
      - day
      - week
      - month
      title: RainAutoTopUpCadence
    CustomerUsdcTransferDataV2:
      type: object
      properties:
        from:
          type: string
        to:
          type: string
        value:
          type: string
        validAfter:
          $ref: '#/components/schemas/CustomerUsdcTransferDataV2ValidAfter'
        validBefore:
          $ref: '#/components/schemas/CustomerUsdcTransferDataV2ValidBefore'
        nonce:
          type: string
        signature:
          type: string
      required:
      - from
      - to
      - value
      - validAfter
      - validBefore
      - nonce
      - signature
      description: 'V2 of CustomerUsdcTransferData — replaces the (v, r, s) triple with a single

        `signature` bytes string, matching USDC FiatTokenV2_2''s bytes-overload

        `transferWithAuthorization`. All other fields unchanged from V1.'
      title: CustomerUsdcTransferDataV2
    IPaymentMongooseTypesObjectIdRefundInfo:
      type: object
      properties:
        count:
          type: number
          format: double
        refundedAt:
          type: string
          format: date-time
        amount:
          $ref: '#/components/schemas/CurrencyCents'
      required:
      - count
      - refundedAt
      - amount
      title: IPaymentMongooseTypesObjectIdRefundInfo
    IPaymentMongooseTypesObjectIdPixInfo:
      type: object
      properties:
        reason:
          type: string
        processed:
          type: string
          format: date-time
        transaction:
          type: string
        tokenSubtotal:
          $ref: '#/components/schemas/TokenSubtotal'
        expiration:
          type: string
          format: date-time
        processor:
          $ref: '#/components/schemas/PixProcessor'
        status:
          $ref: '#/components/schemas/PixPaymentStatus'
      required:
      - expiration
      - processor
      - status
      title: IPaymentMongooseTypesObjectIdPixInfo
    HighnoteMerchantSettings:
      type: object
      properties:
        businessId:
          type: string
        primaryAuthorizedPersonId:
          type: string
          description: 'Highnote id of the primary business person, captured from the

            createBusiness response — onboardBusiness attributes its consent to it.'
        merchantAcceptorId:
          type: string
        applicationSubmittedAt:
          type: string
          format: date-time
          description: 'Set when onboardBusiness (the ProductApplication submission) succeeded.

            A re-run while underwriting is still Pending must not re-submit the

            application — Highnote rejects duplicates, which would overwrite a

            healthy Pending status with an error.'
      required:
      - businessId
      title: HighnoteMerchantSettings
    TokenizationProviderOption:
      type: string
      enum:
      - bt
      - tokenex
      title: TokenizationProviderOption
    NuveiV1MerchantArgs:
      type: object
      properties:
        merchantId:
          type: string
        merchantSiteId:
          type: string
        conversionAffiliateCountryCode:
          type: string
      required:
      - merchantId
      - merchantSiteId
      title: NuveiV1MerchantArgs
    RefundsPaymentPaymentIdGetResponsesContentApplicationJsonSchemaMerchant:
      oneOf:
      - $ref: '#/components/schemas/mongoose.Types.ObjectId'
      - $ref: '#/components/schemas/IMerchant_mongoose.Types.ObjectId_'
      title: RefundsPaymentPaymentIdGetResponsesContentApplicationJsonSchemaMerchant
    Partial_WithdrawLimit_:
      type: object
      properties:
        singleTxLimit:
          $ref: '#/components/schemas/Cents'
        dailyLimit:
          $ref: '#/components/schemas/Cents'
        monthlyLimit:
          $ref: '#/components/schemas/Cents'
      description: Make all properties in T optional
      title: Partial_WithdrawLimit_
    InterchangeSettings:
      type: object
      properties:
        useType:
          type: boolean
        useRegion:
          type: boolean
        useScheme:
          type: boolean
        useBrand:
          type: boolean
        useDurbin:
          type: boolean
      required:
      - useType
      - useRegion
      - useScheme
      - useBrand
      - useDurbin
      title: InterchangeSettings
    IRefundPayment:
      oneOf:
      - type: string
      - $ref: '#/components/schemas/IPayment_string_'
      title: IRefundPayment
    VerificationVendor:
      type: string
      enum:
      - middesk
      - sumsub
      - sumsub_docv
      - persona
      - persona_kyb
      title: VerificationVendor
    InteracPaymentStatus:
      type: string
      enum:
      - INITIATED
      - DEPOSITED
      - SETTLED
      - FAILED
      - EXPIRED
      - REFUNDED
      title: InteracPaymentStatus
    Record_any.any_:
      type: object
      properties: {}
      description: Construct a type with a set of properties K of type T
      title: Record_any.any_
    InteracPayoutProvider:
      type: string
      enum:
      - checkbook
      - mock
      - aptpay
      title: InteracPayoutProvider
    IMerchantStringWithdrawFeePayment:
      type: object
      properties:
        paysGasFees:
          $ref: '#/components/schemas/Partial_Record_Blockchain.boolean__'
        bundleDelegatedPayoutFees:
          type: boolean
        paysSwapFees:
          type: boolean
        paysWithdrawFees:
          type: boolean
      title: IMerchantStringWithdrawFeePayment
    Blockchain.MONAD:
      type: string
      enum:
      - monad
      title: Blockchain.MONAD
    ISubscriptionStringMerchant:
      oneOf:
      - type: string
      - $ref: '#/components/schemas/IMerchant_string_'
      title: ISubscriptionStringMerchant
    CryptoTiers:
      type: string
      enum:
      - stables
      - majors
      - volatile
      title: CryptoTiers
    VerificationStatus:
      type: string
      enum:
      - pending
      - partial-approval
      - approved
      - rejected
      - expired
      title: VerificationStatus
    Blockchain:
      type: string
      enum:
      - solana
      - eth
      - polygon
      - base
      - user
      - arbitrum
      - stellar
      - monad
      - tempo
      title: Blockchain
    VelocityLimitMode:
      type: string
      enum:
      - default
      - dynamic
      - custom
      - no_limit
      title: VelocityLimitMode
    WebhookVersion:
      type: string
      enum:
      - Legacy
      - Version 1
      - Version 2
      - Version 3
      title: WebhookVersion
    SubscriptionInterval:
      type: string
      enum:
      - Daily
      - Weekly
      - Monthly
      - Yearly
      title: SubscriptionInterval
    OverrideMethod:
      type: string
      enum:
      - customer_override
      - ignored_rejection
      - pending_review
      - inline_override
      title: OverrideMethod
    IPaymentStringSubscription:
      oneOf:
      - type: string
      - $ref: '#/components/schemas/ISubscription_string_'
      title: IPaymentStringSubscription
    ApaCredentialType:
      type: string
      enum:
      - PHONE
      - EMAIL
      - PAN
      title: ApaCredentialType
    BinInfo:
      type: object
      properties:
        cardType:
          $ref: '#/components/schemas/Funding'
        cardName:
          type: string
        cardSegment:
          $ref: '#/components/schemas/Segment'
        country:
          $ref: '#/components/schemas/BinInfoCountry'
        bankName:
          type: string
      required:
      - cardType
      - cardName
      - cardSegment
      - country
      - bankName
      title: BinInfo
    IMerchantMongooseTypesObjectIdWalletsStellar:
      type: object
      properties:
        usdcPayer:
          type: string
      required:
      - usdcPayer
      title: IMerchantMongooseTypesObjectIdWalletsStellar
    RainAccountDetails:
      type: object
      properties:
        beneficiaryName:
          type: string
        beneficiaryAddress:
          type: string
        beneficiaryBankName:
          type: string
        beneficiaryBankAddress:
          type: string
        accountNumber:
          type: string
        routingNumber:
          type: string
      required:
      - beneficiaryName
      - beneficiaryAddress
      - accountNumber
      - routingNumber
      title: RainAccountDetails
    WithdrawSort:
      type: string
      enum:
      - DEFAULT
      - CHEAPEST
      - ORDERED
      - LIMIT_CONSUMPTION
      title: WithdrawSort
    Cents:
      type: object
      properties:
        cents:
          type: integer
      required:
      - cents
      title: Cents
    RainAutoTopUpSettings:
      type: object
      properties:
        enabled:
          type: boolean
        targetUsdc:
          type: number
          format: double
        cadence:
          $ref: '#/components/schemas/RainAutoTopUpCadence'
        lastRunAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type: string
      required:
      - enabled
      - targetUsdc
      - cadence
      title: RainAutoTopUpSettings
    Record_string.any_:
      type: object
      properties: {}
      description: Construct a type with a set of properties K of type T
      title: Record_string.any_
    InteracSettings:
      type: object
      properties:
        processor:
          $ref: '#/components/schemas/InteracProcessor'
        feeMode:
          $ref: '#/components/schemas/FeePayerMode'
        fxFeeMode:
          $ref: '#/components/schemas/FeePayerMode'
        fixedFee:
          $ref: '#/components/schemas/Cents'
        feeBps:
          type: number
          format: double
        minFee:
          $ref: '#/components/schemas/Cents'
        customerEmailNotifications:
          type: boolean
        merchantEmailNotifications:
          type: boolean
      required:
      - customerEmailNotifications
      - merchantEmailNotifications
      title: InteracSettings
    CurrencyCents:
      type: object
      properties:
        cents:
          type: integer
        currency:
          $ref: '#/components/schemas/Currency'
      required:
      - cents
      - currency
      title: CurrencyCents
    RefundSource:
      type: string
      enum:
      - Credits
      - Usdc
      - Settlement
      - None
      title: RefundSource
    ProgramWhitelistStatus:
      type: string
      enum:
      - approved
      - pending
      - rejected
      title: ProgramWhitelistStatus
    AptpayCanadaMerchantSettings:
      type: object
      properties:
        id:
          type: string
      required:
      - id
      title: AptpayCanadaMerchantSettings
    AftSettings:
      type: object
      properties:
        enabled:
          type: boolean
        type:
          $ref: '#/components/schemas/AftType'
        purpose:
          $ref: '#/components/schemas/AftPurpose'
        merchantA2AMastercardAftRecipient:
          $ref: '#/components/schemas/AftSettingsMerchantA2AMastercardAftRecipient'
      required:
      - enabled
      - type
      - purpose
      title: AftSettings
    FeePayerMode:
      type: string
      enum:
      - user
      - merchant
      - invoice
      title: FeePayerMode
    RefundsPaymentPaymentIdGetResponsesContentApplicationJsonSchemaPayment:
      oneOf:
      - $ref: '#/components/schemas/mongoose.Types.ObjectId'
      - $ref: '#/components/schemas/IPayment_mongoose.Types.ObjectId_'
      title: RefundsPaymentPaymentIdGetResponsesContentApplicationJsonSchemaPayment
    IMerchantStringApiKeysItems:
      type: object
      properties:
        scope:
          $ref: '#/components/schemas/MerchantScope'
        ips:
          type: array
          items:
            type: string
        disabled:
          type: boolean
        privateUuid:
          type: string
        publicUuid:
          type: string
      required:
      - ips
      - privateUuid
      - publicUuid
      title: IMerchantStringApiKeysItems
    IMerchantMongooseTypesObjectIdApiKeysItems:
      type: object
      properties:
        scope:
          $ref: '#/components/schemas/MerchantScope'
        ips:
          type: array
          items:
            type: string
        disabled:
          type: boolean
        privateUuid:
          type: string
        publicUuid:
          type: string
      required:
      - ips
      - privateUuid
      - publicUuid
      title: IMerchantMongooseTypesObjectIdApiKeysItems
    IvySettings:
      type: object
      properties:
        gbpPayinAccountId:
          type: string
        eurAccountId:
          type: string
      required:
      - gbpPayinAccountId
      - eurAccountId
      title: IvySettings
    BlockingRuleScope:
      type: string
      enum:
      - WITHDRAWAL
      - CHECKOUT
      - GLOBAL
      title: BlockingRuleScope
    EditorType:
      type: string
      enum:
      - Coinflow
      - Merchant
      title: EditorType
    IbanPayoutProvider:
      type: string
      enum:
      - merge
      - mock
      - ivy
      title: IbanPayoutProvider
    IRefund:
      type: object
      properties:
        _id:
          type: string
        totals:
          $ref: '#/components/schemas/RefundTotals'
        customer:
          $ref: '#/components/schemas/IRefundCustomer'
        merchant:
          $ref: '#/components/schemas/IRefundMerchant'
        payment:
          $ref: '#/components/schemas/IRefundPayment'
        signature:
          type: string
        status:
          $ref: '#/components/schemas/RefundStatus'
        reimbursementStatus:
          $ref: '#/components/schemas/ReimbursementStatus'
        reimbursementId:
          type: string
        outstanding:
          $ref: '#/components/schemas/Cents'
        source:
          $ref: '#/components/schemas/RefundSource'
        method:
          $ref: '#/components/schemas/RefundMethod'
        provider:
          type: string
        invoicedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        reason:
          $ref: '#/components/schemas/RefundReason'
        refundedBy:
          $ref: '#/components/schemas/MerchantEditor'
        failureReason:
          type: string
        cryptoRefundInfo:
          $ref: '#/components/schemas/CryptoRefundInfo'
        walletDebitStatus:
          $ref: '#/components/schemas/WalletDebitStatus'
        walletDebitTxHash:
          type: string
        returnSignature:
          type: string
      required:
      - _id
      - totals
      - customer
      - merchant
      - payment
      - status
      - reimbursementStatus
      - outstanding
      - source
      - method
      - provider
      - createdAt
      - updatedAt
      title: IRefund
    LinkedBankAccount:
      type: object
      properties:
        routingNumber:
          type: string
        accountNumber:
          type: string
        accountType:
          $ref: '#/components/schemas/LinkedBankAccountAccountType'
        institutionName:
          type: string
        plaidAccessToken:
          type: string
        plaidAccountId:
          type: string
      required:
      - routingNumber
      - accountNumber
      - accountType
      - plaidAccessToken
      - plaidAccountId
      title: LinkedBankAccount
    CashAppSettings:
      type: object
      properties:
        processor:
          $ref: '#/components/schemas/CashAppProcessor'
        feeMode:
          $ref: '#/components/schemas/FeePayerMode'
        fxFeeMode:
          $ref: '#/components/schemas/FeePayerMode'
        fixedFee:
          $ref: '#/components/schemas/Cents'
        feeBps:
          type: number
          format: double
        minFee:
          $ref: '#/components/schemas/Cents'
        customerEmailNotifications:
          type: boolean
        merchantEmailNotifications:
          type: boolean
      required:
    

# --- truncated at 32 KB (185 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/coinflow/refs/heads/main/openapi/coinflow-refund-api-openapi.yml