Annuler un payout
curl --request PATCH \
--url https://api.stage.localpayment.com/api/payout/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": "1736488554"
}
'import requests
url = "https://api.stage.localpayment.com/api/payout/cancel"
payload = { "externalId": "1736488554" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalId: '1736488554'})
};
fetch('https://api.stage.localpayment.com/api/payout/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stage.localpayment.com/api/payout/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => '1736488554'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stage.localpayment.com/api/payout/cancel"
payload := strings.NewReader("{\n \"externalId\": \"1736488554\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.stage.localpayment.com/api/payout/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"1736488554\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/payout/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"1736488554\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "1736488510",
"internalId": "3d36811d-1c02-41ea-a576-68df62c4603a",
"status": {
"code": "900",
"description": "Cancelled",
"detail": "The payout was cancelled"
}
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}{
"Status": 404,
"Message": "This transacion does not exists.",
"TraceId": "dae2d1cb-7e9e-48a5-8530-980f38b31712"
}PAYOUTS
Annuler un Payout
PATCH
/
api
/
payout
/
cancel
Annuler un payout
curl --request PATCH \
--url https://api.stage.localpayment.com/api/payout/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": "1736488554"
}
'import requests
url = "https://api.stage.localpayment.com/api/payout/cancel"
payload = { "externalId": "1736488554" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({externalId: '1736488554'})
};
fetch('https://api.stage.localpayment.com/api/payout/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stage.localpayment.com/api/payout/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => '1736488554'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stage.localpayment.com/api/payout/cancel"
payload := strings.NewReader("{\n \"externalId\": \"1736488554\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.stage.localpayment.com/api/payout/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalId\": \"1736488554\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/payout/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalId\": \"1736488554\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "1736488510",
"internalId": "3d36811d-1c02-41ea-a576-68df62c4603a",
"status": {
"code": "900",
"description": "Cancelled",
"detail": "The payout was cancelled"
}
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}{
"Status": 404,
"Message": "This transacion does not exists.",
"TraceId": "dae2d1cb-7e9e-48a5-8530-980f38b31712"
}Annulez un Payout pour empêcher le transfert des fonds. Utilisez cet endpoint pour arrêter des transactions créées par erreur ou nécessitant une correction.
Remarque Vous ne pouvez annuler que les Payouts dont le statut est Locked ou On Hold. Pour en savoir plus sur les transitions de statut, consultez la documentation Vue d’ensemble des Payouts.Cet endpoint sécurise vos transactions en garantissant que les fonds ne sont pas envoyés au mauvais destinataire ni pour un montant incorrect.
Autorisations
En-têtes
Jeton d'accès Bearer pour l'authentification. Ce jeton s'obtient via les endpoints Obtenir un jeton d'accès ou Actualiser le jeton d'accès.
Réponse
OK
Dernière modification le 22 novembre 2026

