API Reference Guide
Under this section you will find all API information that is used for processing payments.
Authentication
All Paykun APIs requires MerchantId & AccessToken headers to be present for authentication purpose, Same can be found from merchant dashboard. Some APIs also requires you to add a signature in the request body for the purpose of ensuring authenticity.
See How to generate Access Token & Encryption Key.
See How signature generation and verification work.
Get Transaction Status
GET
https://api.paykun.com/v1/merchant/transaction/{transaction_id}
This endpoint allows you to get transaction status with many more details
Path Parameters
transaction_id
string
Transaction id for which you want to retrieve the status
Headers
MerchantId
string
Your merchant ID
AccessToken
string
Your Access Token
Get Order Details
GET
https://api.paykun.com/v1/merchant/orders/{order_id}
Retrieve transaction list using order id, as this may return multiple transactions you can provide filters to narrow down search results.
Path Parameters
order_id
string
Your Order ID for which you want to retrieve transaction list
Query Parameters
signature
string
Generate signature for all query parameters available in URL
page_number
integer
No of a page that you want to receive
limit
integer
How many records you want to retrieve in one request, At a time you can get maximum of 100 records
status
string
Status of the transaction that you want to retrieve, it can be any valid status. For example, Success, Failed
start_date
string
If you want to retrieve record between specific time range, then provide a start date
end_date
string
If you want to retrieve record between specific time range, then provide an end date
customer_email
string
If you want to retrieve a record for any particular customer then provide customer email
Headers
MerchantId
string
Your merchant ID
AccessToken
string
Your Access Token
Refund Transaction
POST
https://api.paykun.com/v1/merchant/transaction/{transaction_id}/refund
Refund transaction using the transaction ID
Headers
MerchantId
string
Your Merchant ID
AccessToken
string
Your Access Token
Request Body
refund_amount
string
Amount you want to refund to customer
remarks
string
Any remarks/note you want to provide for this refund
signature
string
Generate signature with using refund_amount and remarks parameters
Create Payment Link
POST
https://api.paykun.com/v1/merchant/payment/link/create
Create payment link
Headers
MerchantId
string
Your Merchant ID
AccessToken
string
Your Access Token
Content-Type
string
application/json
Request Body
failure_url
string
if you want to redirect customer to your website on payment cancellation then provide the URl or leave it blank
success_url
string
If you want to redirect customer to your website on successful payment then provide the URL or leave it bank
signature
string
Generate signature for all your parameters available in your form data
amount
number
Amount that you want to collect
currency
string
Currency in which payment is to be collected. Default should be set to INR, other value is only supported is international transactions is activated for your account
payment_for
string
Product/Service name
for_single_customer
boolean
Is this payment link created for single customer or not
customer_email
string
This field is required in case for_single_customer is set to true otherwise leave it empty, In any case this parameter should be present in request.
customer_mono
string
This field is required in case for_single_customer is set to true otherwise leave it empty, In any case this parameter should be present in request
customer_fname
string
This field is required in case for_single_customer is set to true otherwise leave it empty, In any case this parameter should be present in request
customer_lname
string
This field is required in case for_single_customer is set to true otherwise leave it empty, In any case this parameter should be present in request
notify_by_email
boolean
If you want to notify customer via E-Mail then set this true, this can be true only if for_single_customer is true
notify_by_sms
boolean
If you want to notify customer via SMS then set this true, this can be true only if for_single_customer is true
can_expire
boolean
Set true if you want this payment link to expire automatically at specific time
expiry_date
string
Date & time when this link should expire, This is required in case can_expire is set to true otherwise leave it empty, In any case this parameter should be present in request. Format of date & time should be in d-m-Y H:i:s (15-07-2020 18:30:00)
receipt_no
string
Provide receipt number if any otherwise leave it empty, In any case this parameter should be present in request
note
string
Provide note if any otherwise leave it empty, In any case this parameter should be present in request
Last updated