Xflow Accounts API

The Accounts API from Xflow — 4 operation(s) for accounts.

OpenAPI Specification

xflow-accounts-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 API
  version: '2024-02-05'
servers:
- url: https://api.xflowpay.com/
security:
- bearerAuth: []
tags:
- name: Accounts
paths:
  /v1/accounts:
    get:
      description: Returns a list of accounts.
      operationId: ListAccounts
      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: This parameter represents the state of the `xflow_receive` addresses associated with this account. The valid values include `deactivated`, `requested`, `processing` and `activated`.
        in: query
        name: address
        required: false
        schema:
          items:
            enum:
            - deactivated
            - requested
            - processing
            - activated
            type: string
          type: array
      - 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: 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: Valid status types associated with an Xflow account.
        in: query
        name: status
        required: false
        schema:
          items:
            enum:
            - draft
            - verifying
            - activated
            - deactivated
            - hold
            type: string
          type: array
      - description: Account types. These can be `partner`, `platform` or `user`.
        in: query
        name: type
        required: false
        schema:
          enum:
          - partner
          - platform
          - user
          type: string
      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/account'
                    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: ListAccountsResponse
                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:
      - Accounts
    post:
      description: Create an account.
      operationId: CreateAccount
      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:
                business_details:
                  description: Details about the business and activities that the account engages in.
                  properties:
                    date_of_incorporation:
                      description: The date (YYYY-MM-DD) on which the business was incorporated.
                      type: string
                    dba:
                      description: Doing Business As, this is a 16 character customer-facing business name. Special characters like <, >, ', or " are not allowed.
                      type: string
                    email:
                      description: Email address.
                      format: email
                      type: string
                    ids:
                      description: Details about identification documents.
                      properties:
                        business:
                          description: Unique identification number.
                          type: string
                        tax:
                          description: Tax Identification Number (e.g. Business PAN for Indian merchants).
                          type: string
                        tax_deduction:
                          description: Tax deduction Account Number (e.g. TAN for Indian merchants).
                          type: string
                        tax_gst:
                          description: Goods & Services Tax (GST) ID.
                          type: string
                        tax_trade:
                          description: Trade Identification Number (e.g. IEC for Indian merchants).
                          type: string
                      title: CreateAccountRequestBusinessDetailsIds
                      type: object
                    legal_name:
                      description: Unique name as per official documents.
                      type: string
                    merchant_category_code:
                      description: Popularly known as MCC, is a four-digit code used to classify businesses by the type of goods or services they provide.
                      type: string
                    merchant_size:
                      description: Merchant classification based on the annual turnover. The valid values include `small`, `medium` or `large`
                      enum:
                      - small
                      - medium
                      - large
                      type: string
                    physical_address:
                      description: Details about the physical address.
                      properties:
                        city:
                          description: City details in the official address.
                          type: string
                        country:
                          description: Country details in the [ISO 3166-1 alpha 2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) in uppercase.
                          enum:
                          - AD
                          - AE
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AR
                          - AT
                          - AU
                          - AW
                          - AZ
                          - BA
                          - BB
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BM
                          - BN
                          - BO
                          - BR
                          - BS
                          - BW
                          - BZ
                          - CA
                          - CG
                          - CH
                          - CI
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CV
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - ER
                          - ES
                          - FI
                          - FJ
                          - FK
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GH
                          - GI
                          - GL
                          - GM
                          - GP
                          - GQ
                          - GR
                          - GT
                          - GU
                          - GW
                          - HK
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IN
                          - IL
                          - IS
                          - IT
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LI
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - MA
                          - MC
                          - MD
                          - ME
                          - MG
                          - MN
                          - MO
                          - MR
                          - MT
                          - MU
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NE
                          - NG
                          - NL
                          - 'NO'
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PL
                          - PR
                          - PS
                          - PT
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - SA
                          - SE
                          - SG
                          - SI
                          - SK
                          - SL
                          - SM
                          - SN
                          - SZ
                          - TD
                          - TG
                          - TH
                          - TJ
                          - TL
                          - TM
                          - TN
                          - TR
                          - TT
                          - TW
                          - TZ
                          - UG
                          - US
                          - UY
                          - VN
                          - VU
                          - ZA
                          type: string
                        line1:
                          description: Line 1 in the official address.
                          type: string
                        line2:
                          description: Line 2 in the official address.
                          type: string
                        postal_code:
                          description: Postal code in the official address.
                          type: string
                        state:
                          description: State details in the official address.
                          type: string
                      required:
                      - country
                      title: CreateAccountRequestBusinessDetailsPhysicalAddress
                      type: object
                    product_category:
                      description: Merchant classification based on the service. The valid values include `goods`, `services` and `software`
                      enum:
                      - goods
                      - services
                      - software
                      type: string
                    product_description:
                      description: Description of the account’s business activities.
                      type: string
                    type:
                      description: Valid values include `company`, `limited_liability_partnership`, `partnership`, `sole_proprietor`, `individual`, `business` and `other`.
                      enum:
                      - company
                      - limited_liability_partnership
                      - partnership
                      - sole_proprietor
                      - individual
                      - business
                      - other
                      type: string
                    website:
                      description: The website for the business. Set to `website_not_available` if unavailable.
                      type: string
                  required:
                  - email
                  - legal_name
                  - physical_address
                  - type
                  title: CreateAccountRequestBusinessDetails
                  type: object
                logo_id:
                  description: A [file object identifier](https://docs.xflowpay.com/2024-02-05/api#file_object_id) which contains a logo for the user to customize communications with their customers.
                  type: string
                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: CreateAccountRequestMetadata
                  type: object
                nickname:
                  description: Name for the account.
                  type: string
                supporting_documentation:
                  description: Details of the supporting documentation for the account.
                  properties:
                    id_document:
                      description: A [file object identifier](https://docs.xflowpay.com/2024-02-05/api#file_object_id) which references a document that proves the authenticity of the account.
                      type: string
                  title: CreateAccountRequestSupportingDocumentation
                  type: object
                tos_acceptance:
                  description: Details of account accepting terms of service (tos).
                  properties:
                    ip:
                      description: IP address of the account from which the terms of service were accepted.
                      type: string
                    time:
                      description: The seconds elapsed since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) at which the terms of service was accepted.
                      format: unix-time
                      type: integer
                    user_agent:
                      description: The user agent of the browser from which the account representative accepted their service agreement
                      type: string
                  title: CreateAccountRequestTosAcceptance
                  type: object
                type:
                  description: Account types. These can be `partner`, `platform` or `user`.
                  enum:
                  - partner
                  - platform
                  - user
                  type: string
              required:
              - business_details
              - type
              title: CreateAccountRequest
              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/account'
          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:
      - Accounts
  /v1/accounts/{account}:
    get:
      description: Retrieves the details of an account.
      operationId: RetrieveAccount
      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: account
        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/account'
          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:
      - Accounts
    post:
      description: Update the details of an account.
      operationId: UpdateAccount
      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: account
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                business_details:
                  description: Details about the business and activities that the account engages in.
                  properties:
                    date_of_incorporation:
                      description: The date (YYYY-MM-DD) on which the business was incorporated.
                      type: string
                    dba:
                      description: Doing Business As, this is a 16 character customer-facing business name. Special characters like <, >, ', or " are not allowed.
                      type: string
                    email:
                      description: Email address.
                      format: email
                      type: string
                    ids:
                      description: Details about identification documents.
                      properties:
                        business:
                          description: Unique identification number.
                          type: string
                        tax:
                          description: Tax Identification Number (e.g. Business PAN for Indian merchants).
                          type: string
                        tax_deduction:
                          description: Tax deduction Account Number (e.g. TAN for Indian merchants).
                          type: string
                        tax_gst:
                          description: Goods & Services Tax (GST) ID.
                          type: string
                        tax_trade:
                          description: Trade Identification Number (e.g. IEC for Indian merchants).
                          type: string
                      title: UpdateAccountRequestBusinessDetailsIds
                      type: object
                    legal_name:
                      description: Unique name as per official documents.
                      type: string
                    merchant_category_code:
                      description: Popularly known as MCC, is a four-digit code used to classify businesses by the type of goods or services they provide.
                      type: string
                    merchant_size:
                      description: Merchant classification based on the annual turnover. The valid values include `small`, `medium` or `large`
                      enum:
                      - small
                      - medium
                      - large
                      type: string
                    physical_address:
                      description: Details about the physical address.
                      properties:
                        city:
                          description: City details in the official address.
                          type: string
                        country:
                          description: Country details in the [ISO 3166-1 alpha 2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) in uppercase.
                          enum:
                          - AD
                          - AE
                          - AG
                          - AI
                          - AL
                          - AM
                          - AO
                          - AR
                          - AT
                          - AU
                          - AW
                          - AZ
                          - BA
                          - BB
                          - BE
                          - BF
                          - BG
                          - BH
                          - BI
                          - BJ
                          - BM
                          - BN
                          - BO
                          - BR
                          - BS
                          - BW
                          - BZ
                          - CA
                          - CG
                          - CH
                          - CI
                          - CL
                          - CM
                          - CN
                          - CO
                          - CR
                          - CV
                          - CY
                          - CZ
                          - DE
                          - DJ
                          - DK
                          - DM
                          - DO
                          - DZ
                          - EC
                          - EE
                          - EG
                          - ER
                          - ES
                          - FI
                          - FJ
                          - FK
                          - FO
                          - FR
                          - GA
                          - GB
                          - GD
                          - GE
                          - GF
                          - GH
                          - GI
                          - GL
                          - GM
                          - GP
                          - GQ
                          - GR
                          - GT
                          - GU
                          - GW
                          - HK
                          - HN
                          - HR
                          - HT
                          - HU
                          - ID
                          - IE
                          - IN
                          - IL
                          - IS
                          - IT
                          - JO
                          - JP
                          - KE
                          - KG
                          - KH
                          - KI
                          - KR
                          - KW
                          - KY
                          - KZ
                          - LA
                          - LI
                          - LR
                          - LS
                          - LT
                          - LU
                          - LV
                          - MA
                          - MC
                          - MD
                          - ME
                          - MG
                          - MN
                          - MO
                          - MR
                          - MT
                          - MU
                          - MW
                          - MX
                          - MY
                          - MZ
                          - NA
                          - NE
                          - NG
                          - NL
                          - 'NO'
                          - NZ
                          - OM
                          - PA
                          - PE
                          - PF
                          - PG
                          - PH
                          - PL
                          - PR
                          - PS
                          - PT
                          - PY
                          - QA
                          - RE
                          - RO
                          - RS
                          - SA
                          - SE
                          - SG
                          - SI
                          - SK
                          - SL
                          - SM
                          - SN
                          - SZ
                          - TD
                          - TG
                          - TH
                          - TJ
                          - TL
                          - TM
                          - TN
                          - TR
                          - TT
                          - TW
                          - TZ
                          - UG
                          - US
                          - UY
                          - VN
                          - VU
                          - ZA
                          type: string
                        line1:
                          description: Line 1 in the official address.
                          type: string
                        line2:
                          description: Line 2 in the official address.
                          type: string
                        postal_code:
                          description: Postal code in the official address.
                          type: string
                        state:
                          description: State details in the official address.
                          type: string
                      title: UpdateAccountRequestBusinessDetailsPhysicalAddress
                      type: object
                    product_category:
                      d

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