Getting started

This guide provides step-by-step instructions for integrating the payment system into your application. Follow these steps to ensure a seamless setup and payment processing experience.

Setup & Authentication

  1. Environment Configuration πŸ”—

    • Ensure to setup your environments correctly.
    • Each environment requires its own BASE URL, API ID, and Secret Key.
  2. Authorization Token πŸ”—

    • To call any endpoint, you must use an authorization token.
    • Obtain this token from the authentication endpoint.

Generate Invoice

  1. Create Invoice πŸ”—
    • Send the invoice details to the /api/addInvoice endpoint to generate a new invoice.
    • The response will include the transaction number of the created invoice, which will be used in subsequent steps.

Payment Processing

  1. Retrieve Invoice Details πŸ”—

    • Retrieve the invoice details by sending the transaction number to the /api/getInvoice endpoint.
    • Invoice detail will include the payment URL, which will be used to process the payment.
  2. Redirect to Payment πŸ”—

    • Redirect your customer to the provided payment URL.
  3. Post-Payment Redirection πŸ”—

    • After the user completes the payment, his browser will be redirected back to the callBackUrl specified during the invoice generation process.

Check Payment Status

  1. Verify Payment πŸ”—

    • Use the /api/getInvoice endpoint to check the payment status and paid amount.
    • Process the client's order in your system based on the payment status.
  2. Handle Payment Errors πŸ”—

    • Check for any payment errors that may have occurred during the payment process using the provided payment error codes.

Payment Process