Pont · Documentation
RéférenceAPI

Webhooks sortants

Événements envoyés à votre application.

Lire les webhooks

GET
/admin/webhooks

Authorization

AdminToken
headerAuthorizationBearer <token>

PONT_ADMIN_TOKEN, pour les routes /admin.

Response Body

Webhooks.

application/json
  1. response
vault*boolean
inbound*array<>

URL à déclarer chez les agrégateurs.

endpoints*array<>

Destinataires de vos événements.

deliveries*array<>

50 dernières livraisons.

curl -X GET 'http://localhost:8787/admin/webhooks'
{  "vault": true,  "inbound": [    {      "provider": "string",      "url": "http://example.com"    }  ],  "endpoints": [    {      "id": "string",      "url": "http://example.com",      "source": "env",      "createdAt": 0    }  ],  "deliveries": [    {      "id": "whd_5bbd65568c4a446fb538f9a11d10e3a4",      "endpointId": "string",      "url": "http://example.com",      "status": "pending",      "attempts": 0,      "lastError": "string",      "lastHttpStatus": 0,      "eventType": "payment.succeeded",      "createdAt": 0,      "nextAttemptAt": 0    }  ]}

Ajouter un destinataire

POST
/admin/webhooks/endpoints

Authorization

AdminToken
headerAuthorizationBearer <token>

PONT_ADMIN_TOKEN, pour les routes /admin.

Request Body

application/json
  1. body
url*string
Formaturi

Response Body

Destinataire créé.

application/json
  1. response
id*string
url*string
Formaturi
secret*string

Secret de signature whsec_…, affiché une seule fois.

curl -X POST 'http://localhost:8787/admin/webhooks/endpoints' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://exemple.bj/webhooks/pont"}'
{  "id": "ep_758013f8ac09",  "url": "https://exemple.bj/webhooks/pont",  "secret": "whsec_…"}

Supprimer un destinataire

DELETE
/admin/webhooks/endpoints/{id}

Authorization

AdminToken
headerAuthorizationBearer <token>

PONT_ADMIN_TOKEN, pour les routes /admin.

Path Parameters

id*string

Identifiant du destinataire (ep_…).

Response Body

Supprimé.

application/json
  1. response
deleted?boolean
curl -X DELETE 'http://localhost:8787/admin/webhooks/endpoints/string'
{  "deleted": true}

Renvoyer une livraison

POST
/admin/webhooks/deliveries/{id}

Authorization

AdminToken
headerAuthorizationBearer <token>

PONT_ADMIN_TOKEN, pour les routes /admin.

Path Parameters

id*string

Identifiant de la livraison (whd_…).

Response Body

Livraison relancée.

application/json
  1. response
id*string
endpointId*string
url*string
Formaturi
status*string
Value in"pending""delivered""failed"
attempts*integer

Nombre de tentatives.

lastError*string|null
lastHttpStatus*integer|null
eventType*string|null
createdAt*integer
nextAttemptAt*integer|null
curl -X POST 'http://localhost:8787/admin/webhooks/deliveries/string'
{  "id": "whd_5bbd65568c4a446fb538f9a11d10e3a4",  "endpointId": "string",  "url": "http://example.com",  "status": "pending",  "attempts": 0,  "lastError": "string",  "lastHttpStatus": 0,  "eventType": "payment.succeeded",  "createdAt": 0,  "nextAttemptAt": 0}

Événement Pont

Request Body

application/json
  1. body
id*string

Identifiant unique de l'événement (aussi dans l'en-tête Pont-Event-Id) : dédoublonnez dessus.

type*string

Type d'événement.

Value in"payment.pending""payment.processing""payment.succeeded""payment.failed""payment.expired""payment.cancelled""payment.refunded""payment.partially_refunded""payment.needs_reconciliation""payout.pending""payout.processing""payout.succeeded""payout.failed""payout.cancelled""payout.needs_reconciliation""refund.pending""refund.processing""refund.succeeded""refund.failed""refund.cancelled""refund.needs_reconciliation"
object*string

Nature de l'objet dans data.

Value in"payment""payout""refund"
created_at*integer

Date de l'événement, en millisecondes Unix.

data*

L'objet concerné, sans identifiant interne de tentative ni action client. Un remboursement porte payment_id à la place de reference et country.

Response Body

Événement reçu.

Example Requests

POST/pontEvent