Skip to main content

Checkout

This API initiates the payment process and redirects the customer to the selected payment channel.

Checkout - Request Example​

Endpoint:

{{base-url}}/upg/checkout

Method: POST

Request Headers:

Content-Type: multipart/form-data

Request Body (multipart/form-data):

--form 'merchantId="7"' \
--form 'orderId="teett"' \
--form 'merchantName="Test Company"' \
--form 'amount="89.99"' \
--form 'paymentMethod="test"' \
--form 'description="Payment for order #123"' \
--form 'merchantCustomerName="Dummy user"' \
--form 'merchantCustomerPhoneNumber="9800000000"' \
--form 'signature="9d53e20329bc7........bc1812addfa5cdc1c6c584f5"'

Example Fields Summary:

KeyValue
merchantId7
orderIdteett
merchantNameTest Company
amount89.99
paymentMethodtest
descriptionPayment for order #123
merchantCustomerNameDummy user
merchantCustomerPhoneNumber9800000000 (Must be 10 digits)
signature
9d53e20329bc7........bc1812addfa5cdc1c6c584f5

Checkout - Response Example​

This endpoint does not return a JSON response body in the usual REST sense. Instead, the server responds with an HTML page that starts the payment flow and redirects the customer to the selected payment channel as follows:

Checkout Page

Service Parameters​

Parameter NameTypeRequiredDescription
merchantIdIntegerYesUnique identifier assigned to the merchant.
orderIdStringYesUnique order identifier for the transaction.
merchantNameStringYesMerchant’s registered business name.
amountStringYesPayment amount in NPR. Example: 89.99
paymentMethodStringYesSelected payment method or provider.
descriptionStringYesBrief description of the payment purpose.
merchantCustomerNameStringYesCustomer name associated with the order.
merchantCustomerPhoneNumberStringYesCustomer phone number (Must be 10 digits).
signatureStringYesHMAC-SHA256 signature generated for this checkout request.

Notes​

note
  • After successful checkout, customer is redirected to the payment interface after the payment is completed through selected channel.
  • transaction_id is returned through callback URL which can be used to check the transaction status.