Mpesa Integration - Website Laravel Php ,Flutter

52 min read


Mpesa API Integration: Step-by-Step Guide to Integrating Lipa ... https://sharasolutions.com › blog › mpesa-api-integratio...
26 Mar 2019 — Step-by-Step Guide to Integrating Mpesa to a Website, App or System · Step 1: Create an account on Mpesa G2 Portal · Step 2: Create an App on ...

Mpesa Integration: Home https://www.kelance.com
Mpesa integration is the process of syncing Mpesa web API with the website, app or system to enable automation of payments verification, disbursements, ...

Lipa na MPESA STK-PUSH Integration to your PHP Website https://mfc.ke › lipa-na-mpesa-stk-push-integration-to-y...
20 May 2021 — In MPESA STK API integration, the M-Pesa registered customer gets a pop-up notification to confirm the initiated transaction by the merchant ...

MPESA API Integration Services from Softwareske in Kenya https://www.softwareske.com › mpesa-integration
By integrating your payments solutions, you automate the tracking and reconciling tasks in all your business systems making it all work together to deliver a ...

Integrating Mpesa API with a Flutter App - Medium https://medium.com › podiihq › integrating-mpesa-api-wit...
MPESA is a Mobile money transfer service in Kenya owned by Safaricom ... In this article we are going to learn how to integrate Mpesa API by ...
7 Feb 2021 · Uploaded by Flutter Kisumu

Full Course Laravel M-PESA Daraja API Integration ...
SurvTech

MPESA INTEGRATION | DARAJA API OVERVIEW

How TO INTEGRATE M-PESA INTO A WEBSITE --- CORE ...
 Simon's Tech School


Demystifying The M-Pesa API - Andela https://andela.com › Insights › Build
M-Pesa is a mobile phone-based money transfer, financing and ... the technical know-how to do the integrations because of its requirements which included: ...

This is a php implementation of Safaricom MPESA API(DARAJA) https://github.com › antarahealth › mpesa
This is a php implementation of Safaricom MPESA API(DARAJA) - GitHub ... to the following Ninjas for their help during my integration process and the things ...

mPesa For Your Website - mPesa Checkout Solution
 https://www.dpogroup.com/payment-methods/mpesa
Fast, secure, & easy online payment processing. DPO is the best way to accept payments. Easy integration with your website or mobile app with shopping cart plugins. Read Blog.
‎Easy Integration · ‎Take Your Business Online · ‎Payment Platform Features · ‎DPO Store

Pamatech Global Solutions | M-PESA Integration Services
Ad·
 https://www.pamatech.co.ke/
0707 793251
System designed to completely manage school operations. School System Admin, Teachers, Parents and Students Modules with Web and mobile Access.
People also ask
How do I integrate M-PESA into WordPress?
What is STK in Safaricom?
How do I install M-PESA Xpress?
How does STK push work?
Feedback
Related searches
mpesa integration in kenya
mpesa integration in php
mpesa integration in android
mpesa integration price
mpesa c2b integration
mpesa integration c#
website mpesa integration
pos mpesa integration

