-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflutterwave-webhooks-api-openapi.yml
More file actions
90 lines (90 loc) · 2.83 KB
/
flutterwave-webhooks-api-openapi.yml
File metadata and controls
90 lines (90 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
openapi: 3.1.0
info:
title: Flutterwave Webhooks API
description: |
Flutterwave delivers webhook events for payments, transfers, refunds,
chargebacks, and virtual account funding. This document describes the
outbound HTTP callbacks Flutterwave will send to a merchant-configured
endpoint. The receiver must respond with 2XX within 5 seconds; Flutterwave
retries with exponential backoff.
version: '4.0.0'
contact:
name: Flutterwave
url: https://developer.flutterwave.com
email: developers@flutterwavego.com
license:
name: Flutterwave Terms of Service
url: https://flutterwave.com/us/terms
servers:
- url: https://your-webhook-endpoint.example.com
description: Merchant-hosted webhook endpoint
tags:
- name: Webhooks
description: Outbound webhook callbacks delivered by Flutterwave.
paths:
/webhooks/flutterwave:
post:
summary: Receive Flutterwave Webhook
description: |
Endpoint hosted by the merchant. Flutterwave POSTs a JSON payload and
sets the `verif-hash` header to the secret hash configured in the
dashboard. Validate `verif-hash` before trusting the payload.
operationId: receiveWebhook
tags: [Webhooks]
parameters:
- in: header
name: verif-hash
required: true
description: Pre-shared secret hash configured by the merchant.
schema: { type: string }
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookEvent'
responses:
'200':
description: Acknowledgement
components:
schemas:
WebhookEvent:
type: object
required: [type, data]
properties:
type:
type: string
enum:
- charge.completed
- charge.failed
- transfer.completed
- transfer.failed
- refund.completed
- refund.failed
- chargeback.created
- chargeback.updated
- virtual_account.funded
data:
type: object
properties:
id: { type: string }
amount: { type: number }
currency: { type: string }
status: { type: string }
reference: { type: string }
customer:
type: object
properties:
id: { type: string }
email: { type: string, format: email }
payment_method:
type: object
properties:
type: { type: string }
processor_response:
type: object
properties:
type: { type: string }
code: { type: string }
created_datetime: { type: string, format: date-time }
meta: { type: object }