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

> ## Agent Instructions
> Money is always a decimal string at the currency's precision (for example "29.00"), paired with an ISO 4217 currency field. Never use minor units.
> Build against the sandbox first: base URL https://sandbox-api.bachs.io with sk_sandbox_ keys. Production is https://api.bachs.io with sk_live_ keys; going live is a key swap.
> Treat webhooks (for example collection.succeeded) as the source of truth for fulfilment, never client-side events or redirects.
> Subscriptions are created by completing a checkout for a recurring product. There is no direct create-subscription endpoint.
> IDs carry resource prefixes (cust_, prod_, sub_, chk_, inv_, ref_) and timestamps are ISO 8601 UTC.

# Get your own account

> Get the account your API key belongs to, including its capability names, checkout payment methods, and balance currencies. The `capabilities` and `requirements` blocks are not populated here; read the account by ID for those. Use this to confirm your own platform holds an active `connect` capability before you create accounts. See [Become a platform](/connect/become-a-platform).



## OpenAPI

````yaml /docs/openapi/openapi.json get /v1/accounts/me
openapi: 3.0.3
info:
  title: Bachs API
  version: 1.0.0
  description: >-
    The Bachs API lets you accept payments, manage subscriptions, and move money
    across African markets.


    - **Authentication:** pass your secret key as `Authorization: Bearer
    sk_...`. See [Authentication](/authentication) for keys, scopes, and sandbox
    vs production.

    - **Errors:** errors use `detail` and `error_code`; `doc_url` and
    field-level `errors` are optional. See [Errors](/errors).

    - **Pagination:** list endpoints return `{ items, pagination }`. See
    [Pagination](/guides/pagination).

    - **Idempotency:** use `Idempotency-Key` on public `POST` and `PATCH`;
    reconcile uncertain write outcomes before retrying. See
    [Idempotency](/guides/idempotency).

    - **Base URLs and rate limits:** see the
    [Introduction](/api-reference/overview).
  contact:
    name: Bachs Support
    url: https://bachs.io
servers:
  - url: https://api.bachs.io
    description: Production
  - url: https://sandbox-api.bachs.io
    description: Sandbox
security:
  - ApiKeyAuth: []
tags:
  - name: Payments
    description: Accept payments from customers
  - name: Refunds
    description: Create and manage customer refunds
  - name: Disputes
    description: Respond to chargebacks and manage dispute evidence
  - name: Balances
    description: View balances and account information
  - name: Conversions
    description: Quote, execute, and query currency conversions
  - name: Payouts
    description: Withdraw funds to external accounts
  - name: Webhooks
    description: Receive real-time payment notifications
  - name: Authentication
    description: API key management and authentication
  - name: Customers
    description: Create and manage customers
  - name: Products
    description: Define and manage your billing catalog
  - name: Product Groups
    description: Bundle products for multi-plan checkout
  - name: Media
    description: Upload files and get an upload_id to attach to products
  - name: Checkouts
    description: Create and manage API-driven checkouts without products
  - name: Subscriptions
    description: >-
      Recurring billing. Subscriptions are created through checkout; manage them
      here.
  - name: Customer sessions
    description: >-
      Open a hosted portal session so a customer can manage their own
      subscriptions, invoices and cards.
  - name: Accounts
    description: >-
      Create the accounts your platform onboards, request their capabilities,
      walk them through their requirements, and read what they still owe.
  - name: Transfers
    description: Move funds between your platform and the accounts you own.
  - name: Platform Fees
    description: Read the platform's cut of an account's sale.
  - name: Virtual Accounts
    description: Create and read fixed bank account numbers for receiving deposits.
