Skip to main content
To create multiple disbursements at once, use the bulk creation mutation. This mutation processes all disbursements synchronously and returns the results immediately. Each disbursement created will trigger a disbursement.created webhook event.

Create Multiple Disbursements

Use the following mutation to create multiple disbursements:
mutation DisbursementsCreateBulk($createInputs: [DisbursementCreateInput!]!) {
  disbursementsCreateBulk(createInputs: $createInputs) {
    disbursements {
      id
      amount
      expiresAt
      publicKey
      status
      url
    }
  }
}
Example variables:
{
  "createInputs": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "amount": 100,
      "authorizedIdentities": [
        {
          "type": "EMAIL",
          "value": "[email protected]"
        }
      ],
      "fundingAccountId": "the_bank_account_id"
    }
  ]
}
Example response:
{
  "data": {
    "disbursementsCreateBulk": {
      "disbursements": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "amount": 100,
          "expiresAt": "2024-12-31T23:59:59Z",
          "publicKey": "abc123xyz",
          "status": "DRAFT",
          "url": "https://pay.confidolegal.com/d/abc123xyz"
        }
      ]
    }
  }
}
You can provide a client-generated id for each disbursement in the createInputs. If you provide an id, it must be a valid UUID v4. This id will become the disbursement.id, allowing you to associate results with records in your own system for better traceability.

Response Fields

The mutation returns a DisbursementsCreateBulkResult object containing:
  • disbursements: An array of DisbursementsCreateBulkResultItem objects, each containing:
    • id: The disbursement ID
    • amount: The disbursement amount
    • expiresAt: When the disbursement expires (nullable)
    • publicKey: The public key for the disbursement (nullable)
    • status: The current status of the disbursement
    • url: The URL where the disbursement can be accessed (nullable)

Additional notes

  • Each successful disbursement will emit a disbursement.created webhook event.
  • The mutation processes all disbursements synchronously and returns immediately with the results.