This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Cancel list of payouts

POST https://api-sandbox.payabli.com/api/MoneyOut/cancelAll
Content-Type: application/json

Cancels an array of payout transactions.

Reference: https://docs.payabli.com/developers/api-reference/moneyout/cancel-list-of-payout-transactions

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi
  version: 1.0.0
paths:
  /MoneyOut/cancelAll:
    post:
      operationId: cancel-all-out
      summary: Cancel list of payout transactions
      description: Cancels an array of payout transactions.
      tags:
        - subpackage_moneyOut
      parameters:
        - name: requestToken
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/type___moneyOutTypes__:CaptureAllOutResponse
        '400':
          description: Bad request/ invalid data
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal API Error
          content:
            application/json:
              schema:
                description: Any type
        '503':
          description: Database connection error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:PayabliApiResponse'
      requestBody:
        description: Array of identifiers of payout transactions to cancel.
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
servers:
  - url: https://api-sandbox.payabli.com/api
  - url: https://api.payabli.com/api
components:
  schemas:
    type_:IsSuccess:
      type: boolean
      description: >-
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    type_:PageIdentifier:
      type: string
      description: Auxiliary validation used internally by payment pages and components.
      title: PageIdentifier
    type_:Responsecode:
      type: integer
      description: >-
        Code for the response. Learn more in [API Response
        Codes](/developers/api-reference/api-responses).
      title: Responsecode
    type_:Customeridtrans:
      type: integer
      format: int64
      description: >-
        Payabli-generated unique ID of customer owner of transaction. Returns
        `0` if the transaction wasn't assigned to an existing customer or no
        customer was created.
      title: Customeridtrans
    type_:Referenceidtrans:
      type: string
      description: The transaction identifier in Payabli.
      title: Referenceidtrans
    type_:ResultCode:
      type: integer
      description: >-
        Result code for the operation. Value 1 indicates a successful operation,

        values 2 and 3 indicate errors. A value of 10 indicates that an
        operation

        has been initiated and is pending.
      title: ResultCode
    type_:Resulttext:
      type: string
      description: >-
        Text describing the result. If `ResultCode` = 1, will return 'Approved'
        or a general success message. If `ResultCode`` = 2 or 3, will contain
        the cause of the error or decline.
      title: Resulttext
    type___moneyOutTypes__:CaptureAllOutResponseResponseDataItem:
      type: object
      properties:
        CustomerId:
          $ref: '#/components/schemas/type_:Customeridtrans'
          description: >-
            Internal unique Id of vendor owner of transaction. Returns `0` if
            the transaction wasn't assigned to an existing vendor or no vendor
            was created.
        ReferenceId:
          $ref: '#/components/schemas/type_:Referenceidtrans'
        ResultCode:
          $ref: '#/components/schemas/type_:ResultCode'
        ResultText:
          $ref: '#/components/schemas/type_:Resulttext'
          description: |-
            Text describing the result. 
            If `ResultCode`` = 1, returns 'Authorized'. 
            If `ResultCode` = 2 or 3, this contains the cause of the decline.
      title: CaptureAllOutResponseResponseDataItem
    type_:ResponseText:
      type: string
      description: 'Response text for operation: ''Success'' or ''Declined''.'
      title: ResponseText
    type___moneyOutTypes__:CaptureAllOutResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        pageIdentifier:
          $ref: '#/components/schemas/type_:PageIdentifier'
        responseCode:
          $ref: '#/components/schemas/type_:Responsecode'
        responseData:
          type: array
          items:
            $ref: >-
              #/components/schemas/type___moneyOutTypes__:CaptureAllOutResponseResponseDataItem
          description: Array of objects describing the transactions.
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: CaptureAllOutResponse
    type_:Responsedata:
      type: object
      additionalProperties:
        description: Any type
      description: The object containing the response data.
      title: Responsedata
    type_:PayabliApiResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseData:
          $ref: '#/components/schemas/type_:Responsedata'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: PayabliApiResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: requestToken

```

## SDK Code Examples

```typescript CancelAll
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.moneyOut.cancelAllOut([
        "2-29",
        "2-28",
        "2-27",
    ]);
}
main();

```

```python CancelAll
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.money_out.cancel_all_out(
    request=[
        "2-29",
        "2-28",
        "2-27"
    ],
)

```

```csharp CancelAll
using PayabliPayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.MoneyOut.CancelAllOutAsync(
            new List<string>(){
                "2-29",
                "2-28",
                "2-27",
            }
        );
    }

}

```

```go CancelAll
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/MoneyOut/cancelAll"

	payload := strings.NewReader("[\n  \"2-29\",\n  \"2-28\",\n  \"2-27\"\n]")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("requestToken", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby CancelAll
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/MoneyOut/cancelAll")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "[\n  \"2-29\",\n  \"2-28\",\n  \"2-27\"\n]"

response = http.request(request)
puts response.read_body
```

```java CancelAll
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/MoneyOut/cancelAll")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("[\n  \"2-29\",\n  \"2-28\",\n  \"2-27\"\n]")
  .asString();
```

```php CancelAll
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/MoneyOut/cancelAll', [
  'body' => '[
  "2-29",
  "2-28",
  "2-27"
]',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```swift CancelAll
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["2-29", "2-28", "2-27"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/MoneyOut/cancelAll")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```