Skip to main content

Partner API

This documentation covers how a partner of Dintero can use the API to get access to their merchants.

Merchant account API access

To access the API on behalf of a merchant, you must first obtain an access token. To do this, you will use the exchange token endpoint to exchange the exchange token for a merchant access token.

Step 1: Authenticate as a partner

To authenticate, you create an API client and use the credentials to Create an access token. Create an access token.

Step 2: Obtain exchange token

Using the access_token from step 1 do a request to the Exchange Token endpoint.

POST https://api.dintero.com/v1/accounts/{partner_id}/auth/exchange_token

Authorization: Bearer {access_token}
Content-Type: application/json

{
account_id: {merchant_account_id}
}

The server will respond with an exchange access token.

{
"access_token": "eyJhbGci...t7P4",
"token_type": "Bearer",
"expires_in": 86400,
"refresh_token": "string"
}

Step 3: Exchange the exchange token for a merchant access token

Using the access_token from step 2 do a request to the Get Token endpoint.

POST https://api.dintero.com/v1/accounts/{merchant_account_id}/auth/token

Authorization: Bearer {access_token}
Content-Type: application/json

{
"grant_type": "client_credentials",
"audience":"https://api.dintero.com/v1/accounts/{merchant_account_id}"
}

The server will respond with a merchant access token.

{
"access_token": "eyJhbGci...d5F1",
"token_type": "Bearer",
"expires_in": 86400,
"refresh_token": "string"
}