# 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.1 info: title: Cancel list of payout transactions version: endpoint_moneyOut.CancelAllOut 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: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} requestBody: description: Array of identifiers of payout transactions to cancel. content: application/json: schema: type: array items: type: string components: schemas: type_:IsSuccess: type: boolean type_:PageIdentifier: type: string type_:Responsecode: type: integer type_:Customeridtrans: type: integer format: int64 type_:Referenceidtrans: type: string type_:ResultCode: type: integer type_:Resulttext: type: string 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. type_:ResponseText: type: string 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 ``` ## SDK Code Examples ```python CancelAll from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.money_out.cancel_all_out( request=["2-29", "2-28", "2-27"], ) ``` ```typescript CancelAll import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.moneyOut.cancelAllOut(["2-29", "2-28", "2-27"]); ``` ```go CancelAll import ( context "context" option "github.com/payabli/sdk-go/option" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.MoneyOut.CancelAllOut( context.TODO(), []string{ "2-29", "2-28", "2-27", }, ) ``` ```csharp CancelAll using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.MoneyOut.CancelAllOutAsync(new List() { "2-29", "2-28", "2-27" }); ``` ```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"] = '' 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 HttpResponse response = Unirest.post("https://api-sandbox.payabli.com/api/MoneyOut/cancelAll") .header("requestToken", "") .header("Content-Type", "application/json") .body("[\n \"2-29\",\n \"2-28\",\n \"2-27\"\n]") .asString(); ``` ```php CancelAll request('POST', 'https://api-sandbox.payabli.com/api/MoneyOut/cancelAll', [ 'body' => '[ "2-29", "2-28", "2-27" ]', 'headers' => [ 'Content-Type' => 'application/json', 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift CancelAll import Foundation let headers = [ "requestToken": "", "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() ```