@payloqa/payment-widget 1.0.0 โ 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +171 -339
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,198 +1,207 @@
|
|
|
1
1
|
# ๐ณ Payloqa Payment Widget
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A React payment widget for processing mobile money payments. Easily integrate secure payment processing into your React applications.
|
|
4
4
|
|
|
5
5
|
## โจ Features
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- ๐ฑ
|
|
10
|
-
- ๐จ
|
|
11
|
-
-
|
|
12
|
-
- ๐
|
|
13
|
-
-
|
|
14
|
-
- ๐ฆ **Multiple Builds** - UMD, ESM, and TypeScript declarations
|
|
7
|
+
- ๐ฑ Mobile money payment processing (MTN, Telecel, AirtelTigo)
|
|
8
|
+
- ๐ OTP verification for secure transactions
|
|
9
|
+
- ๐ฑ Fully responsive design
|
|
10
|
+
- ๐จ Customizable branding with primary color
|
|
11
|
+
- โก Easy integration with React
|
|
12
|
+
- ๐ Real-time payment status updates
|
|
13
|
+
- โฑ๏ธ Automatic timeout handling
|
|
15
14
|
|
|
16
|
-
## ๐
|
|
15
|
+
## ๐ Getting Started
|
|
17
16
|
|
|
18
|
-
###
|
|
17
|
+
### 1. Get Your API Credentials
|
|
18
|
+
|
|
19
|
+
Visit [https://developer.payloqa.com/](https://developer.payloqa.com/) to:
|
|
20
|
+
|
|
21
|
+
- Login with your phone number (simple phone number authentication)
|
|
22
|
+
- Go to the **API Keys** page
|
|
23
|
+
- Create your **API Key** and get your **Platform ID**
|
|
24
|
+
- Request payment access by filling out the KYC form
|
|
25
|
+
- Once approved, you'll be notified and can start processing payments
|
|
26
|
+
|
|
27
|
+
### 2. Install the Package
|
|
19
28
|
|
|
20
29
|
```bash
|
|
21
30
|
npm install @payloqa/payment-widget
|
|
22
31
|
```
|
|
23
32
|
|
|
24
|
-
###
|
|
33
|
+
### 3. Import and Use
|
|
25
34
|
|
|
26
35
|
```jsx
|
|
27
|
-
import { PaymentWidget } from
|
|
36
|
+
import { PaymentWidget } from "@payloqa/payment-widget";
|
|
37
|
+
import "@payloqa/payment-widget/dist/payment-widget.css";
|
|
28
38
|
|
|
29
39
|
function App() {
|
|
40
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
41
|
+
|
|
30
42
|
const config = {
|
|
31
|
-
apiKey:
|
|
32
|
-
platformId:
|
|
33
|
-
|
|
43
|
+
apiKey: "your-api-key",
|
|
44
|
+
platformId: "your-platform-id",
|
|
45
|
+
amount: 10.00,
|
|
46
|
+
currency: "GHS", // Optional, defaults to "GHS"
|
|
47
|
+
primaryColor: "#3B82F6", // Optional, your brand color
|
|
48
|
+
displayMode: "modal", // "modal" | "inline" | "fullpage"
|
|
49
|
+
redirect_url: "https://yoursite.com/callback", // Required
|
|
50
|
+
webhookUrl: "https://yoursite.com/webhook", // Required
|
|
51
|
+
orderId: "order-123", // Optional
|
|
52
|
+
metadata: { // Optional
|
|
53
|
+
customField: "value",
|
|
54
|
+
},
|
|
34
55
|
};
|
|
35
56
|
|
|
36
|
-
const handleSuccess = (
|
|
37
|
-
console.log(
|
|
38
|
-
console.log(
|
|
39
|
-
console.log(
|
|
57
|
+
const handleSuccess = (payment) => {
|
|
58
|
+
console.log("Payment successful!", payment);
|
|
59
|
+
console.log("Payment ID:", payment.payment_id);
|
|
60
|
+
console.log("Status:", payment.status);
|
|
61
|
+
console.log("Amount:", payment.amount);
|
|
40
62
|
};
|
|
41
63
|
|
|
42
64
|
const handleError = (error) => {
|
|
43
|
-
console.error(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const handleStatusChange = (status) => {
|
|
47
|
-
console.log('Payment status:', status);
|
|
65
|
+
console.error("Payment failed:", error.message);
|
|
66
|
+
alert(`Error: ${error.message}`);
|
|
48
67
|
};
|
|
49
68
|
|
|
50
69
|
return (
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
70
|
+
<div>
|
|
71
|
+
<button onClick={() => setIsOpen(true)}>Pay Now</button>
|
|
72
|
+
|
|
73
|
+
<PaymentWidget
|
|
74
|
+
config={config}
|
|
75
|
+
isOpen={isOpen}
|
|
76
|
+
onClose={() => setIsOpen(false)}
|
|
77
|
+
onSuccess={handleSuccess}
|
|
78
|
+
onError={handleError}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
59
81
|
);
|
|
60
82
|
}
|
|
61
83
|
```
|
|
62
84
|
|
|
63
85
|
## โ๏ธ Configuration
|
|
64
86
|
|
|
65
|
-
###
|
|
87
|
+
### Required Configuration
|
|
66
88
|
|
|
67
89
|
```typescript
|
|
68
90
|
interface PaymentWidgetConfig {
|
|
69
|
-
apiKey: string;
|
|
70
|
-
platformId: string;
|
|
71
|
-
|
|
91
|
+
apiKey: string; // Your Payloqa API key
|
|
92
|
+
platformId: string; // Your platform ID
|
|
93
|
+
amount: number; // Payment amount (e.g., 10.00)
|
|
94
|
+
currency?: string; // Currency code (default: "GHS")
|
|
95
|
+
displayMode?: string; // "modal" | "inline" | "fullpage" (default: "modal")
|
|
96
|
+
primaryColor?: string; // Your brand color in hex (e.g., "#3B82F6")
|
|
97
|
+
logoUrl?: string; // Optional logo URL to display in header
|
|
98
|
+
redirect_url: string; // Required: HTTPS URL for redirect after payment
|
|
99
|
+
webhookUrl: string; // Required: Webhook URL for server notifications
|
|
100
|
+
orderId?: string; // Optional order identifier
|
|
101
|
+
metadata?: object; // Optional metadata object
|
|
102
|
+
onSuccess?: (payment: PaymentData) => void;
|
|
103
|
+
onError?: (error: PaymentError) => void;
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### PaymentWidget Props
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
interface PaymentWidgetProps {
|
|
111
|
+
config: PaymentWidgetConfig;
|
|
112
|
+
isOpen: boolean; // Controls widget visibility
|
|
113
|
+
onClose?: () => void; // Called when widget is closed
|
|
72
114
|
}
|
|
73
115
|
```
|
|
74
116
|
|
|
75
117
|
### Callbacks
|
|
76
118
|
|
|
77
119
|
```typescript
|
|
78
|
-
// Success callback
|
|
79
|
-
onSuccess: (
|
|
120
|
+
// Success callback - called when payment succeeds
|
|
121
|
+
onSuccess: (payment: PaymentData) => void
|
|
80
122
|
|
|
81
|
-
// Error callback
|
|
123
|
+
// Error callback - called when payment fails
|
|
82
124
|
onError: (error: PaymentError) => void
|
|
83
125
|
|
|
84
|
-
//
|
|
85
|
-
|
|
126
|
+
// Close callback - called when widget is closed
|
|
127
|
+
onClose: () => void
|
|
86
128
|
```
|
|
87
129
|
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
The widget uses Tailwind CSS for styling. You can customize the appearance:
|
|
91
|
-
|
|
92
|
-
```css
|
|
93
|
-
/* Custom styles */
|
|
94
|
-
.payloqa-payment-widget {
|
|
95
|
-
--primary-color: #3b82f6;
|
|
96
|
-
--error-color: #ef4444;
|
|
97
|
-
--success-color: #10b981;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* Override specific components */
|
|
101
|
-
.payment-widget-container {
|
|
102
|
-
@apply bg-white rounded-lg shadow-lg p-6;
|
|
103
|
-
}
|
|
130
|
+
## ๐ฑ Display Modes
|
|
104
131
|
|
|
105
|
-
|
|
106
|
-
@apply border-2 border-gray-300 rounded-lg p-4;
|
|
107
|
-
}
|
|
132
|
+
The widget supports three display modes:
|
|
108
133
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
134
|
+
### Modal (Default)
|
|
135
|
+
```jsx
|
|
136
|
+
<PaymentWidget
|
|
137
|
+
config={{ ...config, displayMode: "modal" }}
|
|
138
|
+
isOpen={isOpen}
|
|
139
|
+
onClose={() => setIsOpen(false)}
|
|
140
|
+
/>
|
|
112
141
|
```
|
|
142
|
+
Displays as a centered modal overlay with backdrop.
|
|
113
143
|
|
|
114
|
-
|
|
144
|
+
### Inline
|
|
145
|
+
```jsx
|
|
146
|
+
<PaymentWidget
|
|
147
|
+
config={{ ...config, displayMode: "inline" }}
|
|
148
|
+
isOpen={isOpen}
|
|
149
|
+
onClose={() => setIsOpen(false)}
|
|
150
|
+
/>
|
|
151
|
+
```
|
|
152
|
+
Displays inline within your page layout.
|
|
115
153
|
|
|
116
|
-
###
|
|
154
|
+
### Fullpage
|
|
155
|
+
```jsx
|
|
156
|
+
<PaymentWidget
|
|
157
|
+
config={{ ...config, displayMode: "fullpage" }}
|
|
158
|
+
isOpen={isOpen}
|
|
159
|
+
onClose={() => setIsOpen(false)}
|
|
160
|
+
/>
|
|
161
|
+
```
|
|
162
|
+
Displays as a full-page experience.
|
|
117
163
|
|
|
118
|
-
|
|
164
|
+
## ๐ณ Supported Networks
|
|
119
165
|
|
|
120
|
-
|
|
121
|
-
# Open the test interface
|
|
122
|
-
open test.html
|
|
123
|
-
```
|
|
166
|
+
The widget supports mobile money payments for:
|
|
124
167
|
|
|
125
|
-
**
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
- โ
Form validation testing
|
|
129
|
-
- โ
Transaction processing simulation
|
|
130
|
-
- โ
Mobile responsiveness testing
|
|
131
|
-
- โ
Error scenario simulation
|
|
132
|
-
- โ
Real-time logging
|
|
168
|
+
- **MTN** - MTN Mobile Money
|
|
169
|
+
- **Telecel** - Telecel Cash (formerly Vodafone)
|
|
170
|
+
- **AirtelTigo** - AirtelTigo Money
|
|
133
171
|
|
|
134
|
-
|
|
172
|
+
## ๐ Payment Flow
|
|
135
173
|
|
|
136
|
-
|
|
174
|
+
1. **Phone Input** - User enters phone number and selects network
|
|
175
|
+
2. **OTP Verification** - User receives and enters 4-digit OTP code
|
|
176
|
+
3. **Processing** - Payment is processed and status is polled
|
|
177
|
+
4. **Completion** - Success or error screen is shown
|
|
137
178
|
|
|
138
|
-
|
|
139
|
-
# Next.js
|
|
140
|
-
npx create-next-app@latest my-app
|
|
141
|
-
cd my-app
|
|
142
|
-
npm install @payloqa/payment-widget
|
|
179
|
+
## ๐ Sample Responses
|
|
143
180
|
|
|
144
|
-
|
|
145
|
-
npx create-react-app my-app
|
|
146
|
-
cd my-app
|
|
147
|
-
npm install @payloqa/payment-widget
|
|
181
|
+
### Success Response
|
|
148
182
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
183
|
+
```typescript
|
|
184
|
+
{
|
|
185
|
+
payment_id: "pay_abc123",
|
|
186
|
+
status: "completed",
|
|
187
|
+
amount: 10.00,
|
|
188
|
+
currency: "GHS",
|
|
189
|
+
payment_method: "mobile_money",
|
|
190
|
+
phone_number: "+233XXXXXXXXX",
|
|
191
|
+
network: "mtn",
|
|
192
|
+
created_at: "2024-01-24T12:00:00Z",
|
|
193
|
+
updated_at: "2024-01-24T12:01:00Z",
|
|
194
|
+
paid_at: "2024-01-24T12:01:00Z"
|
|
195
|
+
}
|
|
153
196
|
```
|
|
154
197
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
### Browser Usage
|
|
164
|
-
|
|
165
|
-
```html
|
|
166
|
-
<!DOCTYPE html>
|
|
167
|
-
<html>
|
|
168
|
-
<head>
|
|
169
|
-
<link rel="stylesheet" href="https://unpkg.com/@payloqa/payment-widget/dist/styles.css">
|
|
170
|
-
</head>
|
|
171
|
-
<body>
|
|
172
|
-
<div id="payment-widget"></div>
|
|
173
|
-
|
|
174
|
-
<script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
|
|
175
|
-
<script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
|
|
176
|
-
<script src="https://unpkg.com/@payloqa/payment-widget/dist/index.umd.js"></script>
|
|
177
|
-
|
|
178
|
-
<script>
|
|
179
|
-
const config = {
|
|
180
|
-
apiKey: 'your-api-key',
|
|
181
|
-
platformId: 'your-platform-id',
|
|
182
|
-
apiUrl: 'https://api.payloqa.com/v1/payments'
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
const root = ReactDOM.createRoot(document.getElementById('payment-widget'));
|
|
186
|
-
root.render(React.createElement(PayloqaPaymentWidget.PaymentWidget, {
|
|
187
|
-
config: config,
|
|
188
|
-
amount: 1000,
|
|
189
|
-
currency: 'USD',
|
|
190
|
-
onSuccess: (transaction) => console.log('Success:', transaction),
|
|
191
|
-
onError: (error) => console.error('Error:', error)
|
|
192
|
-
}));
|
|
193
|
-
</script>
|
|
194
|
-
</body>
|
|
195
|
-
</html>
|
|
198
|
+
### Error Response
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
{
|
|
202
|
+
message: "Invalid OTP code",
|
|
203
|
+
code: "INVALID_OTP"
|
|
204
|
+
}
|
|
196
205
|
```
|
|
197
206
|
|
|
198
207
|
## ๐ง Development
|
|
@@ -216,160 +225,49 @@ npm run build
|
|
|
216
225
|
|
|
217
226
|
# Type checking
|
|
218
227
|
npm run type-check
|
|
219
|
-
|
|
220
|
-
# Clean build artifacts
|
|
221
|
-
npm run clean
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### Project Structure
|
|
225
|
-
|
|
226
|
-
```
|
|
227
|
-
payment-widget/
|
|
228
|
-
โโโ src/
|
|
229
|
-
โ โโโ components/
|
|
230
|
-
โ โ โโโ PaymentWidget.tsx # Main widget component
|
|
231
|
-
โ โ โโโ PaymentMethodSelector.tsx # Payment method selection
|
|
232
|
-
โ โ โโโ PaymentForm.tsx # Payment form
|
|
233
|
-
โ โ โโโ TransactionStatus.tsx # Transaction status display
|
|
234
|
-
โ โโโ services/
|
|
235
|
-
โ โ โโโ paymentService.ts # API service layer
|
|
236
|
-
โ โโโ types/
|
|
237
|
-
โ โ โโโ payment.ts # TypeScript definitions
|
|
238
|
-
โ โโโ utils/
|
|
239
|
-
โ โ โโโ validation.ts # Validation schemas
|
|
240
|
-
โ โ โโโ index.ts # Utility functions
|
|
241
|
-
โ โโโ styles.css # Global styles
|
|
242
|
-
โ โโโ index.ts # Main entry point
|
|
243
|
-
โโโ dist/ # Build output
|
|
244
|
-
โโโ test.html # HTML test interface
|
|
245
|
-
โโโ package.json
|
|
246
|
-
โโโ README.md
|
|
247
228
|
```
|
|
248
229
|
|
|
249
|
-
## ๐ณ Payment Methods
|
|
250
|
-
|
|
251
|
-
The widget supports multiple payment methods:
|
|
252
|
-
|
|
253
|
-
### Credit/Debit Cards
|
|
254
|
-
- Visa
|
|
255
|
-
- Mastercard
|
|
256
|
-
- American Express
|
|
257
|
-
- Discover
|
|
258
|
-
|
|
259
|
-
### Mobile Money
|
|
260
|
-
- M-Pesa (Kenya)
|
|
261
|
-
- MTN Mobile Money (Ghana)
|
|
262
|
-
- Airtel Money (Multiple countries)
|
|
263
|
-
- Vodafone Cash (Ghana)
|
|
264
|
-
|
|
265
|
-
### Bank Transfers
|
|
266
|
-
- Direct bank transfers
|
|
267
|
-
- ACH payments (US)
|
|
268
|
-
- SEPA transfers (EU)
|
|
269
|
-
|
|
270
|
-
## ๐ Security
|
|
271
|
-
|
|
272
|
-
### PCI Compliance
|
|
273
|
-
|
|
274
|
-
The widget is designed to be PCI-compliant:
|
|
275
|
-
|
|
276
|
-
- **No card data storage** - Card details are never stored locally
|
|
277
|
-
- **Secure transmission** - All data is encrypted in transit
|
|
278
|
-
- **Tokenization** - Sensitive data is tokenized for processing
|
|
279
|
-
|
|
280
|
-
### API Security
|
|
281
|
-
|
|
282
|
-
- All API calls include your API key
|
|
283
|
-
- Request signing for additional security
|
|
284
|
-
- Rate limiting protection
|
|
285
|
-
|
|
286
|
-
## ๐ฑ Mobile Support
|
|
287
|
-
|
|
288
|
-
The widget is fully responsive and optimized for mobile devices:
|
|
289
|
-
|
|
290
|
-
- **Touch-friendly** payment method selection
|
|
291
|
-
- **Mobile-optimized** forms
|
|
292
|
-
- **Responsive** design that adapts to screen size
|
|
293
|
-
- **Native mobile** payment method integration
|
|
294
|
-
|
|
295
|
-
## ๐ Transaction Flow
|
|
296
|
-
|
|
297
|
-
The widget handles the complete payment flow:
|
|
298
|
-
|
|
299
|
-
1. **Payment Method Selection** - User chooses payment method
|
|
300
|
-
2. **Form Display** - Relevant payment form is shown
|
|
301
|
-
3. **Validation** - Real-time form validation
|
|
302
|
-
4. **Processing** - Payment is processed securely
|
|
303
|
-
5. **Status Updates** - Real-time transaction status
|
|
304
|
-
6. **Completion** - Success or error handling
|
|
305
|
-
|
|
306
230
|
## ๐ Troubleshooting
|
|
307
231
|
|
|
308
|
-
###
|
|
232
|
+
### Widget doesn't open
|
|
309
233
|
|
|
310
|
-
|
|
311
|
-
- Check if React and ReactDOM are loaded
|
|
312
|
-
- Verify the widget script is included
|
|
234
|
+
- Ensure `isOpen` prop is set to `true`
|
|
313
235
|
- Check browser console for errors
|
|
236
|
+
- Verify React and ReactDOM are loaded
|
|
314
237
|
|
|
315
|
-
|
|
316
|
-
- Verify your API key has payment permissions
|
|
317
|
-
- Check if payment methods are enabled for your account
|
|
318
|
-
- Ensure you're in a supported region
|
|
238
|
+
### Payment processing fails
|
|
319
239
|
|
|
320
|
-
|
|
321
|
-
- Check
|
|
322
|
-
-
|
|
240
|
+
- Verify your API key and platform ID are correct
|
|
241
|
+
- Check that you have payment access enabled
|
|
242
|
+
- Ensure your account has completed KYC verification
|
|
323
243
|
- Check network connectivity
|
|
324
244
|
- Review error messages in console
|
|
325
245
|
|
|
326
|
-
|
|
327
|
-
- Ensure CSS file is loaded
|
|
328
|
-
- Check for CSS conflicts with your app
|
|
329
|
-
- Verify Tailwind CSS is available
|
|
246
|
+
### OTP not received
|
|
330
247
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
```jsx
|
|
336
|
-
<PaymentWidget
|
|
337
|
-
config={config}
|
|
338
|
-
amount={1000}
|
|
339
|
-
currency="USD"
|
|
340
|
-
onSuccess={handleSuccess}
|
|
341
|
-
onError={handleError}
|
|
342
|
-
debug={true} // Enable debug logging
|
|
343
|
-
/>
|
|
344
|
-
```
|
|
248
|
+
- Verify phone number is correct and in E.164 format
|
|
249
|
+
- Check that the selected network matches the phone number
|
|
250
|
+
- Ensure you have sufficient balance for the transaction
|
|
251
|
+
- Check spam folder for OTP messages
|
|
345
252
|
|
|
346
253
|
## ๐ API Reference
|
|
347
254
|
|
|
348
|
-
###
|
|
255
|
+
### PaymentData
|
|
349
256
|
|
|
350
257
|
```typescript
|
|
351
|
-
interface
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
onSuccess?: (transaction: PaymentTransaction) => void;
|
|
356
|
-
onError?: (error: PaymentError) => void;
|
|
357
|
-
onStatusChange?: (status: PaymentStatus) => void;
|
|
358
|
-
debug?: boolean;
|
|
359
|
-
}
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
### PaymentTransaction
|
|
363
|
-
|
|
364
|
-
```typescript
|
|
365
|
-
interface PaymentTransaction {
|
|
366
|
-
id: string;
|
|
367
|
-
amount: number;
|
|
258
|
+
interface PaymentData {
|
|
259
|
+
payment_id: string;
|
|
260
|
+
status: "pending" | "processing" | "completed" | "failed" | "cancelled" | "expired";
|
|
261
|
+
amount: number | string;
|
|
368
262
|
currency: string;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
263
|
+
payment_method: "mobile_money";
|
|
264
|
+
phone_number?: string;
|
|
265
|
+
network?: "mtn" | "vodafone" | "airteltigo";
|
|
266
|
+
reference?: string;
|
|
267
|
+
created_at: string;
|
|
268
|
+
updated_at: string;
|
|
269
|
+
paid_at?: string;
|
|
270
|
+
metadata?: Record<string, any>;
|
|
373
271
|
}
|
|
374
272
|
```
|
|
375
273
|
|
|
@@ -383,78 +281,12 @@ interface PaymentError {
|
|
|
383
281
|
}
|
|
384
282
|
```
|
|
385
283
|
|
|
386
|
-
### PaymentStatus
|
|
387
|
-
|
|
388
|
-
```typescript
|
|
389
|
-
type PaymentStatus =
|
|
390
|
-
| 'pending' // Payment is being processed
|
|
391
|
-
| 'processing' // Payment is being authorized
|
|
392
|
-
| 'completed' // Payment was successful
|
|
393
|
-
| 'failed' // Payment failed
|
|
394
|
-
| 'cancelled' // Payment was cancelled
|
|
395
|
-
| 'refunded'; // Payment was refunded
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
## ๐ Supported Countries
|
|
399
|
-
|
|
400
|
-
The widget supports payments from multiple countries:
|
|
401
|
-
|
|
402
|
-
### Africa
|
|
403
|
-
- Ghana
|
|
404
|
-
- Kenya
|
|
405
|
-
- Nigeria
|
|
406
|
-
- South Africa
|
|
407
|
-
- Uganda
|
|
408
|
-
- Tanzania
|
|
409
|
-
|
|
410
|
-
### Europe
|
|
411
|
-
- United Kingdom
|
|
412
|
-
- Germany
|
|
413
|
-
- France
|
|
414
|
-
- Netherlands
|
|
415
|
-
- Spain
|
|
416
|
-
- Italy
|
|
417
|
-
|
|
418
|
-
### Americas
|
|
419
|
-
- United States
|
|
420
|
-
- Canada
|
|
421
|
-
- Brazil
|
|
422
|
-
- Mexico
|
|
423
|
-
|
|
424
|
-
### Asia
|
|
425
|
-
- India
|
|
426
|
-
- Singapore
|
|
427
|
-
- Malaysia
|
|
428
|
-
- Philippines
|
|
429
|
-
|
|
430
|
-
## ๐ฐ Pricing
|
|
431
|
-
|
|
432
|
-
The widget is free to use. Transaction fees apply based on your Payloqa account:
|
|
433
|
-
|
|
434
|
-
- **Credit/Debit Cards**: 2.9% + $0.30
|
|
435
|
-
- **Mobile Money**: 1.5% + $0.10
|
|
436
|
-
- **Bank Transfers**: 0.5% + $0.10
|
|
437
|
-
|
|
438
|
-
*Fees may vary by region and payment method*
|
|
439
|
-
|
|
440
|
-
## ๐ค Contributing
|
|
441
|
-
|
|
442
|
-
1. Fork the repository
|
|
443
|
-
2. Create a feature branch
|
|
444
|
-
3. Make your changes
|
|
445
|
-
4. Add tests if applicable
|
|
446
|
-
5. Submit a pull request
|
|
447
|
-
|
|
448
|
-
## ๐ License
|
|
449
|
-
|
|
450
|
-
MIT License - see [LICENSE](../../LICENSE) for details.
|
|
451
|
-
|
|
452
284
|
## ๐ Support
|
|
453
285
|
|
|
454
286
|
- ๐ง Email: support@payloqa.com
|
|
455
|
-
- ๐ Documentation: [docs.payloqa.com](https://
|
|
287
|
+
- ๐ Documentation: [docs.payloqa.com](https://payloqa.com/developer-docs)
|
|
456
288
|
- ๐ Issues: [GitHub Issues](https://github.com/kobbycoder/payloqa-widgets/issues)
|
|
457
289
|
|
|
458
290
|
---
|
|
459
291
|
|
|
460
|
-
Built with โค๏ธ by the Payloqa Team
|
|
292
|
+
Built with โค๏ธ by the Payloqa Team
|