You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5a6cb29
Browse filesBrowse the repository at this point in the historyBrowse files
Use your Test Secret Key (`sk_test_...`) for development and Live Secret Key (`sk_live_...`) in production. Get them from your [Paystack Dashboard](https://dashboard.paystack.com/#/login).
46
+
37
47
---
38
48
39
49
## Quick Start
40
50
51
+
Initialize a transaction and send the customer to `authorization_url` to pay:
52
+
41
53
```ruby
42
54
require"paystack"
43
55
@@ -53,19 +65,16 @@ result = paystack.transaction.initialize(
53
65
puts result.data[:authorization_url]
54
66
```
55
67
56
-
---
57
-
58
-
## Configuration
59
-
60
-
Initialize `Paystack::Client` with your secret key:
68
+
Once the customer is redirected back, verify the transaction before you treat it as paid; never trust the redirect alone:
If you need to branch on failure type, rescue the specific subclass instead — `Paystack::AuthenticationError`, `ValidationError`, `NotFoundError`, `RateLimitError`, or `ServerError`:
0 commit comments