Payment Link
Payment Link Endpoint:
This endpoint is useful for initiating payments with a custom payment link and share with customers to collect payments from them.
Code Example: Axios POST Request
Below is an example of how to use Axios to create a payment link:
Key Points
mid: Your merchant identifier.
amount: Must be a numeric value between 1 and 100000.
note: A payment remark.
customer_name: Ensure this contains a name.
customer_email: Ensure this contains a valid email address.
customer_mobile: Ensure this contains a valid phone number instead of a name.
Authorization: Basic base64(public_key:secret_key).
Ensure all placeholders (e.g., "Your Merchant ID") are replaced with actual values before executing
Request Body Parameters:
POST
/v1/payments/
createPaymentLink
Headers
Content-Type
application/x-www-form-urlencoded
Authorization
Basic Auth
Body
mid
string
Merchant ID assigned to you by UPITranzact.
ABC
Yes
amount
integer
The total amount.
200
Yes
note
string
A remark for the payment.
Add Money
Yes
customer_name
string
The name of the customer making for the payment.
John
Yes
customer_email
string
The email address of the payment.
john@example.com
Yes
customer_mobile
string
The mobile number of the customer.
0123456789
Yes
Authorization:
The request must include an Authorization header with a Base64 encoded string containing your public_key
and secret_key
in the format public_key:secret_key
. Here's an example of how to generate the Authorization header:
Example:
For example, if your public_key
is your_public_key
and your secret_key
is your_secret_key
, you would encode this into Base64 and use it as the Authorization header.
Example Authorization Header (Base64 encoded):
Response
Error Codes:
400: Bad Request - Missing required parameters or invalid data.
401: Unauthorized - Invalid or missing
Authorization
Basic Auth.404: Not Found - An issue occurred on the server side.
500: Internal Server Error - An issue occurred on the server side.
Last updated