Skip to content

Commit 99c832a

Browse files
Merge pull request #106 from PaystackOSS/feat/add-pesalink
add Pesalink webhook events
2 parents 2376b7a + 65d79cc commit 99c832a

File tree

4 files changed

+200
-0
lines changed

4 files changed

+200
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
const bank_transfer_rejected = `{
2+
"event": "bank.transfer.rejected",
3+
"data": {
4+
"bank_transfer": {
5+
"amount": "1000",
6+
"message": "incorrect amount sent",
7+
"message_type": "INCORRECT_AMOUNT",
8+
"transaction_id": "5195686331"
9+
},
10+
"customer": {
11+
"first_name": "Amanda",
12+
"last_name": "Bella",
13+
"email": "[email protected]",
14+
"phone": null,
15+
"metadata": null,
16+
"domain": "live",
17+
"customer_code": "CUS_174rg4huaihJka",
18+
"risk_action": "default",
19+
"id": 181595312,
20+
"integration": 741758,
21+
"createdAt": "2025-04-24T16:55:57.954Z",
22+
"updatedAt": "2025-04-24T16:55:57.954Z"
23+
}
24+
}
25+
}`
26+
27+
const charge_successful = `{
28+
"event": "charge.success",
29+
"data": {
30+
"id": 519558290,
31+
"domain": "live",
32+
"status": "success",
33+
"reference": "uybxnzf71231",
34+
"amount": 1000,
35+
"message": null,
36+
"gateway_response": "Approved",
37+
"paid_at": "2025-06-21T11:11:27.000Z",
38+
"created_at": "2025-06-21T11:02:57.000Z",
39+
"channel": "bank_transfer",
40+
"currency": "KES",
41+
"ip_address": "172.68.67.162, 172.31.63.81",
42+
"metadata": 0,
43+
"fees_breakdown": {
44+
"amount": "15",
45+
"formula": null,
46+
"type": "paystack"
47+
},
48+
"log": null,
49+
"fees": 15,
50+
"fees_split": null,
51+
"authorization": {
52+
"authorization_code": "AUTH_9q100f8qle",
53+
"bin": "010XXX",
54+
"last4": "X607",
55+
"exp_month": "06",
56+
"exp_year": "2025",
57+
"channel": "bank_transfer",
58+
"card_type": "transfer",
59+
"bank": "Diamond Trust Bank Limited",
60+
"country_code": "KE",
61+
"brand": "Managed Account",
62+
"reusable": false,
63+
"signature": null,
64+
"account_name": null,
65+
"sender_country": "KE",
66+
"sender_bank": "Diamond Trust Bank Kenya Limited",
67+
"sender_bank_account_number": "XXXXXXX607",
68+
"sender_name": "ANN ABELL",
69+
"narration": null,
70+
"receiver_bank_account_number": "0123456789",
71+
"receiver_bank": "Diamond Trust Bank Kenya Ltd"
72+
},
73+
"customer": {
74+
"id": 181595312,
75+
"first_name": "Ann",
76+
"last_name": "Abell",
77+
"email": "[email protected]",
78+
"customer_code": "CUS_174rg4huaih38hk",
79+
"phone": null,
80+
"metadata": null,
81+
"risk_action": "default",
82+
"international_format_phone": null
83+
},
84+
"plan": {},
85+
"subaccount": {},
86+
"split": {},
87+
"order_id": null,
88+
"paidAt": "2025-04-24T16:55:57.954Z",
89+
"requested_amount": 1000,
90+
"pos_transaction_data": null,
91+
"source": {
92+
"type": "api",
93+
"source": "merchant_api",
94+
"entry_point": "charge",
95+
"identifier": null
96+
}
97+
}
98+
}`
99+
100+
export {bank_transfer_rejected, charge_successful}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"event": "bank.transfer.rejected",
3+
"data": {
4+
"bank_transfer": {
5+
"amount": "1000",
6+
"message": "incorrect amount sent",
7+
"message_type": "INCORRECT_AMOUNT",
8+
"transaction_id": "5195686331"
9+
},
10+
"customer": {
11+
"first_name": "Amanda",
12+
"last_name": "Bella",
13+
"email": "[email protected]",
14+
"phone": null,
15+
"metadata": null,
16+
"domain": "live",
17+
"customer_code": "CUS_174rg4huaihJka",
18+
"risk_action": "default",
19+
"id": 181595312,
20+
"integration": 741758,
21+
"createdAt": "2025-04-24T16:55:57.954Z",
22+
"updatedAt": "2025-04-24T16:55:57.954Z"
23+
}
24+
}
25+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"event": "charge.success",
3+
"data": {
4+
"id": 519558290,
5+
"domain": "live",
6+
"status": "success",
7+
"reference": "uybxnzf71231",
8+
"amount": 1000,
9+
"message": null,
10+
"gateway_response": "Approved",
11+
"paid_at": "2025-06-21T11:11:27.000Z",
12+
"created_at": "2025-06-21T11:02:57.000Z",
13+
"channel": "bank_transfer",
14+
"currency": "KES",
15+
"ip_address": "172.68.67.162, 172.31.63.81",
16+
"metadata": 0,
17+
"fees_breakdown": {
18+
"amount": "15",
19+
"formula": null,
20+
"type": "paystack"
21+
},
22+
"log": null,
23+
"fees": 15,
24+
"fees_split": null,
25+
"authorization": {
26+
"authorization_code": "AUTH_9q100f8qle",
27+
"bin": "010XXX",
28+
"last4": "X607",
29+
"exp_month": "06",
30+
"exp_year": "2025",
31+
"channel": "bank_transfer",
32+
"card_type": "transfer",
33+
"bank": "Diamond Trust Bank Limited",
34+
"country_code": "KE",
35+
"brand": "Managed Account",
36+
"reusable": false,
37+
"signature": null,
38+
"account_name": null,
39+
"sender_country": "KE",
40+
"sender_bank": "Diamond Trust Bank Kenya Limited",
41+
"sender_bank_account_number": "XXXXXXX607",
42+
"sender_name": "ANN ABELL",
43+
"narration": null,
44+
"receiver_bank_account_number": "0123456789",
45+
"receiver_bank": "Diamond Trust Bank Kenya Ltd"
46+
},
47+
"customer": {
48+
"id": 181595312,
49+
"first_name": "Ann",
50+
"last_name": "Abell",
51+
"email": "[email protected]",
52+
"customer_code": "CUS_174rg4huaih38hk",
53+
"phone": null,
54+
"metadata": null,
55+
"risk_action": "default",
56+
"international_format_phone": null
57+
},
58+
"plan": {},
59+
"subaccount": {},
60+
"split": {},
61+
"order_id": null,
62+
"paidAt": "2025-04-24T16:55:57.954Z",
63+
"requested_amount": 1000,
64+
"pos_transaction_data": null,
65+
"source": {
66+
"type": "api",
67+
"source": "merchant_api",
68+
"entry_point": "charge",
69+
"identifier": null
70+
}
71+
}
72+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
type: event
2+
languages:
3+
- json

0 commit comments

Comments
 (0)