Enrôler un compte bancaire
curl --request POST \
--url https://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"numeroRib": "<string>",
"refContributeurDemandeur": "<string>",
"refContributeurEmetteur": "<string>",
"refUsager": "<string>"
}
'import requests
url = "https://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account"
payload = {
"numeroRib": "<string>",
"refContributeurDemandeur": "<string>",
"refContributeurEmetteur": "<string>",
"refUsager": "<string>"
}
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({
numeroRib: '<string>',
refContributeurDemandeur: '<string>',
refContributeurEmetteur: '<string>',
refUsager: '<string>'
})
};
fetch('https://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account', 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://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account",
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([
'numeroRib' => '<string>',
'refContributeurDemandeur' => '<string>',
'refContributeurEmetteur' => '<string>',
'refUsager' => '<string>'
]),
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://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account"
payload := strings.NewReader("{\n \"numeroRib\": \"<string>\",\n \"refContributeurDemandeur\": \"<string>\",\n \"refContributeurEmetteur\": \"<string>\",\n \"refUsager\": \"<string>\"\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://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"numeroRib\": \"<string>\",\n \"refContributeurDemandeur\": \"<string>\",\n \"refContributeurEmetteur\": \"<string>\",\n \"refUsager\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account")
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 \"numeroRib\": \"<string>\",\n \"refContributeurDemandeur\": \"<string>\",\n \"refContributeurEmetteur\": \"<string>\",\n \"refUsager\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"body": {
"refUsager": "<string>",
"rib": "<string>",
"libelle": "<string>",
"typeCompteBancaire": "CHEQUE",
"reference": "<string>"
}
}{
"message": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"body": null
}{
"message": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"body": null
}{
"message": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"body": null
}Instruments de paiement
Enrôler un compte bancaire
Rattacher un compte bancaire à un usager déjà enrôlé dans GIMpay.
POST
/
api
/
v1
/
wallets
/
bank-account
Enrôler un compte bancaire
curl --request POST \
--url https://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"numeroRib": "<string>",
"refContributeurDemandeur": "<string>",
"refContributeurEmetteur": "<string>",
"refUsager": "<string>"
}
'import requests
url = "https://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account"
payload = {
"numeroRib": "<string>",
"refContributeurDemandeur": "<string>",
"refContributeurEmetteur": "<string>",
"refUsager": "<string>"
}
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({
numeroRib: '<string>',
refContributeurDemandeur: '<string>',
refContributeurEmetteur: '<string>',
refUsager: '<string>'
})
};
fetch('https://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account', 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://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account",
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([
'numeroRib' => '<string>',
'refContributeurDemandeur' => '<string>',
'refContributeurEmetteur' => '<string>',
'refUsager' => '<string>'
]),
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://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account"
payload := strings.NewReader("{\n \"numeroRib\": \"<string>\",\n \"refContributeurDemandeur\": \"<string>\",\n \"refContributeurEmetteur\": \"<string>\",\n \"refUsager\": \"<string>\"\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://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"numeroRib\": \"<string>\",\n \"refContributeurDemandeur\": \"<string>\",\n \"refContributeurEmetteur\": \"<string>\",\n \"refUsager\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://egimgarsud.gimpayapp.com/api/v1/wallets/bank-account")
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 \"numeroRib\": \"<string>\",\n \"refContributeurDemandeur\": \"<string>\",\n \"refContributeurEmetteur\": \"<string>\",\n \"refUsager\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"body": {
"refUsager": "<string>",
"rib": "<string>",
"libelle": "<string>",
"typeCompteBancaire": "CHEQUE",
"reference": "<string>"
}
}{
"message": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"body": null
}{
"message": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"body": null
}{
"message": "<string>",
"status": 123,
"timestamp": "2023-11-07T05:31:56Z",
"body": null
}Cet appel rattache un compte bancaire supplémentaire à un usager existant. Pour le premier instrument d’un nouvel usager, utilisez plutôt l’enrôlement d’usager.
Champs
C’est l’endpoint d’enrôlement le plus simple : les cinq champs sont tous obligatoires, sans variation selon le cas.| Champ | Rôle |
|---|---|
numeroRib | Numéro RIB du compte à enrôler |
typeCompteBancaire | CHEQUE, EPARGNE ou DAT — voir le glossaire |
refUsager | Référence GIMpay de l’usager détenteur |
refContributeurDemandeur | Vous, le contributeur qui demande l’enrôlement |
refContributeurEmetteur | La banque détentrice du compte |
DAT désigne un dépôt à terme. Ces trois valeurs constituent la liste exhaustive du contrat : un type de compte non listé ne peut pas être enrôlé en l’état.Avant d’appeler
1
Identifiez la banque émettrice
GET /contributors?typeInstrument=COMPTE_BANCAIRE&codeIso=... retourne les contributeurs proposant ce type d’instrument, avec leur référence.2
Vérifiez que le compte n'est pas déjà enrôlé
POST /check-existence en passant le RIB comme identifiantCompte, puis validation de l’OTP.Réponses
Le corps utile arrive dansbody, à l’intérieur de l’enveloppe commune { message, status, body, timestamp }, et contient refInstrumentPaiement — la référence de l’instrument créé, à conserver pour les appels suivants.
Un 404 indique qu’une entité renseignée est introuvable : le plus souvent refUsager ou l’une des deux références de contributeur. Voir la référence des codes d’erreur.
Et ensuite ?
Consulter le solde
GET /wallets/{referenceWallet}/balanceExécuter une opération
Utilisez ce compte comme instrument initiateur.
Authorizations
Jeton émis par POST /api/v1/auth/token.
Body
application/json
Le numéro RIB
La référence du contributeur demandeur qui demande l'enrôlement de l'instrument de paiement
La référence du contributeur émetteur de l'instrument de paiement à enrôler
La reference de l'usager
Available options:
CHEQUE, EPARGNE, DAT