NjiruClinton / C2B-request-and-response

C2B request and response for mpesa CustomerPayBillOnline and CustomerBuyGoodsOnline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C2B request and response

what this code does

  1. create a new request
  2. convert the request to json
  3. create a new request
  4. set the headers
  5. create a new client
  6. send the request
  7. read the response
  8. convert the response to json
  9. print the response

for these three

ConversationID:

OriginatorCoversationID:

ResponseDescription:

  • all credentials in this code are test credentials.
  • Use your own access token
  • Create CustomerPayBillOnline credentials from the APIs tab on the daraja developer portal
  • You can change the method from CustomerPayBillOnline to CustomerBuyGoodsOnline on line 31 of main.go

About

C2B request and response for mpesa CustomerPayBillOnline and CustomerBuyGoodsOnline

License:MIT License


Languages

Language:Go 100.0%