- Generate EC P-256 private and public keys in pem format
$ openssl ecparam -name P-256 -genkey -noout -out private-key.pem
$ openssl ec -in private-key.pem -pubout -out public-key.pem
and copy to the root folder. You can use the sample ones already there also.
-
Add the generated public key to your pawaPay account. Read how to do that from our docs.
-
Generate API Token in the pawaPay dashboard. Read how to do that from our docs.
-
Update
authToken
inconfig/default.json
with the API token you just generated. -
Make sure you have http-message-signatures installed.
$ npm install http-message-signatures
- Execute
$ node signed-deposit-example.js
- You will see the request and response payloads and whether signature and content digest are valid from the output.