'stkpush' => array(
            'name' => 'Lipa Na M-Pesa Online Payment API',
            'description' => 'API to initiate online payment on behalf of a customer.',
            'endpoint' => 'mpesa/stkpush/v1/processrequest',
            'type' => 'post',
            'group' => 'https://developer.safaricom.co.ke/lipa-na-m-pesa-online/apis',
            'link' => 'https://developer.safaricom.co.ke/lipa-na-m-pesa-online/apis/post/stkpush/v1/processrequest',
            'parameters' => array(
                'BusinessShortCode' => array(
                    'name' => 'Business Short Code',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'Shortcode (6 digits)',
                ),
                'Password' => array(
                    'name' => 'Password',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'base64.encode(ShortcodePasskeyTimestamp)',
                ),
                'Timestamp' => array(
                    'name' => 'Timestamp',
                    'required' => true,
                    'type' => 'Timestamp',
                    'possible_value' => 'yyyymmddhhiiss',
                ),
                'TransactionType' => array(
                    'name' => 'The transaction type to be used for the request \'CustomerPayBillOnline\'',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'CustomerPayBillOnline',
                ),
                'Amount' => array(
                    'name' => 'The amount to be transacted',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '1',
                ),
                'PartyA' => array(
                    'name' => 'The entity sending the funds',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'MSISDN (12 digits)',
                ),
                'PartyB' => array(
                    'name' => 'The organization receiving the funds',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'Shortcode (6 digits)',
                ),
                'PhoneNumber' => array(
                    'name' => 'The MSISDN sending the funds',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'MSISDN (12 digits)',
                ),
                'CallBackURL' => array(
                    'name' => 'Call Back URL',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'AccountReference' => array(
                    'name' => 'Account Reference',
                    'required' => true,
                    'type' => 'Alpha-Numeric',
                    'possible_value' => 'Any combinations of letters and numbers',
                ),
                'TransactionDesc' => array(
                    'name' => 'Description of the transaction',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'Any string of less then 20 characters',
                ),
            ),
            'response' => array(
                'MerchantRequestID' => array(
                    'name' => 'Merchant Request ID',
                    'type' => 'Numeric',
                    'sample_value' => '1234-1234-1',
                ),
                'CheckoutRequestID' => array(
                    'name' => 'Check out Request ID',
                    'type' => 'String',
                    'sample_value' => 'ws_co_123456789',
                ),
                'ResponseDescription' => array(
                    'name' => 'Response Description message',
                    'type' => 'String',
                    'sample_value' => '-The service request has failed <br>
                                        -The service request has been accepted successfully',
                ),
                'ResponseCode' => array(
                    'name' => 'Response Code',
                    'type' => 'Numeric',
                    'sample_value' => '0<br>
                                        Error codes',
                ),
                'CustomerMessage' => array(
                    'name' => 'Customer Message',
                    'type' => 'String',
                    'sample_value' => 'A sequence of less then 20 characters',
                ),
            )
        ),
        'stk_query' => array(
            'name' => 'Lipa Na M-Pesa Query Request API',
            'description' => 'API to check the status of a Lipa Na M-Pesa Online Payment.',
            'endpoint' => 'mpesa/stkpushquery/v1/query',
            'type' => 'post',
            'group' => 'https://developer.safaricom.co.ke/lipa-na-m-pesa-online/apis',
            'link' => 'https://developer.safaricom.co.ke/lipa-na-m-pesa-online/apis/post/stkpushquery/v1/query',
            'parameters' => array(
                'BusinessShortCode' => array(
                    'name' => 'Business Short Code',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'Shortcode (6 digits)',
                ),
                'Password' => array(
                    'name' => 'Password',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'base64.encode(ShortcodePasskeyTimestamp)',
                ),
                'Timestamp' => array(
                    'name' => 'Timestamp',
                    'required' => true,
                    'type' => 'Timestamp',
                    'possible_value' => 'yyyymmddhhiiss',
                ),
                'CheckoutRequestID' => array(
                    'name' => 'Checkout RequestID',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'ws_co_123456789',
                ),
            ),
            'response' => array(
                'MerchantRequestID' => array(
                    'name' => 'Merchant Request ID',
                    'type' => 'Numeric',
                    'sample_value' => '1234-1234-1',
                ),
                'CheckoutRequestID' => array(
                    'name' => 'Check out Request ID',
                    'type' => 'String',
                    'sample_value' => 'ws_co_123456789',
                ),
                'ResponseCode' => array(
                    'name' => 'Response Code',
                    'type' => 'Numeric',
                    'sample_value' => '0<br>
                                        Error codes',
                ),
                'ResultDesc' => array(
                    'name' => 'Result Desc',
                    'type' => 'String',
                    'sample_value' => 'String',
                ),
                'ResponseDescription' => array(
                    'name' => 'Response Description message',
                    'type' => 'String',
                    'sample_value' => '-The service request has failed <br>
                                        -The service request has been accepted successfully',
                ),
                'ResultCode' => array(
                    'name' => 'Result Code',
                    'type' => 'Numeric',
                    'sample_value' => '1032',
                ),
            )
        ),
        'account_balance' => array(
            'name' => 'Account Balance Request',
            'description' => 'API to enquire the balance on an M-Pesa BuyGoods (Till Number).',
            'endpoint' => 'mpesa/accountbalance/v1/query',
            'type' => 'post',
            'group' => 'https://developer.safaricom.co.ke/account-balance/apis',
            'link' => 'https://developer.safaricom.co.ke/account-balance/apis/post/query',
            'parameters' => array(
                'CommandID' => array(
                    'name' => 'Takes only \'AccountBalance\' CommandID',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'AccountBalance',
                ),
                'PartyA' => array(
                    'name' => 'Type of organization receiving the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'XXXXXX',
                ),
                'IdentifierType' => array(
                    'name' => 'Type of organization receiving the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '1 – MSISDN<br>
                                         2 – Till Number<br>
                                         4 – Organization short code',
                ),
                'Initiator' => array(
                    'name' => 'This is the credential/username used to authenticate the transaction request.',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'This is the credential/username used to authenticate the transaction request',
                ),
                'SecurityCredential' => array(
                    'name' => 'This is the encrypted password to autheticate the transaction request',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'Encrypted password for the initiator to authenticate using the request',
                ),
                'QueueTimeOutURL' => array(
                    'name' => 'The path that stores information of time out transaction',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'ResultURL' => array(
                    'name' => 'The path that stores information of transactions',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
            ),
            'response' => array(
                'OriginatorConverstionID' => array(
                    'name' => 'The unique request ID for tracking a transaction',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => 'Alpha-numeric string of less then 20 characters',
                ),
                'ConversationID' => array(
                    'name' => 'The unique request ID returned by mpesa for each request made',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => '- Error codes - 500 OK',
                ),
                'ResponseDescription' => array(
                    'name' => 'Response Description message',
                    'type' => 'String',
                    'sample_value' => '- The service request has failed - The service request has been accepted successfully',
                ),
            )
        ),
        'b2b_payment_request' => array(
            'name' => 'B2B Payment Request',
            'description' => 'Api to transit Mpesa Transaction from one company to another.',
            'endpoint' => 'mpesa/b2b/v1/paymentrequest',
            'type' => 'post',
            'group' => 'https://developer.safaricom.co.ke/b2b/apis',
            'link' => 'https://developer.safaricom.co.ke/b2b/apis/post/paymentrequest',
            'parameters' => array(
                'CommandID' => array(
                    'name' => 'The command id used to carry out a B2B payment',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'BusinessPayBill,<br>
                                         BusinessBuyGoods,<br>
                                         DisburseFundsToBusiness,<br>
                                         BusinessToBusinessTransfer,<br>
                                         BusinessTransferFromMMFToUtility,<br>
                                         BusinessTransferFromUtilityToMMF,<br>
                                         MerchantToMerchantTransfer,<br>
                                         MerchantTransferFromMerchantToWorking<br>
                                         MerchantServicesMMFAccountTransfer<br>
                                         AgencyFloatAdvance',
                ),
                'Amount' => array(
                    'name' => 'The amount been transacted',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '1',
                ),
                'PartyA' => array(
                    'name' => 'Organization Sending the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'Shortcode (6 digits)',
                ),
                'SenderIdentifierType' => array(
                    'name' => 'Type of organization sending the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '1 – MSISDN<br>
                                         2 – Till Number<br>
                                         4 – Organization short code',
                ),
                'PartyB' => array(
                    'name' => 'Organization Receiving the funds',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'Shortcode (6 digits)',
                ),
                'RecieverIdentifierType' => array(
                    'name' => 'Type of organization receiving the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '1 – MSISDN<br>
                                         2 – Till Number<br>
                                         4 – Organization short code',
                ),
                'Remarks' => array(
                    'name' => 'Comments that are sent along with the transaction. ',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'String of less then 100 characters',
                ),
                'Initiator' => array(
                    'name' => 'This is the credential/username used to authenticate the transaction request.',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'This is the credential/username used to authenticate the transaction request',
                ),
                'SecurityCredential' => array(
                    'name' => 'This is the encrypted password to autheticate the transaction request',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'Encrypted password for the initiator to authenticate using the request',
                ),
                'QueueTimeOutURL' => array(
                    'name' => 'The path that stores information of time out transaction',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'ResultURL' => array(
                    'name' => 'The path that stores information of transactions',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'AccountReference' => array(
                    'name' => 'Account Reference mandatory for "BussinessPaybill" CommandID',
                    'required' => true,
                    'type' => 'Alpha-Numeric',
                    'possible_value' => 'String of less then 20 characters',
                ),
            ),
            'response' => array(
                'OriginatorConverstionID' => array(
                    'name' => 'The unique request ID for tracking a transaction',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => 'Alpha-numeric string of less then 20 characters',
                ),
                'ConversationID' => array(
                    'name' => 'The unique request ID returned by mpesa for each request made',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => '- Error codes - 500 OK',
                ),
                'ResponseDescription' => array(
                    'name' => 'Response Description message',
                    'type' => 'String',
                    'sample_value' => '- The service request has failed - The service request has been accepted successfully',
                ),
            )
        ),
        'b2c_payment_request' => array(
            'name' => 'B2C Payment Request',
            'description' => 'API to transact between an M-Pesa short code to a phone number registered on M-Pesa.',
            'endpoint' => 'mpesa/b2c/v1/paymentrequest',
            'type' => 'post',
            'group' => 'https://developer.safaricom.co.ke/b2c/apis',
            'link' => 'https://developer.safaricom.co.ke/b2c/apis/post/paymentrequest',
            'parameters' => array(
                'InitiatorName' => array(
                    'name' => 'The name of the initiator initiating the request',
                    'required' => true,
                    'type' => 'Alpha-numeric',
                    'possible_value' => 'This is the credential/username used to authenticate the transaction request',
                ),
                'SecurityCredential' => array(
                    'name' => 'Encrypted Credential of user getting transaction amount',
                    'required' => true,
                    'type' => 'Alpha-numeric',
                    'possible_value' => 'Encrypted password for the initiator to authenticate the transaction request',
                ),
                'CommandID' => array(
                    'name' => 'Unique command for each transaction type<br>SalaryPayment<br>BusinessPayment<br>PromotionPayment',
                    'required' => true,
                    'type' => 'Alpha-numeric',
                    'possible_value' => '-SalaryPayment<br>-BusinessPayment<br>-PromotionPayment',
                ),
                'Amount' => array(
                    'name' => 'The amount been transacted',
                    'required' => true,
                    'type' => 'Numbers',
                    'possible_value' => '00',
                ),
                'PartyA' => array(
                    'name' => 'Organization /MSISDN sending the transaction',
                    'required' => true,
                    'type' => 'Numbers',
                    'possible_value' => '-Shortcode (6 digits)<br>-MSISDN (12 digits)',
                ),
                'PartyB' => array(
                    'name' => 'MSISDN sending the transaction',
                    'required' => true,
                    'type' => 'Phone number - Country code (254) without the plus sign',
                    'possible_value' => '-MSISDN (12 digits)',
                ),
                'Remarks' => array(
                    'name' => 'Comments that are sent along with the transaction.',
                    'required' => true,
                    'type' => 'Alpha-numeric',
                    'possible_value' => 'Sequence of characters upto 100',
                ),
                'QueueTimeOutURL' => array(
                    'name' => 'The path that stores information of time out transaction',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'ResultURL' => array(
                    'name' => 'The path that stores information of transactions',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'Occassion' => array(
                    'name' => 'Optional Parameter',
                    'required' => false,
                    'type' => 'Alpha-numeric',
                    'possible_value' => 'Sequence of characters up to 100',
                ),
            ),
            'response' => array(
                'OriginatorConverstionID' => array(
                    'name' => 'The unique request ID for tracking a transaction',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => 'Alpha-numeric string of less then 20 characters',
                ),
                'ConversationID' => array(
                    'name' => 'The unique request ID returned by mpesa for each request made',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => '- Error codes - 500 OK',
                ),
                'ResponseDescription' => array(
                    'name' => 'Response Description message',
                    'type' => 'String',
                    'sample_value' => '- The service request has failed - The service request has been accepted successfully',
                ),
            )
        ),
        'transaction_status_request' => array(
            'name' => 'Transaction Status Request',
            'description' => 'Check the transaction status.',
            'endpoint' => 'mpesa/transactionstatus/v1/query',
            'type' => 'post',
            'group' => 'https://developer.safaricom.co.ke/transaction-status/apis',
            'link' => 'https://developer.safaricom.co.ke/transaction-status/apis/post/query',
            'parameters' => array(
                'CommandID' => array(
                    'name' => 'Takes only \'TransactionStatusQuery\' command id',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'TransactionStatusQuery',
                ),
                'PartyA' => array(
                    'name' => 'Organization/MSISDN sending the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '-Shortcode (6 digits),<br> -MSISDN (12 Digits)',
                ),
                'IdentifierType' => array(
                    'name' => 'Type of organization receiving the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '1 – MSISDN,<br> 2 – Till Number,<br> 4 – Organization short code',
                ),
                'Remarks' => array(
                    'name' => 'Comments that are sent along with the transaction',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'Sequence of characters up to 100',
                ),
                'Initiator' => array(
                    'name' => 'The name of Initiator to initiating  the request',
                    'required' => true,
                    'type' => 'Alpha-Numeric',
                    'possible_value' => 'This is the credential/username used to authenticate the transaction request',
                ),
                'SecurityCredential' => array(
                    'name' => 'Encrypted Credential of user getting transaction amount',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'Encrypted password for the initiator to authenticate the transaction request',
                ),
                'QueueTimeOutURL' => array(
                    'name' => 'The path that stores information of time out transaction',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'ResultURL' => array(
                    'name' => '    The path that stores information of transaction',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'TransactionID' => array(
                    'name' => 'Unique identifier to identify a transaction on M-Pesa',
                    'required' => true,
                    'type' => 'Alpha-Numeric',
                    'possible_value' => 'LKXXXX1234',
                ),
                'Occasion' => array(
                    'name' => 'Optional Parameter ',
                    'required' => false,
                    'type' => 'String',
                    'possible_value' => 'Sequence of characters up to 100',
                ),
            ),
            'response' => array(
                'OriginatorConverstionID' => array(
                    'name' => 'The unique request ID for tracking a transaction',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => 'Alpha-numeric string of less then 20 characters',
                ),
                'ConversationID' => array(
                    'name' => 'The unique request ID returned by mpesa for each request made',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => '- Error codes - 500 OK',
                ),
                'ResponseDescription' => array(
                    'name' => 'Response Description message',
                    'type' => 'String',
                    'sample_value' => '- The service request has failed - The service request has been accepted successfully',
                ),
            )
        ),
        'c2b_simulate' => array(
            'name' => 'C2B Simulate Transaction',
            'description' => 'Simulate a C2B transaction',
            'endpoint' => 'mpesa/c2b/v1/simulate',
            'type' => 'post',
            'group' => 'https://developer.safaricom.co.ke/c2b/apis',
            'link' => 'https://developer.safaricom.co.ke/c2b/apis/post/simulate',
            'parameters' => array(
                'CommandID' => array(
                    'name' => 'Unique command for each transaction type. For C2B dafult ',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => '- CustomerPayBillOnline - CustomerBuyGoodsOnline',
                ),
                'Amount' => array(
                    'name' => 'The amount being transacted',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '1',
                ),
                'Msisdn' => array(
                    'name' => 'Phone number (msisdn) initiating the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'MSISDN(12 digits) - 254XXXXXXXXX',
                ),
                'BillRefNumber' => array(
                    'name' => 'Bill Reference Number (Optional)',
                    'required' => false,
                    'type' => 'Alpha-Numeric',
                    'possible_value' => 'Alpha-Numeric less then 20 digits ',
                ),
                'ShortCode' => array(
                    'name' => 'Short Code receiving the amount being transacted',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => 'Shortcode (6 digits) - XXXXXX',
                ),
            ),
            'response' => array(
                'OriginatorConverstionID' => array(
                    'name' => 'The unique request ID for tracking a transaction',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => 'Alpha-numeric string of less then 20 characters',
                ),
                'ConversationID' => array(
                    'name' => 'The unique request ID returned by mpesa for each request made',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => '- Error codes - 500 OK',
                ),
                'ResponseDescription' => array(
                    'name' => 'Response Description message',
                    'type' => 'String',
                    'sample_value' => '- The service request has failed - The service request has been accepted successfully',
                ),
            )
        ),
        'c2b_register_url' => array(
            'name' => 'C2B Register URL',
            'description' => 'Register validation and confirmation URLs on M-Pesa ',
            'endpoint' => 'mpesa/c2b/v1/registerurl',
            'type' => 'post',
            'group' => 'https://developer.safaricom.co.ke/c2b/apis',
            'link' => 'https://developer.safaricom.co.ke/c2b/apis/post/registerurl',
            'parameters' => array(
                'ValidationURL' => array(
                    'name' => 'Validation URL for the client',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'ConfirmationURL' => array(
                    'name' => 'Confirmation URL for the client',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'ResponseType' => array(
                    'name' => 'Default response type for timeout. Incase a tranaction times out, Mpesa will by default Complete or Cancel the transaction',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'Completed',
                ),
                'ShortCode' => array(
                    'name' => 'The short code of the organization.',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '123456',
                ),
            ),
            'response' => array(
                'OriginatorConverstionID' => array(
                    'name' => 'The unique request ID for tracking a transaction',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => 'Alpha-numeric string of less then 20 characters',
                ),
                'ConversationID' => array(
                    'name' => 'The unique request ID returned by mpesa for each request made',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => '- Error codes - 500 OK',
                ),
                'ResponseDescription' => array(
                    'name' => 'Response Description message',
                    'type' => 'String',
                    'sample_value' => '- The service request has failed - The service request has been accepted successfully',
                ),
            )
        ),
        'reversal' => array(
            'name' => 'Reversal',
            'description' => 'Transaction Reversal API reverses a M-Pesa transaction.',
            'endpoint' => 'mpesa/reversal/v1/request',
            'type' => 'post',
            'group' => 'https://developer.safaricom.co.ke/reversal/apis',
            'link' => 'https://developer.safaricom.co.ke/reversal/apis/post/request',
            'parameters' => array(
                'Amount' => array(
                    'name' => 'Amount of the transaction',
                    'required' => true,
                    'type' => 'Number',
                    'possible_value' => '10',
                ),
                'CommandID' => array(
                    'name' => 'Takes only \'TransactionReversal\' Command id',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'TransactionReversal',
                ),
                'ReceiverParty' => array(
                    'name' => 'Organization /MSISDN sending the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '-Shortcode (6 digits)<br>-MSISDN (12 Digits)',
                ),
                'RecieverIdentifierType' => array(
                    'name' => 'Type of organization receiving the transaction',
                    'required' => true,
                    'type' => 'Numeric',
                    'possible_value' => '1 – MSISDN,<br>2 – Till Number,<br>4 – Organization short code',
                ),
                'Remarks' => array(
                    'name' => 'Comments that are sent along with the transaction.',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'Sequence of characters up to 100',
                ),
                'Initiator' => array(
                    'name' => 'The name of Initiator to initiating  the request    ',
                    'required' => true,
                    'type' => 'Alpha-Numeric',
                    'possible_value' => 'This is the credential/username used to authenticate the transaction request',
                ),
                'SecurityCredential' => array(
                    'name' => 'Encrypted Credential of user getting transaction amount',
                    'required' => true,
                    'type' => 'String',
                    'possible_value' => 'Encrypted password for the initiator to authenticate the transaction request',
                ),
                'QueueTimeOutURL' => array(
                    'name' => 'The path that stores information of time out transaction',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'ResultURL' => array(
                    'name' => '    The path that stores information of transaction',
                    'required' => true,
                    'type' => 'URL',
                    'possible_value' => 'https://ip or domain:port/path',
                ),
                'TransactionID' => array(
                    'name' => 'Unique identifier to identify a transaction on M-Pesa',
                    'required' => true,
                    'type' => 'Alpha-Numeric',
                    'possible_value' => 'LKXXXX1234',
                ),
                'Occasion' => array(
                    'name' => 'Optional Parameter ',
                    'required' => false,
                    'type' => 'String',
                    'possible_value' => 'Sequence of characters up to 100',
                ),
            )
        ),
        'generate_token' => array(
            'name' => 'Generate Token',
            'description' => 'Gives you time bound access token to call allowed APIs',
            'endpoint' => 'oauth/v1/generate',
            'type' => 'get',
            'group' => 'https://developer.safaricom.co.ke/oauth/apis',
            'link' => '',
            'parameters' => array(
                'ConsumerKey' => array(
                    'name' => 'Consumer Key',
                    'required' => true,
                    'type' => 'Alpha-Numeric',
                    'possible_value' => 'sfewrEwewersd',
                ),
                'ConsumerSecret' => array(
                    'name' => 'Consumer Secret',
                    'required' => true,
                    'type' => 'Alpha-Numeric',
                    'possible_value' => 'sfewrEwewersd112',
                ),
            ),
            'response' => array(
                'Expiry' => array(
                    'name' => 'Token expiry time in seconds.',
                    'type' => 'Integer',
                    'sample_value' => '3599',
                ),
                'Access_Token' => array(
                    'name' => 'Access token to access other APIs',
                    'type' => 'Alpha-Numeric',
                    'sample_value' => 'O22vJy6rnN2nRAnOPqZ8dkyGxmXG',
                ),

Total Execution Time content: 0.0011221686999003 Mins Total Execution Time social : 0.0001 Mins

Read Next

Total Execution Time red next: 0.0000 Mins

Search Now






Categories