Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/api/charges/create/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ data='{
]
},
"bank": {
code: "057",
account_number: "0000000000"
"code": "057",
"account_number": "0000000000"
},
"birthday": "1995-12-23"
}'
Expand Down
2 changes: 1 addition & 1 deletion dist/api/customers/create/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ url="https://api.paystack.co/customer"
authorization="Authorization: Bearer YOUR_SECRET_KEY"
content_type="Content-Type: application/json"
data='{
"email": "zero@sum.com",
"email": "customer@example.com",
"first_name": "Zero",
"last_name": "Sum",
"phone": "+2348123456789"
Expand Down
4 changes: 3 additions & 1 deletion dist/api/plans/update/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ const sh = `#!/bin/sh
url="https://api.paystack.co/plan/:id_or_code"
authorization="Authorization: Bearer YOUR_SECRET_KEY"
content_type="Content-Type: application/json"
data='{ "name": "Monthly retainer (renamed)" }'
data='{
"name": "Monthly retainer (renamed)"
}'
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X PUT`

Expand Down
3 changes: 2 additions & 1 deletion dist/api/products/create/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ const sh = `#!/bin/sh
url="https://api.paystack.co/product"
authorization="Authorization: Bearer YOUR_SECRET_KEY"
content_type="Content-Type: application/json"
data='{ "name": "Puff Puff",
data='{
"name": "Puff Puff",
"description": "Crispy flour ball with fluffy interior",
"price": "5000",
"currency": "NGN",
Expand Down
2 changes: 1 addition & 1 deletion dist/api/terminal/update/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ url="https://api.paystack.co/terminal/{terminal_id}"
authorization="Authorization: Bearer YOUR_SECRET_KEY"
content_type="Content-Type: application/json"
data='{
"address": "Somewhere on earth
"address": "Somewhere on earth"
}'
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X PUT`
Expand Down
3 changes: 2 additions & 1 deletion dist/api/transfers/initiate/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ content_type="Content-Type: application/json"
data='{
"source": "balance",
"reason": "Calm down",
"amount":3794800, "recipient": "RCP_gx2wn530m0i3w3m"
"amount":3794800,
"recipient": "RCP_gx2wn530m0i3w3m"
}'
curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X POST`
Expand Down
65 changes: 34 additions & 31 deletions dist/doc/transfers/single/transfer-recipient-mpesa.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ const sh = `#!/bin/sh
curl https://api.paystack.co/transferrecipient
-H "Authorization: Bearer YOUR_SECRET_KEY"
-H "Content-Type: application/json"
-d '{ "type": "mobile_money",
"name": "Andrew Jones",
"account_number": "0751234987",
"bank_code": "MPESA",
-d '{ "type": "mobile_money_business",
"name": "Till Transfer",
"bank_code": "MPTILL",
"account_number": "247247",
"currency": "KES"
}'
-X POST`

const js = `const https = require('https')

const params = JSON.stringify({
"type":"mobile_money",
"name" : "Andrew Jones",
"account_number": "0751234987",
"bank_code": "MPESA",
"type": "mobile_money_business",
"name": "Till Transfer",
"bank_code": "MPTILL",
"account_number": "247247",
"currency": "KES"
})

