Skip to content

Commit

Permalink
Add mpesa paybill and till
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Paystack committed Nov 28, 2024
1 parent ab03773 commit 0e1d3f2
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 62 deletions.
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
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

0 comments on commit 0e1d3f2

Please # to comment.