Xflow FeePlans API

The FeePlans API from Xflow — 2 operation(s) for feeplans.

OpenAPI Specification

xflow-feeplans-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  contact:
    email: support@xflowpay.com
    name: Xflow Support
    url: https://xflowpay.com
  description: The Xflow REST API. Please see https://docs.xflowpay.com/2024-02-05/api for more details.
  termsOfService: https://docs.xflowpay.com/platform-agreement
  title: Xflow Accounts FeePlans API
  version: '2024-02-05'
servers:
- url: https://api.xflowpay.com/
security:
- bearerAuth: []
tags:
- name: FeePlans
paths:
  /v1/fee_plans:
    get:
      description: Returns a list of FeePlans.
      operationId: ListFeePlans
      parameters:
      - description: This header specifies the connected user's account on behalf of which the request is being made.
        in: header
        name: Xflow-Account
        required: false
        schema:
          type: string
      - description: Return results where the `created` field is equal to the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: created.eq
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `created` field is greater than the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: created.gt
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `created` field is greater than or equal to the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: created.gte
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `created` field is lesser than the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: created.lt
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `created` field is lesser than or equal to the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: created.lte
        required: false
        schema:
          format: unix-time
          type: integer
      - description: A cursor for use in pagination. `ending_before` is an object identifier that defines your place in the list. For instance, if you make a list request and receive 5 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
        in: query
        name: ending_before
        required: false
        schema:
          type: string
      - description: A limit on the number of objects to be returned, between 1 and 10. If this parameter is not specified, a default value of 10 is assumed.
        in: query
        name: limit
        required: false
        schema:
          type: integer
      - description: Unique identifier of an account object associated with this FeePlan.
        in: query
        name: linked_id
        required: false
        schema:
          items:
            enum:
            - account
            type: string
          type: array
      - description: A cursor for use in pagination. `starting_after` is an object identifier that defines your place in the list. For instance, if you make a list request and receive 5 objects, ending with `obj_bar`, your subsequent call can include `starting_after=obj_bar` in order to fetch the next page of the list.
        in: query
        name: starting_after
        required: false
        schema:
          type: string
      - description: The status of the FeePlan.
        in: query
        name: status
        required: false
        schema:
          items:
            enum:
            - activated
            - deactivated
            type: string
          type: array
      - description: The type of FeePlan.
        in: query
        name: type
        required: false
        schema:
          enum:
          - account_fees
          - account_fees_passthrough
          type: string
      - description: Return results where the `validity.from` field is equal to the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.from.eq
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `validity.from` field is greater than the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.from.gt
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `validity.from` field is greater than or equal to the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.from.gte
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `validity.from` field is lesser than the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.from.lt
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `validity.from` field is lesser than or equal to the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.from.lte
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `validity.to` field is equal to the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.to.eq
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `validity.to` field is greater than the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.to.gt
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `validity.to` field is greater than or equal to the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.to.gte
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `validity.to` field is lesser than the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.to.lt
        required: false
        schema:
          format: unix-time
          type: integer
      - description: Return results where the `validity.to` field is lesser than or equal to the timestamp value in seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
        in: query
        name: validity.to.lte
        required: false
        schema:
          format: unix-time
          type: integer
      responses:
        '200':
          headers:
            Date:
              schema:
                type: string
            Content-Length:
              schema:
                type: integer
            Connection:
              schema:
                type: string
            x-amzn-RequestId:
              schema:
                type: string
            xflow-request-id:
              schema:
                type: string
            x-amz-apigw-id:
              schema:
                type: string
            X-Amzn-Trace-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/fee_plan'
                    type: array
                  has_next:
                    description: True if this list has another page of items after this one that can be fetched.
                    type: boolean
                  object:
                    description: String representing the object's type. Objects of the same type share the same value. Always has the value `list`.
                    enum:
                    - list
                    type: string
                title: ListFeePlansResponse
                type: object
          description: Successful response.
        default:
          headers:
            Date:
              schema:
                type: string
            Content-Length:
              schema:
                type: integer
            Connection:
              schema:
                type: string
            x-amzn-RequestId:
              schema:
                type: string
            xflow-request-id:
              schema:
                type: string
            x-amz-apigw-id:
              schema:
                type: string
            X-Amzn-Trace-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_object'
          description: Error response.
      tags:
      - FeePlans
    post:
      description: Create a FeePlan.
      operationId: CreateFeePlan
      parameters:
      - description: This header specifies the connected user's account on behalf of which the request is being made.
        in: header
        name: Xflow-Account
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                deposit:
                  description: Deposit fee details.
                  items:
                    properties:
                      currency:
                        description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the amount currency.
                        type: string
                      enabled:
                        description: This represents whether the payment method is enabled or not.
                        type: boolean
                      payment_method_name:
                        description: This represents the name of the payment method.
                        enum:
                        - affirm
                        - afterpay
                        - check
                        - ach_debit
                        - klarna
                        type: string
                      payment_method_type:
                        description: This represents the name of the payment method type.
                        enum:
                        - buy_now_pay_later
                        - check
                        - domestic_debit
                        type: string
                      processing_fee_indicator:
                        description: This is an account level setting which defines how fees associated with specific payment methods are split between the partner and the Xflow user.
                        enum:
                        - partner
                        - shared
                        - user
                        type: string
                      variable:
                        description: This is the percentage value that is used to calculate the fee.
                        type: string
                    title: CreateFeePlanDeposit
                    type: object
                  type: array
                metadata:
                  additionalProperties:
                    type: string
                  description: Set of [key-value pairs](https://docs.xflowpay.com/2024-02-05/api#metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
                  title: CreateFeePlanRequestMetadata
                  type: object
                linked_id:
                  description: Unique identifier of an account object associated with this FeePlan.
                  type: string
                linked_object:
                  description: The type of object that this FeePlan object is associated with. This can only be `account` for now.
                  enum:
                  - account
                  type: string
                payout:
                  description: Payout fee details.
                  items:
                    properties:
                      destination_currency:
                        description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the destination amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                        type: string
                      fixed:
                        description: Fixed payout fee amount.
                        type: string
                      minimum:
                        description: Minimum payout fee amount.
                        type: string
                      source_currency:
                        description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the source amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                        type: string
                      variable:
                        description: This is the percentage value that is used to calculate the fee.
                        type: string
                    title: CreateFeePlanPayout
                    type: object
                  type: array
                payout_fx:
                  description: Payout FX fee details.
                  items:
                    properties:
                      destination_currency:
                        description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the destination amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                        type: string
                      reference_rate:
                        description: FX markup reference rate. This can be set to `mid_market` for all currency pairs or `inter_bank` for `source_currency=USD` and `destination_currency=INR`.
                        enum:
                        - inter_bank
                        - mid_market
                        type: string
                      source_currency:
                        description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the source amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                        type: string
                      variable:
                        description: This is the percentage value that is used to calculate the fee.
                        type: string
                    title: CreateFeePlanPayoutFX
                    type: object
                  type: array
                receivable_reconcile:
                  description: Receivable reconcile fee details.
                  type: array
                  items:
                    type: object
                    title: FeePlanReceivableReconcile
                    properties:
                      destination_currency:
                        description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the destination amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                        type: string
                      fixed:
                        description: Fixed receivable reconcile fee amount.
                        type: string
                      minimum:
                        description: Minimum receivable reconcile fee amount.
                        type: string
                      source_currency:
                        description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the source amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                        type: string
                      variable:
                        description: This is the percentage value that is used to calculate the fee.
                        type: string
                transfer_fx:
                  description: Transfer FX fee details.
                  items:
                    properties:
                      destination_currency:
                        description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the destination amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                        type: string
                      reference_rate:
                        description: FX markup reference rate. This can be set to `mid_market`.
                        enum:
                        - mid_market
                        type: string
                      source_currency:
                        description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the source amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                        type: string
                      variable:
                        description: This is the percentage value that is used to calculate the fee.
                        type: string
                      variable_off_hours:
                        description: This is the percentage value that is used to calculate the fee when the transfer is initiated outside of market hours.
                        type: string
                    title: CreateFeePlanTransferFX
                    type: object
                  type: array
                type:
                  description: The type of FeePlan.
                  enum:
                  - account_fees
                  - account_fees_passthrough
                  type: string
              required:
              - linked_id
              - linked_object
              - type
              title: CreateFeePlanRequest
              type: object
      responses:
        '200':
          headers:
            Date:
              schema:
                type: string
            Content-Length:
              schema:
                type: integer
            Connection:
              schema:
                type: string
            x-amzn-RequestId:
              schema:
                type: string
            xflow-request-id:
              schema:
                type: string
            x-amz-apigw-id:
              schema:
                type: string
            X-Amzn-Trace-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fee_plan'
          description: Successful response.
        default:
          headers:
            Date:
              schema:
                type: string
            Content-Length:
              schema:
                type: integer
            Connection:
              schema:
                type: string
            x-amzn-RequestId:
              schema:
                type: string
            xflow-request-id:
              schema:
                type: string
            x-amz-apigw-id:
              schema:
                type: string
            X-Amzn-Trace-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_object'
          description: Error response.
      tags:
      - FeePlans
  /v1/fee_plans/{fee_plan}:
    get:
      description: Retrieves the details of an account.
      operationId: RetrieveFeePlan
      parameters:
      - description: This header specifies the connected user's account on behalf of which the request is being made.
        in: header
        name: Xflow-Account
        required: false
        schema:
          type: string
      - in: path
        name: fee_plan
        required: true
        schema:
          type: string
        style: simple
      responses:
        '200':
          headers:
            Date:
              schema:
                type: string
            Content-Length:
              schema:
                type: integer
            Connection:
              schema:
                type: string
            x-amzn-RequestId:
              schema:
                type: string
            xflow-request-id:
              schema:
                type: string
            x-amz-apigw-id:
              schema:
                type: string
            X-Amzn-Trace-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fee_plan'
          description: Successful response.
        default:
          headers:
            Date:
              schema:
                type: string
            Content-Length:
              schema:
                type: integer
            Connection:
              schema:
                type: string
            x-amzn-RequestId:
              schema:
                type: string
            xflow-request-id:
              schema:
                type: string
            x-amz-apigw-id:
              schema:
                type: string
            X-Amzn-Trace-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_object'
          description: Error response.
      tags:
      - FeePlans
    post:
      description: Update the details of a FeePlan.
      operationId: UpdateFeePlan
      parameters:
      - description: This header specifies the connected user's account on behalf of which the request is being made.
        in: header
        name: Xflow-Account
        required: false
        schema:
          type: string
      - in: path
        name: fee_plan
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                metadata:
                  additionalProperties:
                    type: string
                  description: Set of [key-value pairs](https://docs.xflowpay.com/2024-02-05/api#metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
                  title: UpdateFeePlanRequestMetadata
                  type: object
              title: UpdateFeePlanRequest
              type: object
      responses:
        '200':
          headers:
            Date:
              schema:
                type: string
            Content-Length:
              schema:
                type: integer
            Connection:
              schema:
                type: string
            x-amzn-RequestId:
              schema:
                type: string
            xflow-request-id:
              schema:
                type: string
            x-amz-apigw-id:
              schema:
                type: string
            X-Amzn-Trace-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/fee_plan'
          description: Successful response.
        default:
          headers:
            Date:
              schema:
                type: string
            Content-Length:
              schema:
                type: integer
            Connection:
              schema:
                type: string
            x-amzn-RequestId:
              schema:
                type: string
            xflow-request-id:
              schema:
                type: string
            x-amz-apigw-id:
              schema:
                type: string
            X-Amzn-Trace-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_object'
          description: Error response.
      tags:
      - FeePlans
components:
  schemas:
    fee_plan:
      description: The FeePlan object models the different fees for a platform, direct user and connected user.
      properties:
        created:
          description: The seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the FeePlan was created.
          format: unix-time
          type: integer
        deposit:
          description: Deposit fee details.
          items:
            properties:
              currency:
                description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the amount currency.
                type: string
              enabled:
                description: This represents whether the payment method is enabled or not.
                type: boolean
              payment_method_name:
                description: This represents the name of the payment method.
                enum:
                - affirm
                - afterpay
                - check
                - ach_debit
                - klarna
                type: string
              payment_method_type:
                description: This represents the name of the payment method type.
                enum:
                - buy_now_pay_later
                - check
                - domestic_debit
                type: string
              processing_fee_indicator:
                description: This is an account level setting which defines how fees associated with specific payment methods are split between the partner and the Xflow user.
                enum:
                - partner
                - shared
                - user
                type: string
              variable:
                description: This is the percentage value that is used to calculate the fee.
                type: string
            title: FeePlanDeposit
            type: object
          nullable: true
          type: array
        id:
          description: Unique identifier for the object.
          type: string
        linked_id:
          description: Unique identifier of an account object associated with this FeePlan.
          type: string
        linked_object:
          description: The type of object that this FeePlan object is associated with. This can only be `account` for now.
          enum:
          - account
          type: string
        livemode:
          description: Has the value true if the object exists in `livemode` or the value false if the object exists in `testmode`.
          type: boolean
        metadata:
          additionalProperties:
            type: string
          description: Additional information associated with the error in the form of key-value pairs.
          title: FeePlanMetadata
          nullable: true
          type: object
        object:
          description: String representing the object's type. Objects of the same type share the same value.
          enum:
          - fee_plan
          type: string
        payout:
          description: Payout fee details.
          items:
            properties:
              destination_currency:
                description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the destination amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                type: string
              fixed:
                description: Fixed payout fee amount.
                type: string
              minimum:
                description: Minimum payout fee amount.
                type: string
              source_currency:
                description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the source amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                type: string
              variable:
                description: This is the percentage value that is used to calculate the fee.
                type: string
            title: FeePlanPayout
            type: object
          type: array
        payout_fx:
          description: Payout FX fee details.
          items:
            properties:
              destination_currency:
                description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the destination amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                type: string
              reference_rate:
                description: FX markup reference rate. This can be set to `mid_market` for all currency pairs or `inter_bank` for `source_currency=USD` and `destination_currency=INR`.
                enum:
                - inter_bank
                - mid_market
                type: string
              source_currency:
                description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the source amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                type: string
              variable:
                description: This is the percentage value that is used to calculate the fee.
                type: string
            title: FeePlanPayoutFX
            type: object
          type: array
        receivable_reconcile:
          description: Receivable reconcile fee details.
          type: array
          items:
            type: object
            title: FeePlanReceivableReconcile
            properties:
              destination_currency:
                description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the destination amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                type: string
              fixed:
                description: Fixed receivable reconcile fee amount.
                type: string
              minimum:
                description: Minimum receivable reconcile fee amount.
                type: string
              source_currency:
                description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the source amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                type: string
              variable:
                description: This is the percentage value that is used to calculate the fee.
                type: string
        status:
          description: The status of the FeePlan.
          enum:
          - activated
          - deactivated
          type: string
        transfer_fx:
          description: Transfer FX fee details.
          items:
            properties:
              destination_currency:
                description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the destination amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                type: string
              reference_rate:
                description: FX markup reference rate. This can be set to `mid_market`.
                enum:
                - mid_market
                type: string
              source_currency:
                description: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-digit code for the source amount currency. The character * is a wildcard and can be used to represent all supported currencies.
                type: string
              variable:
                description: This is the percentage value that is used to calculate the fee.
                type: string
              variable_off_hours:
                description: This is the percentage value that is used to calculate the fee when the transfer is init

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