Annuler l'autorisation d'un payin
curl --request PATCH \
--url https://api.stage.localpayment.com/api/payin/capture/{externalId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "CANCELLED"
}
'import requests
url = "https://api.stage.localpayment.com/api/payin/capture/{externalId}/status"
payload = { "status": "CANCELLED" }
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({status: 'CANCELLED'})
};
fetch('https://api.stage.localpayment.com/api/payin/capture/{externalId}/status', 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/payin/capture/{externalId}/status",
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([
'status' => 'CANCELLED'
]),
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/payin/capture/{externalId}/status"
payload := strings.NewReader("{\n \"status\": \"CANCELLED\"\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/payin/capture/{externalId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"CANCELLED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/payin/capture/{externalId}/status")
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 \"status\": \"CANCELLED\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "1648840917",
"internalId": "39eb0371-3f21-488f-a779-913799e51406",
"status": {
"code": "905",
"description": "CANCELLED",
"detail": "The authorization was cancelled"
}
}
Cartes
Annuler l'autorisation d'un Payin
PATCH
/
api
/
payin
/
capture
/
{externalId}
/
status
Annuler l'autorisation d'un payin
curl --request PATCH \
--url https://api.stage.localpayment.com/api/payin/capture/{externalId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "CANCELLED"
}
'import requests
url = "https://api.stage.localpayment.com/api/payin/capture/{externalId}/status"
payload = { "status": "CANCELLED" }
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({status: 'CANCELLED'})
};
fetch('https://api.stage.localpayment.com/api/payin/capture/{externalId}/status', 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/payin/capture/{externalId}/status",
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([
'status' => 'CANCELLED'
]),
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/payin/capture/{externalId}/status"
payload := strings.NewReader("{\n \"status\": \"CANCELLED\"\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/payin/capture/{externalId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"CANCELLED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/payin/capture/{externalId}/status")
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 \"status\": \"CANCELLED\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "1648840917",
"internalId": "39eb0371-3f21-488f-a779-913799e51406",
"status": {
"code": "905",
"description": "CANCELLED",
"detail": "The authorization was cancelled"
}
}
Cet endpoint annule l’autorisation d’une transaction Payin précédemment autorisée, ce qui empêche la capture des fonds. C’est utile si vous devez annuler une autorisation avant son règlement.
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.
Paramètres de chemin
Réponse
OK
Dernière modification le 22 novembre 2026

