Quickstart
Faire ton premier appel signé à l'API Merchant en moins de 5 minutes.
Prérequis
1. Récupère tes clés sandbox
X-Api-Key = pk_sandbox_a1b2c3d4...
secret_key = sk_sandbox_e5f6g7h8... (ne sort jamais en clair)2. Signe et appelle /balance
/balance#!/usr/bin/env bash
set -euo pipefail
PUB="pk_sandbox_a1b2c3d4..."
SEC="sk_sandbox_e5f6g7h8..."
HOST="https://api.intram.org/v1"
# Path interne (après rewrite Nginx) — c'est lui qui sert à la signature
SIGN_PATH="/api/v1/merchant/balance"
# Timestamp ISO 8601 UTC
TS=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
# Payload : timestamp\nMETHOD\nPATH\nQUERY\nBODY
PAYLOAD="$TS
GET
$SIGN_PATH
"
# HMAC-SHA256 hex
SIG="sha256=$(printf %s "$PAYLOAD" | openssl dgst -sha256 -hmac "$SEC" -binary | xxd -p -c 256)"
# Appel
curl -i "$HOST/balance" \
-H "X-Api-Key: $PUB" \
-H "X-Timestamp: $TS" \
-H "X-Signature: $SIG"3. Déclenche un payout sandbox
4. Suivre l'opération
5. Étapes suivantes
Si tu veux…
Direction
Mis à jour