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

# Upload Documents

> Send us one or more documents for a merchant, stating what they are for.

This endpoint is general purpose — underwriting paperwork, identity
verification, and evidence contesting a chargeback all come through here,
distinguished by `data.doc_type`. To attach evidence to a specific
dispute, pass `data.chargeback_transaction_info_id` as well; the value is
the `transaction_info_id` from the chargeback endpoints or the chargeback
webhooks.

**This request is `multipart/form-data`, not JSON** — it is the only
endpoint on this API that is. Send the body fields as form fields named
`data[sid]`, `data[doc_type]` and so on, and the files as `files[]`.

Note the bracket notation: multipart has no JSON parsing, so a single
field named `data` containing `{"sid": "..."}` is read as a plain string
and the merchant is never identified. That fails as
`403 You do not have access to this company.`, which looks like a
credentials problem but is not — check your field names first. Likewise
the files field is `files[]`, not `files`.

Files are stored independently. If one fails, the rest are still kept and
the response lists what did not store under `failed`, so you can re-send
only those rather than the whole batch.

Uploading does not send the document to the processor. It lands in the
merchant's document list and notifies our team, who review it and forward
it. There is no programmatic way to file a representment with the
processor on your behalf.



## OpenAPI

````yaml https://app.dimepayments.com/openapi.yaml post /api/document/upload
openapi: 3.0.3
info:
  title: Dime Payments API Documentation
  description: >-
    A simple, basic API for managing Merchants through Dime Payments. JSON based
    REST API
  version: 1.0.0
servers:
  - url: https://app.dimepayments.com
security:
  - default: []
tags:
  - name: Merchant management
    description: ''
  - name: Transaction management
    description: >-

      APIs for managing transactions.  Depending on API KEY permissions, one
      should be able to

      charge credit cards, ACH, Google/Apple Pay wallets along with other
      functions.
  - name: Chargeback management
    description: ''
  - name: Document management
    description: ''
  - name: Addresses
    description: |-

      APIs for managing customer addresses
  - name: Customer management
    description: >-

      APIs for managing customers.  Depending on API KEY permissions, one should
      be able to

      list, create, update, and delete customers along with several other
      customer specific requests.
  - name: Deposit management
    description: ''
  - name: Held funds
    description: ''
  - name: Invoice management
    description: >-

      APIs for managing invoices. Depending on API KEY permissions, one should
      be

      able to list, create, update, delete, and send invoices, manage their line

      items, and manage recurring-invoice schedules. Every request is scoped to
      a

      single Merchant via the required `data.sid`.
  - name: Payment Method management
    description: >-

      APIs for managing payment methods associated with customers.  Depending on
      API KEY permissions, one should be able to

      list, show, create, update, and delete payment methods.
  - name: Recurring Payments management
    description: >-

      APIs for managing recurring payments.  Depending on API KEY permissions,
      one should be able to

      create, edit, pause, cancel along with other functions.
  - name: Subscription Plans management
    description: >-

      Merchant-facing API for subscription plans (recurring offerings customers

      subscribe to). The merchant is identified by `data.sid`; the token must
      carry

      the matching `subscription-plan:*` ability. Mirrors the recurring-payment
      and

      invoice API controllers.
  - name: Subscriptions management
    description: >-

      Merchant-facing API for individual customer subscriptions (enrollments in
      a

      plan). The merchant is identified by `data.sid`; the token must carry the

      matching `subscription:*` ability. Lifecycle transitions delegate to the

      {@see \App\Actions\Subscription} action classes so the matching
      `SUBSCRIPTION_*`

      webhook always fires. Mirrors the recurring-payment and subscription-plan
      API

      controllers.
  - name: Zapier
    description: >-

      APIs for use through Zapier.  Depending on API KEY permissions, one should
      be able to

      see customers and transactions data.
