Merchant API
Getting Started

Authentication

Nymcard uses OAuth 2.0 Bearer Token Usage to allow access to the APIs.

Nymcard expects the bearer token authentication to be included in all API requests to the server in a header that looks like the following:

Authorization: Bearer <temporary-bearer-token>

Getting a Bearer Token

To obtain a temporary bearer token, use this code:

curl -v -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -X POST -d '{ "public_key": "<your-public-key>", "private_key": "<your-private-key>" }' https://auth.sandbox.nymcard.com/api/v1.0/merchant/authentication/
bash

Make sure to replace <your-public-key> and <your-private-key> with your API keys. The information can be found from your merchant dashboard > settings > integrations.

The above command returns JSON structured like this:

{ "token": "<temporary-bearer-token>" }
json

You must replace temporary-bearer-token with the returned temporary bearer token. The token is valid for 5 minutes.