šŸ’»API Documentation

API Specification Common Standards

Protocol Standards and Methods

Request Header

Signature

Build the content

String payload = timestamp + "\n" + nonce + "\n" + body + "\n";

Sign the content

String signature = hex(hmac("sha512", payload, secretKey)).toUpperCase()


NOTE

  • ā€˜\nā€™ is LF, ASCII value is '0x0A'

  • Parameter names are case-sensitive;

  • When checking returned data or a push notification signature, the transferred sign parameter is excluded in this signature as it is compared with the created signature.

  • When post the Json body, carefully check the quote, ' is not same as "


Merchant APIs

Base URL - <base_url> : api-azsit.purplepay.app

Authentication

  1. Register as a merchant on PurplePay Dashboard with email and password

  2. Purple Pay authentication API uses Bearer authorization. It should be included in the header

  3. Generating JWT Token

    1. End Point:

      1. Method: POST

      2. URL: <base_url>/auth/token

    2. Request Parameters:

    3. Response:

    4. Using the JWT Token

      1. Once you have generated a JWT access token, you can use it to authenticate your requests.

      2. The token should be included in the Authorization header with the Bearer keyword, like so:

        **http** Authorization: Bearer <your-jwt-token>
      3. Replace <your-jwt-token> with your actual JWT token.

      4. Remember, all API requests must be made over HTTPS. Non-secure requests will fail.


Payments Config API

  1. It returns details of supported chains and their details.

  2. It also returns data to support and enrich classification around the different attributes of payments such as payment type (merchant, ecommerce, P2P etc).

  3. Endpoint:

    1. Method: GET

    2. URL: <base_url>/payments/chain_config


Create Checkout API

  1. Payments API is used to create orders and generate counterfactual payment addresses to receive payments on different chains

  2. Endpoint:

    1. Method: POST

    2. URL: <base_url>/payments/burner_address

  3. Request Parameters:

  4. Response:


Payment Status API

  1. The payment status and verification API tracks and updates the status of payments for the given Purple Pay order id.

  2. Endpoint

    1. Method: GET

    2. URL: <base_url>/payments/payment_verify/<payment_id>

      1. This payment id can be purple pay payment_id or merchant user_order_id.

  3. Request Parameters

    1. payment_id in url path as mentioned above

  4. Response:

Last updated