paths:
  /v1/accounts/me:
    get:
      tags:
        - Accounts
      summary: Get your own account
      description: >-
        Get the account your API key belongs to, including its capability names,
        checkout payment methods, and balance currencies. The `capabilities` and
        `requirements` blocks are not populated here; read the account by ID for
        those. Use this to confirm your own platform holds an active `connect`
        capability before you create accounts. See [Become a
        platform](/connect/become-a-platform).
      operationId: getMyOrganization
      responses:
        '200':
          description: Your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
              example:
                id: acct_7KpQ2mNv4XbR9dLc
                name: Ada Stores
                owner_user_id: usr_7b3e19d24c0a
                parent_organization_id: null
                country: NG
                fee_handling: account_pays_fee
                enabled_payment_methods:
                  USD_CARD:
                    enabled: true
                  NGN_CARD:
                    enabled: true
                  NGN_BANK_TRANSFER:
                    enabled: true
                  MOMO_GHS:
                    enabled: true
                  CRYPTO:
                    enabled: true
                    currencies:
                      USDT_TRC20: true
                      USDC_BEP20: true
                adaptive_pricing: true
                balance_currencies:
                  - NGN
                  - USD
                phone_number: null
                company_name: null
                enabled_capabilities:
                  - payouts
                  - conversions
                  - connect
                capabilities: null
                requirements: null
                is_active: true
                created_at: '2026-08-01T09:12:44.000Z'
                updated_at: '2026-08-07T11:04:22.518Z'
                responsibilities: null
                configuration: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    OrganizationResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the account.
          example: acct_7KpQ2mNv4XbR9dLc
        name:
          type: string
          nullable: true
          description: The account's display name.
          example: Ada Stores
        owner_user_id:
          type: string
          description: >-
            The user that owns the account. For an account you own this is a
            service user Bachs created; you never authenticate as it.
          example: usr_7b3e19d24c0a
        parent_organization_id:
          type: string
          nullable: true
          description: >-
            The platform this account is connected to, or `null` when it is a
            platform in its own right.
          example: acct_7KpQ2mNv4XbR9dLc
        country:
          type: string
          nullable: true
          description: >-
            Two-letter ISO 3166-1 country code. Decides which requirements the
            account is given.
          example: NG
        entity_type:
          type: string
          enum:
            - company
            - individual
          nullable: true
          description: >-
            What kind of legal person the account is, which together with
            `country` decides the requirements it is given. `company`: a
            registered entity, asked for registration and ownership details.
            `individual`: a natural person, asked only for their own identity.
          example: company
        fee_handling:
          type: string
          enum:
            - account_pays_fee
            - customer_pays_fee
          description: >-
            Who absorbs processing fees at checkout. `account_pays_fee`:
            deducted from the amount you receive. `customer_pays_fee`: added to
            what the customer pays.
          example: account_pays_fee
        enabled_payment_methods:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            One entry per exact corridor (`USD_CARD`, `NGN_CARD`,
            `NGN_BANK_TRANSFER`, `MOMO_GHS` to `MOMO_ZMW`, `CRYPTO`). See
            [payment method support](/guides/payments/payment-method-support).
            Each value has an `enabled` boolean; `CRYPTO` additionally carries a
            `currencies` map since it covers several asset/network pairs.
        adaptive_pricing:
          type: boolean
          description: >-
            When `true`, customers are shown prices in their local currency
            where one is available.
          example: true
        balance_currencies:
          type: array
          items:
            type: string
          description: Currencies this account is configured to hold a balance in.
          example:
            - NGN
            - USD
        phone_number:
          type: string
          nullable: true
          description: Contact phone number, including country code.
          example: '+2348012345678'
        company_name:
          type: string
          nullable: true
          description: Registered company name, when the account is a company.
          example: Ada Stores Limited
        enabled_capabilities:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            Names of the capabilities currently active on this account. A
            convenience view of `capabilities`.
          example:
            - transfers
            - payouts
        capabilities:
          type: object
          nullable: true
          additionalProperties:
            $ref: '#/components/schemas/AccountCapabilityStatus'
          description: >-
            Each capability's status, keyed by capability name. Populated on
            single-account reads only; `null` on list items.
        requirements:
          allOf:
            - $ref: '#/components/schemas/AccountRequirements'
          nullable: true
          description: >-
            Outstanding requirements for this account. Populated on
            single-account reads only; `null` on list items.
        is_active:
          type: boolean
          description: >-
            When `false`, the account is deactivated and cannot authenticate or
            move funds.
          example: true
        created_at:
          type: string
          description: When the account was created, ISO 8601 in UTC.
          example: '2026-08-01T09:12:44.000Z'
        updated_at:
          type: string
          description: When the account was last updated, ISO 8601 in UTC.
          example: '2026-08-07T11:04:22.518Z'
        responsibilities:
          allOf:
            - $ref: '#/components/schemas/ResponsibilitiesResponse'
          nullable: true
          description: >-
            Fee arrangement for an account you own. `null` when this object is
            not an account you own.
        configuration:
          type: object
          nullable: true
          additionalProperties:
            $ref: '#/components/schemas/AccountConfigurationOptions'
          description: >-
            Personas applied to this account, keyed by name (`merchant`,
            `recipient`), each with an empty object as its value. Populated on
            single-account reads, where it is `{}` when none apply; `null` on
            list items.
          example:
            merchant: {}
            recipient: {}
    AccountCapabilityStatus:
      type: object
      properties:
        status:
          type: string
          enum:
            - active
            - pending
            - restricted
            - unrequested
            - unsupported
          description: >-
            Whether the account may perform this action. `active`: enabled, and
            the only value that authorizes anything. `pending`: requested or
            submitted, awaiting review. `restricted`: not enabled, and the
            default. `unrequested`: the account has no record for this
            capability, which differs from `restricted` in that it was never
            asked for. `unsupported`: the account is not eligible for this
            capability.
          example: active
        requested:
          type: boolean
          description: >-
            Whether the account ever requested this capability. A `restricted`
            capability that was requested is in progress; one that was never
            requested is outside the account's setup.
          example: true
        status_details:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/CapabilityStatusDetail'
          description: >-
            Why the capability is not active. `null` when the capability is
            `active`, meaning there is nothing to explain.
    AccountRequirements:
      type: object
      description: >-
        The account-wide roll-up of outstanding requirements. Populated on
        single-account reads only.
      properties:
        currently_due:
          type: array
          items:
            type: string
          description: Field keys required now.
          example:
            - company.registration_number
        eventually_due:
          type: array
          items:
            type: string
          description: Field keys required later, once a threshold or stage is reached.
          example: []
        past_due:
          type: array
          items:
            type: string
          description: Field keys that were required by a date now passed.
          example: []
        pending_verification:
          type: array
          items:
            type: string
          description: Field keys provided and being checked.
          example:
            - persons.per_3a91c0d7.id_document
        errors:
          type: array
          items:
            $ref: '#/components/schemas/RequirementError'
          description: >-
            Fields that were provided and then rejected, as distinct from fields
            that are missing.
        entries:
          type: array
          items:
            $ref: '#/components/schemas/RequirementEntry'
          description: >-
            Per-field view of the same requirements, each carrying the
            capabilities it blocks.
        values:
          type: array
          items:
            $ref: '#/components/schemas/TaskValueItem'
          description: >-
            Only present with `include=requirements.values`. Account-level
            fields and their current values, for reading back what was submitted
            and prefilling an edit. Sensitive fields are listed as provided and
            never echoed. People are returned separately under `persons`.
        persons:
          type: array
          items:
            type: object
            additionalProperties: true
          description: >-
            One entry per person on the account, rolled up rather than split
            into fields. Each entry carries `id`, `first_name`, `last_name`,
            `dob`, `address`, `address_reference_data`, `relationship`,
            `id_document_provided`, and `verification_status`. Identity
            documents are summarised by the `id_document_provided` flag and
            never returned. Only present with `include=requirements.values`.
        current_deadline:
          type: string
          format: date-time
          nullable: true
          description: >-
            The soonest deadline across everything outstanding, for a single
            banner. Null when no outstanding field carries one.
    ResponsibilitiesResponse:
      type: object
      properties:
        fees:
          type: object
          description: Who collects the Bachs processing fee on this account's charges.
          properties:
            collector:
              type: string
              enum:
                - platform
                - bachs
              description: >-
                `bachs`: the fee comes out of the charge and the account settles
                net. `platform`: the platform absorbs the fee and the account
                settles gross. Set when the account is created and immutable
                afterwards.
              example: bachs
    AccountConfigurationOptions:
      type: object
      description: >-
        A named persona, and the capabilities requested under it. `capabilities`
        omitted requests every capability that persona allows on create (never
        on update); `{}` requests none.
      properties:
        capabilities:
          type: object
          nullable: true
          additionalProperties:
            $ref: '#/components/schemas/CapabilityRequest'
          description: >-
            Capabilities requested under this persona, keyed by name. Omitting
            this on create requests every capability the persona allows;
            omitting it on update just applies the persona and requests nothing.
            Send `{}` to apply the persona and request nothing, on either
            endpoint. An unrecognised or inactive capability name is rejected
            with `400 unknown_capability`.
          example:
            card_collection:
              requested: true
    Error:
      type: object
      description: Standard error response format used across all API endpoints
      properties:
        detail:
          type: string
          description: Human-readable error message explaining what went wrong.
          example: Invalid request parameters
        error_code:
          type: string
          description: >-
            Machine-readable error code. Use this to handle errors
            programmatically. Common codes: VALIDATION_ERROR, UNAUTHORIZED,
            FORBIDDEN, NOT_FOUND, CONFLICT, TOO_MANY_REQUESTS,
            INTERNAL_SERVER_ERROR, BAD_GATEWAY, SERVICE_UNAVAILABLE.
          example: VALIDATION_ERROR
        errors:
          type: array
          description: >-
            Optional field-level details on some validation errors. Other
            validation responses contain only detail and error_code. Entry
            fields depend on the validation source.
          items:
            type: object
            properties:
              field:
                type: string
                description: The field that failed validation.
                example: amount
              message:
                type: string
                description: Description of the validation failure.
                example: Amount must be a positive decimal string
              type:
                type: string
                description: Error type identifier.
                example: value_error
              code:
                type: string
                description: >-
                  Optional requirement-field rejection code. Some validation
                  entries provide code instead of type.
                example: currency_not_supported
            required:
              - field
              - message
        doc_url:
          type: string
          description: Optional link to documentation for this error; some errors omit it.
          example: https://docs.bachs.io/api-reference/error-reference#general
      required:
        - detail
        - error_code
    CapabilityStatusDetail:
      type: object
      properties:
        code:
          type: string
          description: >-
            Machine-readable reason the capability is not active. Branch on this
            rather than on `message`.
          example: platform_disabled
        resolution:
          type: string
          nullable: true
          description: What has to happen for the capability to become active.
          example: Contact support to re-enable this capability.
        message:
          type: string
          nullable: true
          description: Human-readable explanation, safe to show the account holder.
          example: This capability was disabled by the platform.
    RequirementError:
      type: object
      properties:
        field:
          type: string
          description: The field key that was rejected.
          example: persons.per_3a91c0d7.id_document
        code:
          type: string
          nullable: true
          description: Machine-readable rejection reason.
          example: unreadable
        reason:
          type: string
          nullable: true
          description: Human-readable rejection reason, safe to show the account holder.
          example: The document image was too blurry to read.
    RequirementEntry:
      type: object
      description: >-
        One outstanding requirement and what it holds up. The buckets say what
        is missing; this says what breaks while it is. Prefer this over the
        buckets when an account holds more than one capability.
      properties:
        field:
          type: string
          description: Canonical field key.
          example: company.registration_number
        status:
          type: string
          description: The bucket this entry is in.
          enum:
            - currently_due
            - eventually_due
            - past_due
            - pending_verification
          example: currently_due
        restricts_capabilities:
          type: array
          items:
            type: string
          description: >-
            Capabilities this field blocks. Empty when no capability the account
            holds requires it.
          example:
            - payouts
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                nullable: true
              reason:
                type: string
                nullable: true
          description: Verification or rejection errors for this field.
        resolution:
          type: string
          enum:
            - api
            - review
          description: >-
            Who can act on this field. `api`: yours to supply, through the
            account update or the persons subresource. `review`: already
            provided and sitting with us, so re-sending it achieves nothing.
            Treat an unrecognized value as not yours to resolve.
          example: api
        deadline:
          type: string
          format: date-time
          nullable: true
          description: When this field must be resolved by, if a deadline was set.
    TaskValueItem:
      type: object
      description: >-
        One field's current value, for reading back what the account already
        provided and prefilling an edit form.
      properties:
        field:
          type: string
          description: Canonical key for the field, the same key you submit it under.
          example: business_profile.url
        label:
          type: string
          description: >-
            Human-readable name for the field, safe to show the account holder
            verbatim.
          example: Business website
        group:
          type: string
          nullable: true
          description: >-
            Which onboarding section the field is shown in:
            `identity_verification`, `business_ownership`,
            `product_information`, or `bank_verification`. Note this is a
            coarser grouping than the `group` on a checklist field. `null` when
            the field maps to no section.
          example: product_information
        provided:
          type: boolean
          description: >-
            Whether the account has a value for this field. A sensitive field
            reports `provided: true` with no `value`.
          example: true
        sensitive:
          type: boolean
          description: >-
            When `true`, the value is never echoed back: `value` stays `null`
            and `display` reads `Provided`. Identity documents and bank account
            numbers are sensitive, so an edit form has to collect them again
            rather than prefill them.
          example: false
        value:
          nullable: true
          description: >-
            The raw value, suitable for prefilling an edit form. Always `null`
            when `sensitive` is `true`.
          example: https://adastores.example
        display:
          type: string
          nullable: true
          description: >-
            One-line summary of the value for a review card. `Provided` for a
            sensitive field, and `null` when nothing has been provided.
          example: https://adastores.example
        reference_data:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            Resolved labels for a value that is stored as a code, such as the
            name behind a bank code, so a review card does not have to look them
            up. `null` when the field has nothing to resolve.
    CapabilityRequest:
      type: object
      properties:
        requested:
          type: boolean
          default: false
          description: >-
            Set to `true` to request this capability for the account, which
            applies the configuration the capability belongs to and surfaces the
            requirements it needs. Requesting authorizes nothing on its own.
            `false` is rejected with `400 capability_unrequest_unsupported`,
            because there is no path to withdraw a capability once it has been
            requested.
          example: true
  responses:
    BadRequest:
      description: >-
        Bad Request - Validation errors or invalid request format. Check the
        `details` object for field-specific validation errors. Common causes:
        missing required fields, invalid data types, values outside allowed
        ranges, or invalid formats.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: Invalid request parameters
            error_code: VALIDATION_ERROR
            errors:
              - field: amount
                message: Amount must be a positive decimal string
                type: value_error
      headers:
        X-RateLimit-Limit:
          description: Maximum number of requests allowed per minute
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Number of requests remaining in the current window
          schema:
            type: integer
            example: 95
        X-RateLimit-Reset:
          description: Unix timestamp when the rate limit window resets
          schema:
            type: integer
            example: 1706102400
    Unauthorized:
      description: >-
        Unauthorized - Invalid, missing, or expired API key. Verify your API key
        is correctly formatted and included in the Authorization header as
        `Bearer sk_sandbox_...` or `Bearer sk_live_...`. Check that your key
        hasn't been revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: Invalid API key
            error_code: UNAUTHORIZED
      headers:
        X-RateLimit-Limit:
          description: Maximum number of requests allowed per minute
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Number of requests remaining in the current window
          schema:
            type: integer
            example: 95
        X-RateLimit-Reset:
          description: Unix timestamp when the rate limit window resets
          schema:
            type: integer
            example: 1706102400
    Forbidden:
      description: >-
        Forbidden - API key does not have permission for the requested resource.
        Verify you're using the correct account's API key and that you're not
        trying to access another account's data.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: API key does not have permission for this operation
            error_code: FORBIDDEN
      headers:
        X-RateLimit-Limit:
          description: Maximum number of requests allowed per minute
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Number of requests remaining in the current window
          schema:
            type: integer
            example: 95
        X-RateLimit-Reset:
          description: Unix timestamp when the rate limit window resets
          schema:
            type: integer
            example: 1706102400
    NotFound:
      description: >-
        Not Found - The requested resource does not exist. Verify the resource
        ID is correct and that it belongs to your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: Resource not found
            error_code: NOT_FOUND
      headers:
        X-RateLimit-Limit:
          description: Maximum number of requests allowed per minute
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Number of requests remaining in the current window
          schema:
            type: integer
            example: 95
        X-RateLimit-Reset:
          description: Unix timestamp when the rate limit window resets
          schema:
            type: integer
            example: 1706102400
    TooManyRequests:
      description: >-
        Too Many Requests - Rate limit exceeded. Standard tier allows 100
        requests per minute per API key. Wait a few seconds before retrying.
        Check X-RateLimit-Reset header for when the window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: Rate limit exceeded. Please retry after a few seconds.
            error_code: TOO_MANY_REQUESTS
      headers:
        X-RateLimit-Limit:
          description: Maximum number of requests allowed per minute
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Number of requests remaining in the current window (will be 0)
          schema:
            type: integer
            example: 0
        X-RateLimit-Reset:
          description: Unix timestamp when the rate limit window resets
          schema:
            type: integer
            example: 1706102400
        Retry-After:
          description: Number of seconds to wait before retrying
          schema:
            type: integer
            example: 30
    InternalServerError:
      description: >-
        Internal Server Error - An unexpected error occurred while processing
        the request. Retry with exponential backoff. If the issue persists,
        contact support with your request context.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            detail: An unexpected error occurred. Please try again later.
            error_code: INTERNAL_SERVER_ERROR
      headers:
        X-RateLimit-Limit:
          description: Maximum number of requests allowed per minute
          schema:
            type: integer
            example: 100
        X-RateLimit-Remaining:
          description: Number of requests remaining in the current window
          schema:
            type: integer
            example: 95
        X-RateLimit-Reset:
          description: Unix timestamp when the rate limit window resets
          schema:
            type: integer
            example: 1706102400
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Bearer token authentication. Pass your API key as `Authorization: Bearer
        sk_...`. See [Authentication](/authentication) for keys, scopes, and
        sandbox vs production.

````

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