Checkout API Reference

This enables you to create a checkout invoice by providing the necessary details for your Customer to make payment.

Payment can be via mobile money, debit/credit card or Hubtel wallet. After making payment, your website is notified through a redirect and your online system is also notified by a web callback.

Request Parameters

Parameter
Type
Requirement
Description

amount

Double

Mandatory

Specifies the total amount expected to be paid for the Items being purchased.

description

String

Mandatory

describes to customers actions they can perform on the checkout page

callBackUrl

String

Mandatory

The callback URL registered to receive the final notification on the status of the payment.

returnUrl

String

Mandatory

The merchant website URL where the customer should return after payment

reference

String

Mandatory

A unique string identifying the request. Useful for reference purposes. It cannot be empty but must have a maximum of 32 characters

Sample Request

POST https://domain.tapngogh.com HTTP/1.1
Host: https://api.pay.tapngogh.com
Accept: application/json
Content-Type: application/json
Authorization: <Authorization>


{  
  	"amount": 1,
	"reference": "test-reference",
	"description": "test-description",
	"callBackUrl": "https://webhook.site/8b4bbd0a-5f98-4b3d-abbe-b9b49767f7d5",
	
}

Request Example

Example

POST https://api.pay.tapngogh.com/payment/request-checkout

Headers

Name
Type
Description

Authorization*

String

Authorization for merchant

Request Body

Name
Type
Description

amount*

Double

Specifies the total amount expected to be paid for the Items being purchased.

reference*

String

A unique string identifying the request. Useful for reference purposes. It cannot be empty but must have a maximum of 32 characters

description*

String

describes to customers actions they can perform on the checkout page

callBackUrl

String

The callback URL registered to receive the final notification on the status of the payment.

Checkout Callback

You are required to implement a callback endpoint on your server to receive payment notification status on the payment or the order notification status.

We recommend using services like Webhook Tester, Request Catcher or ngrok to test your webhook callbacks. These services allow you to define temporary dummy endpoints which will show you the requests and all the data you are receiving from TapnGo.

Provide the dummy URL as the value for the PrimaryCallbackUrl or SecondaryCallbackUrl parameter.

Sample Web checkout Data

Last updated

Was this helpful?