Attacher un document au dossier
curl --request POST \
--url https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_type": "ID_CARD",
"label": "Recto CNI",
"file_url": "https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg"
}
'import requests
url = "https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/"
payload = {
"document_type": "ID_CARD",
"label": "Recto CNI",
"file_url": "https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document_type: 'ID_CARD',
label: 'Recto CNI',
file_url: 'https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg'
})
};
fetch('https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/', 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.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'document_type' => 'ID_CARD',
'label' => 'Recto CNI',
'file_url' => 'https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg'
]),
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.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/"
payload := strings.NewReader("{\n \"document_type\": \"ID_CARD\",\n \"label\": \"Recto CNI\",\n \"file_url\": \"https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document_type\": \"ID_CARD\",\n \"label\": \"Recto CNI\",\n \"file_url\": \"https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"document_type\": \"ID_CARD\",\n \"label\": \"Recto CNI\",\n \"file_url\": \"https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1a2b3c4d-5e6f-4708-9a0b-1c2d3e4f5a6b",
"merchant_kyc": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"document_type": "ID_CARD",
"label": "Recto CNI",
"file_url": "https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg",
"created_at": "2026-08-10T09:05:00Z"
}KYC
Attacher un document au dossier
Étape 2/2 — rattache l’URL obtenue à l’upload au dossier, avec son type
POST
/
merchant-kyc
/
{kyc_id}
/
documents
/
Attacher un document au dossier
curl --request POST \
--url https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_type": "ID_CARD",
"label": "Recto CNI",
"file_url": "https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg"
}
'import requests
url = "https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/"
payload = {
"document_type": "ID_CARD",
"label": "Recto CNI",
"file_url": "https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
document_type: 'ID_CARD',
label: 'Recto CNI',
file_url: 'https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg'
})
};
fetch('https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/', 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.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'document_type' => 'ID_CARD',
'label' => 'Recto CNI',
'file_url' => 'https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg'
]),
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.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/"
payload := strings.NewReader("{\n \"document_type\": \"ID_CARD\",\n \"label\": \"Recto CNI\",\n \"file_url\": \"https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document_type\": \"ID_CARD\",\n \"label\": \"Recto CNI\",\n \"file_url\": \"https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.saspay.me/api/v1/merchant-kyc/{kyc_id}/documents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"document_type\": \"ID_CARD\",\n \"label\": \"Recto CNI\",\n \"file_url\": \"https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"id": "1a2b3c4d-5e6f-4708-9a0b-1c2d3e4f5a6b",
"merchant_kyc": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"document_type": "ID_CARD",
"label": "Recto CNI",
"file_url": "https://cdn.saspay.me/kyc/8f2c1e9a-6b4d-4a3f-9c1e-2b3d4e5f6a7b.jpg",
"created_at": "2026-08-10T09:05:00Z"
}Dashboard uniquement — cet appel échoue avec
403 dashboard_only via une clé API. Utilisez le jeton de session obtenu par connexion, voir Créer un compte et obtenir une clé API.Authorizations
Clé API secrète du marchand — header Authorization: Bearer sk_live_xxx (ou sk_test_xxx en environnement de test).
Path Parameters
Identifiant du dossier KYC
Body
application/json
Response
Document attaché
⌘I