NICEPAY API
API SNAP BI

SNAP API Testing

6min

Swagger for SNAP API Testing



API Testing proceeds to testing several payment method using API SNAP before setup on the system. Several API SNAP available for Swagger testing format such as:

API Name

Swagger File

API Information

Access Token

SNAP Virtual Account API

QRIS API

  1. Create QRIS
  2. Status QRIS
  3. Refund QRIS

API QRIS SNAP

E-Wallet API

Coming Soon

Payout API





SNAP API Testing Guidance



The following is the steps to proceed with the SNAP API Testing.

  1. Generate Access Token that will be used on Authorization part.
  2. Fill in the available Header Parameter and Body Parameter form.
  3. Press the Try It button to send the request parameter and get response parameter.
  4. Response parameter could be seen on the bottom right side of the display.



X-Signature Guidance



Asymmetric

X-Signature asymmetric uses to request Access Token Header. This token has the following term:

SHA256withRSA (Private_Key, stringToSign) stringToSign = client_ID + “|” + X-TIMESTAMP



Symmetric

X-Signature symmetric uses as header to request parameter on every API sent to the NICEPAY system. Following is the sample steps to generate X-Signature.

  1. Construct EncodeRequestBody using payload, HexEncode dan SHA256 Lowercase(HexEncode(SHA256(minify(RequestBody))))
  2. Construct payload signature concat at field using ":" separator HTTPMethod:EndpointUrl:accessToken:EncodeRequestBody:TimeStamp
1. Sample URL
2. Sample Generate
3. Sample Create Hash
4. Sample signature base64
5. Sample Result


Updated 16 May 2024
Did this page help you?
Yes
No