Doc Navigation

  • ShohojPay
  • API Operation
  • Request Header
  • Request Arguments
  • Weebhook Request

ShohojPay Gateway Integration Guide

Accept payment quickly and securely using the standard method by calling our /api/checkout endpoint. When you call the endpoint we return a response with a payment link, do a redirect to the link and a secure checkout page will be loaded for your customer to enter their payment details and complete the payment. When the transaction is completed we would call your Webhook URL with JSON format that you have setup in Admin Panel. Follow the steps below to integrate ShohojPay Gateway

API Operation

Live API End Point (POST Method):

                                        
                                            https://pay.shohojpay.com/api/checkout
                                        
                                    

Sandbox API End Point (POST Method):

                                        
                                            https://sandbox.shohojpay.com/api/checkout
                                        
                                    

Compulsory Request Headers

All Request Made to the ShohojPay Gateway must have the following request headers.

Header Request Example:

                                        
                                        curl https://sandbox.shohojpay.com/api/checkout
                                        "SHOHOJPAY-API-KEY: Your API Key"
                                        
                                    

Sandbox API KEY:

                                        
                                            982d381360a69d419689740d9f2e26ce36fb7a50
                                        
                                    
API Request Headerse Description
SHOHOJPAYPAY-API-KEY ShohojPay API Key. It will verify request

API Request Arguments

Request Body Need to POST with JSON Format.

Request Example:

                                        
                                            {
                                                "customer_name": "John Doe",
                                                "customer_email": "johndoe@gmail.com",
                                                "amount": "100",
                                                "metadata": {
                                                    "order_id": "105",
                                                    "product_id": "85"
                                                },
                                                "redirect_url": "https://example.com/success",
                                                "cancel_url": "https://example.com/cancel",
                                                "webhook_url": "https://example.com/webhook"
                                            }
                                        
                                    
Parameter Required Description
customer_name True User Full Name. 55 characters or less
customer_email True User Email, 100 characters or less
amount True Product amount
metadata True This is an object that can contains your validation data details: e.g -
"metadata": {
"order_id": "10",
"invoice_id": "5"
}
redirect_url True Redirect URL
cancel_url True Cancel URL
webhook_url True Webhook URL

API Response Example:

                                        
                                            {
                                                "status": "true",
                                                "message": "Payment Url Generated Successfully",
                                                "payment_url": "https://sandbox.shohojpay.com/payment/SH12345678",
                                            }
                                        
                                    

Webhook Request

When the transaction is completed we would call your Webhook URL with JSON format that you have setup in Admin Panel.

Header Request Example:

                                        
                                            "Content-Type: application/json"
                                            "CHECK-SHOHOJPAY-API-KEY: Your API Key"
                                        
                                    

Sandbox API KEY:

                                        
                                            982d381360a69d419689740d9f2e26ce36fb7a50
                                        
                                    

Webhook Request From Panel Example:

                                        
                                            {
                                                "customer_name": "John Doe",
                                                "customer_email": "johndoe@gmail.com",
                                                "amount": "100",
                                                "metadata": {
                                                    "order_id": "105",
                                                    "product_id": "85"
                                                },
                                                "payment_method": "bkash or nagad or rocket or upay",
                                                "sender_number": "01234567890",
                                                "transaction_id": "XYZ123456",
                                                "status": "pending or paid"
                                            }
                                        
                                    

© 2020 All Rights Reserved by ShohojPay