@payloqa/payment-widget 1.0.0 โ 1.0.1
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 +172 -339
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,198 +1,208 @@
|
|
|
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
|
+
- Create an account
|
|
22
|
+
- Go to the **API Keys** page
|
|
23
|
+
- Request payment access by filling out the KYC form
|
|
24
|
+
- Once approved, you'll be notified and can access:
|
|
25
|
+
- Your **API Key**
|
|
26
|
+
- Your **Platform ID**
|
|
27
|
+
|
|
28
|
+
### 2. Install the Package
|
|
19
29
|
|
|
20
30
|
```bash
|
|
21
31
|
npm install @payloqa/payment-widget
|
|
22
32
|
```
|
|
23
33
|
|
|
24
|
-
###
|
|
34
|
+
### 3. Import and Use
|
|
25
35
|
|
|
26
36
|
```jsx
|
|
27
|
-
import { PaymentWidget } from
|
|
37
|
+
import { PaymentWidget } from "@payloqa/payment-widget";
|
|
38
|
+
import "@payloqa/payment-widget/dist/payment-widget.css";
|
|
28
39
|
|
|
29
40
|
function App() {
|
|
41
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
42
|
+
|
|
30
43
|
const config = {
|
|
31
|
-
apiKey:
|
|
32
|
-
platformId:
|
|
33
|
-
|
|
44
|
+
apiKey: "your-api-key",
|
|
45
|
+
platformId: "your-platform-id",
|
|
46
|
+
amount: 10.00,
|
|
47
|
+
currency: "GHS", // Optional, defaults to "GHS"
|
|
48
|
+
primaryColor: "#3B82F6", // Optional, your brand color
|
|
49
|
+
displayMode: "modal", // "modal" | "inline" | "fullpage"
|
|
50
|
+
redirect_url: "https://yoursite.com/callback", // Required
|
|
51
|
+
webhookUrl: "https://yoursite.com/webhook", // Required
|
|
52
|
+
orderId: "order-123", // Optional
|
|
53
|
+
metadata: { // Optional
|
|
54
|
+
customField: "value",
|
|
55
|
+
},
|
|
34
56
|
};
|
|
35
57
|
|
|
36
|
-
const handleSuccess = (
|
|
37
|
-
console.log(
|
|
38
|
-
console.log(
|
|
39
|
-
console.log(
|
|
58
|
+
const handleSuccess = (payment) => {
|
|
59
|
+
console.log("Payment successful!", payment);
|
|
60
|
+
console.log("Payment ID:", payment.payment_id);
|
|
61
|
+
console.log("Status:", payment.status);
|
|
62
|
+
console.log("Amount:", payment.amount);
|
|
40
63
|
};
|
|
41
64
|
|
|
42
65
|
const handleError = (error) => {
|
|
43
|
-
console.error(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const handleStatusChange = (status) => {
|
|
47
|
-
console.log('Payment status:', status);
|
|
66
|
+
console.error("Payment failed:", error.message);
|
|
67
|
+
alert(`Error: ${error.message}`);
|
|
48
68
|
};
|
|
49
69
|
|
|
50
70
|
return (
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
71
|
+
<div>
|
|
72
|
+
<button onClick={() => setIsOpen(true)}>Pay Now</button>
|
|
73
|
+
|
|
74
|
+
<PaymentWidget
|
|
75
|
+
config={config}
|
|
76
|
+
isOpen={isOpen}
|
|
77
|
+
onClose={() => setIsOpen(false)}
|
|
78
|
+
onSuccess={handleSuccess}
|
|
79
|
+
onError={handleError}
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
59
82
|
);
|
|
60
83
|
}
|
|
61
84
|
```
|
|
62
85
|
|
|
63
86
|
## โ๏ธ Configuration
|
|
64
87
|
|
|
65
|
-
###
|
|
88
|
+
### Required Configuration
|
|
66
89
|
|
|
67
90
|
```typescript
|
|
68
91
|
interface PaymentWidgetConfig {
|
|
69
|
-
apiKey: string;
|
|
70
|
-
platformId: string;
|
|
71
|
-
|
|
92
|
+
apiKey: string; // Your Payloqa API key
|
|
93
|
+
platformId: string; // Your platform ID
|
|
94
|
+
amount: number; // Payment amount (e.g., 10.00)
|
|
95
|
+
currency?: string; // Currency code (default: "GHS")
|
|
96
|
+
displayMode?: string; // "modal" | "inline" | "fullpage" (default: "modal")
|
|
97
|
+
primaryColor?: string; // Your brand color in hex (e.g., "#3B82F6")
|
|
98
|
+
logoUrl?: string; // Optional logo URL to display in header
|
|
99
|
+
redirect_url: string; // Required: HTTPS URL for redirect after payment
|
|
100
|
+
webhookUrl: string; // Required: Webhook URL for server notifications
|
|
101
|
+
orderId?: string; // Optional order identifier
|
|
102
|
+
metadata?: object; // Optional metadata object
|
|
103
|
+
onSuccess?: (payment: PaymentData) => void;
|
|
104
|
+
onError?: (error: PaymentError) => void;
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### PaymentWidget Props
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
interface PaymentWidgetProps {
|
|
112
|
+
config: PaymentWidgetConfig;
|
|
113
|
+
isOpen: boolean; // Controls widget visibility
|
|
114
|
+
onClose?: () => void; // Called when widget is closed
|
|
72
115
|
}
|
|
73
116
|
```
|
|
74
117
|
|
|
75
118
|
### Callbacks
|
|
76
119
|
|
|
77
120
|
```typescript
|
|
78
|
-
// Success callback
|
|
79
|
-
onSuccess: (
|
|
121
|
+
// Success callback - called when payment succeeds
|
|
122
|
+
onSuccess: (payment: PaymentData) => void
|
|
80
123
|
|
|
81
|
-
// Error callback
|
|
124
|
+
// Error callback - called when payment fails
|
|
82
125
|
onError: (error: PaymentError) => void
|
|
83
126
|
|
|
84
|
-
//
|
|
85
|
-
|
|
127
|
+
// Close callback - called when widget is closed
|
|
128
|
+
onClose: () => void
|
|
86
129
|
```
|
|
87
130
|
|
|
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
|
-
}
|
|
131
|
+
## ๐ฑ Display Modes
|
|
104
132
|
|
|
105
|
-
|
|
106
|
-
@apply border-2 border-gray-300 rounded-lg p-4;
|
|
107
|
-
}
|
|
133
|
+
The widget supports three display modes:
|
|
108
134
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
135
|
+
### Modal (Default)
|
|
136
|
+
```jsx
|
|
137
|
+
<PaymentWidget
|
|
138
|
+
config={{ ...config, displayMode: "modal" }}
|
|
139
|
+
isOpen={isOpen}
|
|
140
|
+
onClose={() => setIsOpen(false)}
|
|
141
|
+
/>
|
|
112
142
|
```
|
|
143
|
+
Displays as a centered modal overlay with backdrop.
|
|
113
144
|
|
|
114
|
-
|
|
145
|
+
### Inline
|
|
146
|
+
```jsx
|
|
147
|
+
<PaymentWidget
|
|
148
|
+
config={{ ...config, displayMode: "inline" }}
|
|
149
|
+
isOpen={isOpen}
|
|
150
|
+
onClose={() => setIsOpen(false)}
|
|
151
|
+
/>
|
|
152
|
+
```
|
|
153
|
+
Displays inline within your page layout.
|
|
115
154
|
|
|
116
|
-
###
|
|
155
|
+
### Fullpage
|
|
156
|
+
```jsx
|
|
157
|
+
<PaymentWidget
|
|
158
|
+
config={{ ...config, displayMode: "fullpage" }}
|
|
159
|
+
isOpen={isOpen}
|
|
160
|
+
onClose={() => setIsOpen(false)}
|
|
161
|
+
/>
|
|
162
|
+
```
|
|
163
|
+
Displays as a full-page experience.
|
|
117
164
|
|
|
118
|
-
|
|
165
|
+
## ๐ณ Supported Networks
|
|
119
166
|
|
|
120
|
-
|
|
121
|
-
# Open the test interface
|
|
122
|
-
open test.html
|
|
123
|
-
```
|
|
167
|
+
The widget supports mobile money payments for:
|
|
124
168
|
|
|
125
|
-
**
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
- โ
Form validation testing
|
|
129
|
-
- โ
Transaction processing simulation
|
|
130
|
-
- โ
Mobile responsiveness testing
|
|
131
|
-
- โ
Error scenario simulation
|
|
132
|
-
- โ
Real-time logging
|
|
169
|
+
- **MTN** - MTN Mobile Money
|
|
170
|
+
- **Telecel** - Telecel Cash (formerly Vodafone)
|
|
171
|
+
- **AirtelTigo** - AirtelTigo Money
|
|
133
172
|
|
|
134
|
-
|
|
173
|
+
## ๐ Payment Flow
|
|
135
174
|
|
|
136
|
-
|
|
175
|
+
1. **Phone Input** - User enters phone number and selects network
|
|
176
|
+
2. **OTP Verification** - User receives and enters 4-digit OTP code
|
|
177
|
+
3. **Processing** - Payment is processed and status is polled
|
|
178
|
+
4. **Completion** - Success or error screen is shown
|
|
137
179
|
|
|
138
|
-
|
|
139
|
-
# Next.js
|
|
140
|
-
npx create-next-app@latest my-app
|
|
141
|
-
cd my-app
|
|
142
|
-
npm install @payloqa/payment-widget
|
|
180
|
+
## ๐ Sample Responses
|
|
143
181
|
|
|
144
|
-
|
|
145
|
-
npx create-react-app my-app
|
|
146
|
-
cd my-app
|
|
147
|
-
npm install @payloqa/payment-widget
|
|
182
|
+
### Success Response
|
|
148
183
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
184
|
+
```typescript
|
|
185
|
+
{
|
|
186
|
+
payment_id: "pay_abc123",
|
|
187
|
+
status: "completed",
|
|
188
|
+
amount: 10.00,
|
|
189
|
+
currency: "GHS",
|
|
190
|
+
payment_method: "mobile_money",
|
|
191
|
+
phone_number: "+233XXXXXXXXX",
|
|
192
|
+
network: "mtn",
|
|
193
|
+
created_at: "2024-01-24T12:00:00Z",
|
|
194
|
+
updated_at: "2024-01-24T12:01:00Z",
|
|
195
|
+
paid_at: "2024-01-24T12:01:00Z"
|
|
196
|
+
}
|
|
153
197
|
```
|
|
154
198
|
|
|
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>
|
|
199
|
+
### Error Response
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
{
|
|
203
|
+
message: "Invalid OTP code",
|
|
204
|
+
code: "INVALID_OTP"
|
|
205
|
+
}
|
|
196
206
|
```
|
|
197
207
|
|
|
198
208
|
## ๐ง Development
|
|
@@ -216,160 +226,49 @@ npm run build
|
|
|
216
226
|
|
|
217
227
|
# Type checking
|
|
218
228
|
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
229
|
```
|
|
248
230
|
|
|
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
231
|
## ๐ Troubleshooting
|
|
307
232
|
|
|
308
|
-
###
|
|
233
|
+
### Widget doesn't open
|
|
309
234
|
|
|
310
|
-
|
|
311
|
-
- Check if React and ReactDOM are loaded
|
|
312
|
-
- Verify the widget script is included
|
|
235
|
+
- Ensure `isOpen` prop is set to `true`
|
|
313
236
|
- Check browser console for errors
|
|
237
|
+
- Verify React and ReactDOM are loaded
|
|
314
238
|
|
|
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
|
|
239
|
+
### Payment processing fails
|
|
319
240
|
|
|
320
|
-
|
|
321
|
-
- Check
|
|
322
|
-
-
|
|
241
|
+
- Verify your API key and platform ID are correct
|
|
242
|
+
- Check that you have payment access enabled
|
|
243
|
+
- Ensure your account has completed KYC verification
|
|
323
244
|
- Check network connectivity
|
|
324
245
|
- Review error messages in console
|
|
325
246
|
|
|
326
|
-
|
|
327
|
-
- Ensure CSS file is loaded
|
|
328
|
-
- Check for CSS conflicts with your app
|
|
329
|
-
- Verify Tailwind CSS is available
|
|
247
|
+
### OTP not received
|
|
330
248
|
|
|
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
|
-
```
|
|
249
|
+
- Verify phone number is correct and in E.164 format
|
|
250
|
+
- Check that the selected network matches the phone number
|
|
251
|
+
- Ensure you have sufficient balance for the transaction
|
|
252
|
+
- Check spam folder for OTP messages
|
|
345
253
|
|
|
346
254
|
## ๐ API Reference
|
|
347
255
|
|
|
348
|
-
###
|
|
256
|
+
### PaymentData
|
|
349
257
|
|
|
350
258
|
```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;
|
|
259
|
+
interface PaymentData {
|
|
260
|
+
payment_id: string;
|
|
261
|
+
status: "pending" | "processing" | "completed" | "failed" | "cancelled" | "expired";
|
|
262
|
+
amount: number | string;
|
|
368
263
|
currency: string;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
264
|
+
payment_method: "mobile_money";
|
|
265
|
+
phone_number?: string;
|
|
266
|
+
network?: "mtn" | "vodafone" | "airteltigo";
|
|
267
|
+
reference?: string;
|
|
268
|
+
created_at: string;
|
|
269
|
+
updated_at: string;
|
|
270
|
+
paid_at?: string;
|
|
271
|
+
metadata?: Record<string, any>;
|
|
373
272
|
}
|
|
374
273
|
```
|
|
375
274
|
|
|
@@ -383,78 +282,12 @@ interface PaymentError {
|
|
|
383
282
|
}
|
|
384
283
|
```
|
|
385
284
|
|
|
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
285
|
## ๐ Support
|
|
453
286
|
|
|
454
287
|
- ๐ง Email: support@payloqa.com
|
|
455
|
-
- ๐ Documentation: [docs.payloqa.com](https://
|
|
288
|
+
- ๐ Documentation: [docs.payloqa.com](https://payloqa.com/developer-docs)
|
|
456
289
|
- ๐ Issues: [GitHub Issues](https://github.com/kobbycoder/payloqa-widgets/issues)
|
|
457
290
|
|
|
458
291
|
---
|
|
459
292
|
|
|
460
|
-
Built with โค๏ธ by the Payloqa Team
|
|
293
|
+
Built with โค๏ธ by the Payloqa Team
|