Expand Down Expand Up @@ -52,11 +52,11 @@ const php = `<?php
$url = "https://api.paystack.co/transferrecipient";

$fields = [
'type' => "mobile_money",
'name' => "Andrew Jones",
'account_number' => "0751234987",
'bank_code' => "MPESA",
'currency' => "KES"
"type" => "mobile_money_business",
"name" => "Till Transfer",
"bank_code" => "MPTILL",
"account_number" => "247247",
"currency" => "KES"
];

$fields_string = http_build_query($fields);
Expand Down Expand Up @@ -86,24 +86,27 @@ const json = `{
"message": "Transfer recipient created successfully",
"data": {
"active": true,
"createdAt": "2023-07-04T09:24:41.473Z",
"currency": "KES",
"domain": "test",
"id": 56462048,
"integration": 845995,
"name": "Andrew Jones",
"recipient_code": "RCP_7awxjfhopevkpxm",
"type": "mobile_money",
"updatedAt": "2023-07-04T09:24:41.473Z",
"is_deleted": false,
"isDeleted": false,
"details": {
"authorization_code": null,
"account_number": "0751234987",
"account_name": null,
"bank_code": "MPESA",
"bank_name": "M-PESA"
}
"createdAt": "2024-11-28T09:28:50.000Z",
"currency": "KES",
"description": null,
"domain": "test",
"email": null,
"id": 92176030,
"integration": 845995,
"metadata": null,
"name": "Till Transfer",
"recipient_code": "RCP_5vl8b2yma7xdnjp",
"type": "mobile_money_business",
"updatedAt": "2024-11-28T09:28:50.000Z",
"is_deleted": false,
"isDeleted": false,
"details": {
"authorization_code": null,
"account_number": "247247",
"account_name": null,
"bank_code": "MPTILL",
"bank_name": "M-PESA Till"
}
}
}
`
Expand Down
4 changes: 2 additions & 2 deletions src/api/charges/create/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ data='{
]
},
"bank": {
code: "057",
account_number: "0000000000"
"code": "057",
"account_number": "0000000000"
},
"birthday": "1995-12-23"
}'
Expand Down
2 changes: 1 addition & 1 deletion src/api/customers/create/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ url="https://api.paystack.co/customer"
authorization="Authorization: Bearer YOUR_SECRET_KEY"
content_type="Content-Type: application/json"
data='{
"email": "zero@sum.com",
"email": "customer@example.com",
"first_name": "Zero",
"last_name": "Sum",
"phone": "+2348123456789"
Expand Down
4 changes: 3 additions & 1 deletion src/api/plans/update/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
url="https://api.paystack.co/plan/:id_or_code"
authorization="Authorization: Bearer YOUR_SECRET_KEY"
content_type="Content-Type: application/json"
data='{ "name": "Monthly retainer (renamed)" }'
data='{
"name": "Monthly retainer (renamed)"
}'

curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X PUT
3 changes: 2 additions & 1 deletion src/api/products/create/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
url="https://api.paystack.co/product"
authorization="Authorization: Bearer YOUR_SECRET_KEY"
content_type="Content-Type: application/json"
data='{ "name": "Puff Puff",
data='{
"name": "Puff Puff",
"description": "Crispy flour ball with fluffy interior",
"price": "5000",
"currency": "NGN",
Expand Down
2 changes: 1 addition & 1 deletion src/api/terminal/update/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ url="https://api.paystack.co/terminal/{terminal_id}"
authorization="Authorization: Bearer YOUR_SECRET_KEY"
content_type="Content-Type: application/json"
data='{
"address": "Somewhere on earth
"address": "Somewhere on earth"
}'

curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X PUT
3 changes: 2 additions & 1 deletion src/api/transfers/initiate/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ content_type="Content-Type: application/json"
data='{
"source": "balance",
"reason": "Calm down",
"amount":3794800, "recipient": "RCP_gx2wn530m0i3w3m"
"amount":3794800,
"recipient": "RCP_gx2wn530m0i3w3m"
}'

curl "$url" -H "$authorization" -H "$content_type" -d "$data" -X POST
8 changes: 4 additions & 4 deletions src/doc/transfers/single/transfer-recipient-mpesa/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const https = require('https')

const params = JSON.stringify({
"type":"mobile_money",
"name" : "Andrew Jones",
"account_number": "0751234987",
"bank_code": "MPESA",
"type": "mobile_money_business",
"name": "Till Transfer",
"bank_code": "MPTILL",
"account_number": "247247",
"currency": "KES"
})

Expand Down
39 changes: 21 additions & 18 deletions src/doc/transfers/single/transfer-recipient-mpesa/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@
"message": "Transfer recipient created successfully",
"data": {
"active": true,
"createdAt": "2023-07-04T09:24:41.473Z",
"currency": "KES",
"domain": "test",
"id": 56462048,
"integration": 845995,
"name": "Andrew Jones",
"recipient_code": "RCP_7awxjfhopevkpxm",
"type": "mobile_money",
"updatedAt": "2023-07-04T09:24:41.473Z",
"is_deleted": false,
"isDeleted": false,
"details": {
"authorization_code": null,
"account_number": "0751234987",
"account_name": null,
"bank_code": "MPESA",
"bank_name": "M-PESA"
}
"createdAt": "2024-11-28T09:28:50.000Z",
"currency": "KES",
"description": null,
"domain": "test",
"email": null,
"id": 92176030,
"integration": 845995,
"metadata": null,
"name": "Till Transfer",
"recipient_code": "RCP_5vl8b2yma7xdnjp",
"type": "mobile_money_business",
"updatedAt": "2024-11-28T09:28:50.000Z",
"is_deleted": false,
"isDeleted": false,
"details": {
"authorization_code": null,
"account_number": "247247",
"account_name": null,
"bank_code": "MPTILL",
"bank_name": "M-PESA Till"
}
}
}
10 changes: 5 additions & 5 deletions src/doc/transfers/single/transfer-recipient-mpesa/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
$url = "https://api.paystack.co/transferrecipient";

$fields = [
'type' => "mobile_money",
'name' => "Andrew Jones",
'account_number' => "0751234987",
'bank_code' => "MPESA",
'currency' => "KES"
"type" => "mobile_money_business",
"name" => "Till Transfer",
"bank_code" => "MPTILL",
"account_number" => "247247",
"currency" => "KES"
];

$fields_string = http_build_query($fields);
Expand Down
8 changes: 4 additions & 4 deletions src/doc/transfers/single/transfer-recipient-mpesa/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
curl https://api.paystack.co/transferrecipient
-H "Authorization: Bearer YOUR_SECRET_KEY"
-H "Content-Type: application/json"
-d '{ "type": "mobile_money",
"name": "Andrew Jones",
"account_number": "0751234987",
"bank_code": "MPESA",
-d '{ "type": "mobile_money_business",
"name": "Till Transfer",
"bank_code": "MPTILL",
"account_number": "247247",
"currency": "KES"
}'
-X POST