1+ const sh = `#!/bin/sh
2+ url="https://api.paystack.co/transfer/verify/{reference}"
3+ authorization="Authorization: Bearer YOUR_SECRET_KEY"
4+
5+ curl "$url" -H "$authorization" -X GET`
6+
7+ const js = `const https = require('https')
8+
9+ const options = {
10+ hostname: 'api.paystack.co',
11+ port: 443,
12+ path: '/transfer/verify/{reference}',
13+ method: 'GET',
14+ headers: {
15+ Authorization: 'Bearer SECRET_KEY'
16+ }
17+ }
18+
19+ https.request(options, res => {
20+ let data = ''
21+
22+ res.on('data', (chunk) => {
23+ data += chunk
24+ });
25+
26+ res.on('end', () => {
27+ console.log(JSON.parse(data))
28+ })
29+ }).on('error', error => {
30+ console.error(error)
31+ })`
32+
33+ const php = `<?php
34+ $curl = curl_init();
35+
36+ curl_setopt_array($curl, array(
37+ CURLOPT_URL => "https://api.paystack.co/transfer/verify/{reference}",
38+ CURLOPT_RETURNTRANSFER => true,
39+ CURLOPT_ENCODING => "",
40+ CURLOPT_MAXREDIRS => 10,
41+ CURLOPT_TIMEOUT => 30,
42+ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
43+ CURLOPT_CUSTOMREQUEST => "GET",
44+ CURLOPT_HTTPHEADER => array(
45+ "Authorization: Bearer SECRET_KEY",
46+ "Cache-Control: no-cache",
47+ ),
48+ ));
49+
50+ $response = curl_exec($curl);
51+ $err = curl_error($curl);
52+
53+ curl_close($curl);
54+
55+ if ($err) {
56+ echo "cURL Error #:" . $err;
57+ } else {
58+ echo $response;
59+ }
60+ ?>`
61+
62+ const json = `{
63+ "status": true,
64+ "message": "Transfer retrieved",
65+ "data": {
66+ "amount": 100000,
67+ "createdAt": "2025-08-04T09:59:19.000Z",
68+ "currency": "NGN",
69+ "domain": "test",
70+ "failures": null,
71+ "id": 860670817,
72+ "integration": 463433,
73+ "reason": "Bonus for the week",
74+ "reference": "acv_9ee55786-2323-4760-98e2-6380c9cb3f67",
75+ "source": "balance",
76+ "source_details": null,
77+ "status": "success",
78+ "titan_code": null,
79+ "transfer_code": "TRF_8opchtrhtjlfz90n",
80+ "request": 1068403325,
81+ "transferred_at": null,
82+ "updatedAt": "2025-08-04T09:59:19.000Z",
83+ "recipient": {
84+ "active": true,
85+ "createdAt": "2023-07-11T15:42:27.000Z",
86+ "currency": "NGN",
87+ "description": "",
88+ "domain": "test",
89+ "email": null,
90+ "id": 56824902,
91+ "integration": 463433,
92+ "metadata": null,
93+ "name": "Jekanmo Padie",
94+ "recipient_code": "RCP_gd9vgag7n5lr5ix",
95+ "type": "nuban",
96+ "updatedAt": "2023-07-11T15:42:27.000Z",
97+ "is_deleted": false,
98+ "isDeleted": false,
99+ "details": {
100+ "authorization_code": null,
101+ "account_number": "9876543210",
102+ "account_name": null,
103+ "bank_code": "044",
104+ "bank_name": "Access Bank"
105+ }
106+ },
107+ "session": {
108+ "provider": null,
109+ "id": null
110+ },
111+ "fee_charged": 1000,
112+ "fees_breakdown": null,
113+ "gateway_response": null
114+ }
115+ }`
116+
117+ export { sh , js , php , json }
0 commit comments