paths:
  /api/document/upload:
    post:
      tags:
        - Document management
      summary: Upload Documents
      description: >-
        Send us one or more documents for a merchant, stating what they are for.


        This endpoint is general purpose — underwriting paperwork, identity

        verification, and evidence contesting a chargeback all come through
        here,

        distinguished by `data.doc_type`. To attach evidence to a specific

        dispute, pass `data.chargeback_transaction_info_id` as well; the value
        is

        the `transaction_info_id` from the chargeback endpoints or the
        chargeback

        webhooks.


        **This request is `multipart/form-data`, not JSON** — it is the only

        endpoint on this API that is. Send the body fields as form fields named

        `data[sid]`, `data[doc_type]` and so on, and the files as `files[]`.


        Note the bracket notation: multipart has no JSON parsing, so a single

        field named `data` containing `{"sid": "..."}` is read as a plain string

        and the merchant is never identified. That fails as

        `403 You do not have access to this company.`, which looks like a

        credentials problem but is not — check your field names first. Likewise

        the files field is `files[]`, not `files`.


        Files are stored independently. If one fails, the rest are still kept
        and

        the response lists what did not store under `failed`, so you can re-send

        only those rather than the whole batch.


        Uploading does not send the document to the processor. It lands in the

        merchant's document list and notifies our team, who review it and
        forward

        it. There is no programmatic way to file a representment with the

        processor on your behalf.
      operationId: uploadDocuments
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                data:
                  type: object
                  description: ''
                  example: []
                  properties:
                    sid:
                      type: string
                      description: The ID of the merchant.
                      example: '91828382'
                    doc_type:
                      type: string
                      description: >-
                        What the document is for. One of: Verification,
                        FraudHolds, Underwriting, RetrievalRequest. Use
                        RetrievalRequest for evidence contesting a chargeback or
                        answering a retrieval request.
                      example: RetrievalRequest
                    chargeback_transaction_info_id:
                      type: string
                      description: >-
                        The transaction_info_id of the chargeback this evidence
                        relates to, if any. Must belong to the same merchant.
                      example: '"8675309"'
                      nullable: true
                  required:
                    - sid
                    - doc_type
                files:
                  type: array
                  description: >-
                    The documents. Up to 10 per request, each 9 MB or smaller,
                    as PDF, JPG, PNG, DOC, DOCX or RTF. The *combined* size of a
                    request is also capped by the server; if you get a 413, send
                    fewer files per request rather than retrying the same batch.
                  items:
                    type: string
                    format: binary
              required:
                - files
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - description: Uploaded
                    type: object
                    example:
                      data:
                        message: 2 documents uploaded.
                        documents:
                          - uuid: 9b1c...
                            file_name: receipt.pdf
                            doc_type: RetrievalRequest
                            size: 20841
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: 2 documents uploaded.
                          documents:
                            type: array
                            example:
                              - uuid: 9b1c...
                                file_name: receipt.pdf
                                doc_type: RetrievalRequest
                                size: 20841
                            items:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                  example: 9b1c...
                                file_name:
                                  type: string
                                  example: receipt.pdf
                                doc_type:
                                  type: string
                                  example: RetrievalRequest
                                size:
                                  type: integer
                                  example: 20841
                  - description: Partly uploaded
                    type: object
                    example:
                      data:
                        message: 2 documents uploaded. 1 could not be stored.
                        documents:
                          - uuid: 9b1c...
                            file_name: receipt.pdf
                            doc_type: RetrievalRequest
                            size: 20841
                        failed:
                          - file_name: statement.pdf
                            reason: The file could not be stored. Send it again.
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: 2 documents uploaded. 1 could not be stored.
                          documents:
                            type: array
                            example:
                              - uuid: 9b1c...
                                file_name: receipt.pdf
                                doc_type: RetrievalRequest
                                size: 20841
                            items:
                              type: object
                              properties:
                                uuid:
                                  type: string
                                  example: 9b1c...
                                file_name:
                                  type: string
                                  example: receipt.pdf
                                doc_type:
                                  type: string
                                  example: RetrievalRequest
                                size:
                                  type: integer
                                  example: 20841
                          failed:
                            type: array
                            example:
                              - file_name: statement.pdf
                                reason: The file could not be stored. Send it again.
                            items:
                              type: object
                              properties:
                                file_name:
                                  type: string
                                  example: statement.pdf
                                reason:
                                  type: string
                                  example: The file could not be stored. Send it again.
        '400':
          description: Malformed Request
          content:
            application/json:
              schema:
                type: object
                example:
                  errors:
                    files.0:
                      - >-
                        The files.0 field must be a file of type: pdf, jpg,
                        jpeg, png, doc, docx, rtf.
                properties:
                  errors:
                    type: object
                    properties:
                      files.0:
                        type: array
                        example:
                          - >-
                            The files.0 field must be a file of type: pdf, jpg,
                            jpeg, png, doc, docx, rtf.
                        items:
                          type: string
        '401':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - description: Incorrect API Key Permission
                    type: object
                    example:
                      data:
                        message: Permission Denied.
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Permission Denied.
                  - description: Not associated with Affiliate
                    type: object
                    example:
                      data:
                        message: Not associated with Affiliate
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Not associated with Affiliate
        '404':
          description: Unknown merchant
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    message: No such Merchant
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: No such Merchant
        '413':
          description: Request too large
          content:
            application/json:
              schema:
                type: object
                example:
                  errors:
                    files:
                      - >-
                        The upload is larger than this server accepts (8M per
                        request). Send fewer files per request, or split them
                        across requests.
                properties:
                  errors:
                    type: object
                    properties:
                      files:
                        type: array
                        example:
                          - >-
                            The upload is larger than this server accepts (8M
                            per request). Send fewer files per request, or split
                            them across requests.
                        items:
                          type: string
        '422':
          description: Merchant not set up for documents
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    message: Merchant is not set up to receive documents
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Merchant is not set up to receive documents
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: >-
        You can retrieve your token by visiting your dashboard and clicking
        <b>Generate API token under your profile in top right</b>.

````

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