Authentication

Get an access token

POST/uaa/oauth/token

Exchange your merchant API username and password for an OAuth 2.0 access token.

Send your API Signature in the Authorization header as Basic <API Signature>. The API Signature is your client_id:client_secret already encoded in base64. Find it in the Resources section of the PayTomorrow merchant dashboard.

Cache the access token and reuse it until it expires. Request a new one when you receive a 401.

Authorization

apiSignature
AuthorizationBasic <token>

Your API Signature from the merchant dashboard (base64 of client_id:client_secret).

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/uaa/oauth/token" \  -H "Authorization: Basic <API_SIGNATURE>" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'grant_type=password&scope=openid&username=api-user%40yourstore.com&password=your-api-password'
{  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIn0...",  "token_type": "Bearer",  "expires_in": 18000,  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIn0...",  "refresh_expires_in": 432000,  "scope": "openid profile email"}