From 48d2116aae1f1219ea12569e75ee152f64189daa Mon Sep 17 00:00:00 2001 From: andrew-paystack Date: Tue, 19 Aug 2025 18:36:27 +0300 Subject: [PATCH 1/4] remove unsupported provider --- src/doc/payments/payment-methods/qr-event/index.json | 6 +++--- src/doc/payments/payment-methods/qr/index.js | 6 +++--- src/doc/payments/payment-methods/qr/index.php | 6 +++--- src/doc/payments/payment-methods/qr/index.sh | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/doc/payments/payment-methods/qr-event/index.json b/src/doc/payments/payment-methods/qr-event/index.json index f180a48..c32e888 100644 --- a/src/doc/payments/payment-methods/qr-event/index.json +++ b/src/doc/payments/payment-methods/qr-event/index.json @@ -11,7 +11,7 @@ "paid_at": "2018-12-05T15:58:45.000Z", "created_at": "2018-12-05T15:58:02.000Z", "channel": "qr", - "currency": "NGN", + "currency": "ZAR", "ip_address": "18.130.45.28, 141.101.107.157", "metadata": "", "log": null, @@ -25,8 +25,8 @@ "exp_year": "2018", "channel": "qr", "card_type": "DEBIT", - "bank": "Visa QR", - "country_code": "NG", + "bank": "Nedbank QR", + "country_code": "ZA", "brand": "VISA", "reusable": false, "signature": null, diff --git a/src/doc/payments/payment-methods/qr/index.js b/src/doc/payments/payment-methods/qr/index.js index a4517ca..7c1c1da 100644 --- a/src/doc/payments/payment-methods/qr/index.js +++ b/src/doc/payments/payment-methods/qr/index.js @@ -1,11 +1,11 @@ const https = require('https') const params = JSON.stringify({ - "amount": 100, + "amount": 1000, "email": "customer@email.com", - "currency": "NGN", + "currency": "ZAR", "qr": { - "provider" : "visa" + "provider" : "scan-to-pay" } }) diff --git a/src/doc/payments/payment-methods/qr/index.php b/src/doc/payments/payment-methods/qr/index.php index c627203..16cc823 100644 --- a/src/doc/payments/payment-methods/qr/index.php +++ b/src/doc/payments/payment-methods/qr/index.php @@ -9,11 +9,11 @@ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => [ - "amount" => 100, + "amount" => 1000, "email" => "customer@email.com", - "currency" => "NGN", + "currency" => "ZAR", "qr" => [ - "provider" => "visa" + "provider" => "scan-to-pay" ] ], CURLOPT_HTTPHEADER => array( diff --git a/src/doc/payments/payment-methods/qr/index.sh b/src/doc/payments/payment-methods/qr/index.sh index a370bfb..7b221a0 100644 --- a/src/doc/payments/payment-methods/qr/index.sh +++ b/src/doc/payments/payment-methods/qr/index.sh @@ -1,11 +1,11 @@ curl https://api.paystack.co/charge -H "Authorization: Bearer YOUR_SECRET_KEY" -H "Content-Type: application/json" --d '{ "amount": 100, +-d '{ "amount": 1000, "email": "customer@email.com", - "currency": "NGN", + "currency": "ZAR", "qr": { - "provider" : "visa" + "provider" : "scan-to-pay" } }' -X POST \ No newline at end of file From 3af15b42d5911ebb5e68bb933a10f7e944135844 Mon Sep 17 00:00:00 2001 From: andrew-paystack Date: Tue, 19 Aug 2025 18:36:57 +0300 Subject: [PATCH 2/4] build changes --- dist/doc/payments/payment-methods/qr-event.js | 6 +++--- dist/doc/payments/payment-methods/qr.js | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dist/doc/payments/payment-methods/qr-event.js b/dist/doc/payments/payment-methods/qr-event.js index 26e5574..50d8fc8 100644 --- a/dist/doc/payments/payment-methods/qr-event.js +++ b/dist/doc/payments/payment-methods/qr-event.js @@ -11,7 +11,7 @@ const json = `{ "paid_at": "2018-12-05T15:58:45.000Z", "created_at": "2018-12-05T15:58:02.000Z", "channel": "qr", - "currency": "NGN", + "currency": "ZAR", "ip_address": "18.130.45.28, 141.101.107.157", "metadata": "", "log": null, @@ -25,8 +25,8 @@ const json = `{ "exp_year": "2018", "channel": "qr", "card_type": "DEBIT", - "bank": "Visa QR", - "country_code": "NG", + "bank": "Nedbank QR", + "country_code": "ZA", "brand": "VISA", "reusable": false, "signature": null, diff --git a/dist/doc/payments/payment-methods/qr.js b/dist/doc/payments/payment-methods/qr.js index 654a1b8..a85ce67 100644 --- a/dist/doc/payments/payment-methods/qr.js +++ b/dist/doc/payments/payment-methods/qr.js @@ -1,11 +1,11 @@ const sh = `curl https://api.paystack.co/charge -H "Authorization: Bearer YOUR_SECRET_KEY" -H "Content-Type: application/json" --d '{ "amount": 100, +-d '{ "amount": 1000, "email": "customer@email.com", - "currency": "NGN", + "currency": "ZAR", "qr": { - "provider" : "visa" + "provider" : "scan-to-pay" } }' -X POST` @@ -13,11 +13,11 @@ const sh = `curl https://api.paystack.co/charge const js = `const https = require('https') const params = JSON.stringify({ - "amount": 100, + "amount": 1000, "email": "customer@email.com", - "currency": "NGN", + "currency": "ZAR", "qr": { - "provider" : "visa" + "provider" : "scan-to-pay" } }) @@ -60,11 +60,11 @@ curl_setopt_array($curl, array( CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => [ - "amount" => 100, + "amount" => 1000, "email" => "customer@email.com", - "currency" => "NGN", + "currency" => "ZAR", "qr" => [ - "provider" => "visa" + "provider" => "scan-to-pay" ] ], CURLOPT_HTTPHEADER => array( From 1a9bc9a5f12987986e9699a374e4ae2e90229cdb Mon Sep 17 00:00:00 2001 From: andrew-paystack Date: Wed, 20 Aug 2025 15:57:19 +0300 Subject: [PATCH 3/4] update webhook payload --- .../payment-methods/qr-event/index.json | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/doc/payments/payment-methods/qr-event/index.json b/src/doc/payments/payment-methods/qr-event/index.json index c32e888..03b7a5a 100644 --- a/src/doc/payments/payment-methods/qr-event/index.json +++ b/src/doc/payments/payment-methods/qr-event/index.json @@ -5,36 +5,43 @@ "domain": "test", "status": "success", "reference": "48rx32f1womvcr4", - "amount": 10000, + "amount": 186677, "message": "madePayment", "gateway_response": "Payment successful", - "paid_at": "2018-12-05T15:58:45.000Z", - "created_at": "2018-12-05T15:58:02.000Z", + "paid_at": "2024-08-20T12:41:12.000Z", + "created_at": "2024-08-20T12:39:22.000Z", "channel": "qr", "currency": "ZAR", "ip_address": "18.130.45.28, 141.101.107.157", + "fees_breakdown": { + "amount": "5514", + "formula": null, + "type": "paystack" + }, "metadata": "", "log": null, - "fees": null, + "fees": 6342, "fees_split": null, "authorization": { "authorization_code": "AUTH_2b4zs69fgy7qflh", "bin": "483953", "last4": "6208", "exp_month": "12", - "exp_year": "2018", + "exp_year": "2025", "channel": "qr", - "card_type": "DEBIT", - "bank": "Nedbank QR", + "card_type": "CREDIT", + "bank": "ABSA BANK LIMITED, SOUTH AFRICA", "country_code": "ZA", "brand": "VISA", "reusable": false, "signature": null, - "account_name": "BoJack Horseman" + "account_name": null, + "receiver_bank_account_number": null, + "receiver_bank": null }, "customer": { "id": 16787, - "first_name": "I", + "first_name": "Ian", "last_name": "SURRENDER", "email": "customer@email.com", "customer_code": "CUS_ehg851zbxon0bvx", @@ -45,6 +52,6 @@ "plan": {}, "subaccount": {}, "subaccount_group": {}, - "paidAt": "2018-12-05T15:58:45.000Z" + "paidAt": "2024-08-20T12:41:12.000Z" } } \ No newline at end of file From f26572252a5074a0d6397bb9da553e56ebf7e7f1 Mon Sep 17 00:00:00 2001 From: andrew-paystack Date: Wed, 20 Aug 2025 16:06:28 +0300 Subject: [PATCH 4/4] build event --- dist/doc/payments/payment-methods/qr-event.js | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/dist/doc/payments/payment-methods/qr-event.js b/dist/doc/payments/payment-methods/qr-event.js index 50d8fc8..04d05f7 100644 --- a/dist/doc/payments/payment-methods/qr-event.js +++ b/dist/doc/payments/payment-methods/qr-event.js @@ -5,36 +5,43 @@ const json = `{ "domain": "test", "status": "success", "reference": "48rx32f1womvcr4", - "amount": 10000, + "amount": 186677, "message": "madePayment", "gateway_response": "Payment successful", - "paid_at": "2018-12-05T15:58:45.000Z", - "created_at": "2018-12-05T15:58:02.000Z", + "paid_at": "2024-08-20T12:41:12.000Z", + "created_at": "2024-08-20T12:39:22.000Z", "channel": "qr", "currency": "ZAR", "ip_address": "18.130.45.28, 141.101.107.157", + "fees_breakdown": { + "amount": "5514", + "formula": null, + "type": "paystack" + }, "metadata": "", "log": null, - "fees": null, + "fees": 6342, "fees_split": null, "authorization": { "authorization_code": "AUTH_2b4zs69fgy7qflh", "bin": "483953", "last4": "6208", "exp_month": "12", - "exp_year": "2018", + "exp_year": "2025", "channel": "qr", - "card_type": "DEBIT", - "bank": "Nedbank QR", + "card_type": "CREDIT", + "bank": "ABSA BANK LIMITED, SOUTH AFRICA", "country_code": "ZA", "brand": "VISA", "reusable": false, "signature": null, - "account_name": "BoJack Horseman" + "account_name": null, + "receiver_bank_account_number": null, + "receiver_bank": null }, "customer": { "id": 16787, - "first_name": "I", + "first_name": "Ian", "last_name": "SURRENDER", "email": "customer@email.com", "customer_code": "CUS_ehg851zbxon0bvx", @@ -45,7 +52,7 @@ const json = `{ "plan": {}, "subaccount": {}, "subaccount_group": {}, - "paidAt": "2018-12-05T15:58:45.000Z" + "paidAt": "2024-08-20T12:41:12.000Z" } }`