To start using the Dintero Checkout on your website, you need to create an API Client through the Dintero Backoffice.
Step by step-guide
First, log into Backoffice, then follow this interactive slide-show:
- Click on settings.
- Under API & Integrations click on API clients.
- Click on Create new API client.
- Click on Checkout client.
- Write the URL of your website.
- Click on Create new API client.
- Remember to Save the credentials, the Client Secret can not be shown again.
- Click OK.
- The Client is now Created.
Using Our Plugin
If you’re using our plugin, most of the technical details below are handled automatically. You can skip the following sections unless you’re customizing the integration or coding it yourself.
Authentication
Use your client_id and client_secret to get an access token from the auth endpoint.
curl https://api.dintero.com/v1/accounts/T12345678/auth/token \
-u "CLIENT_ID:CLIENT_SECRET" \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "client_credentials",
"audience": "https://api.dintero.com/v1/accounts/T12345678"
}'
The response contains an access_token and its lifetime in seconds:
{
"access_token": "eyJhbGci...t7P4",
"token_type": "Bearer",
"expires_in": 14400
}
Use the token as a Bearer header on all subsequent requests:
Authorization: Bearer {access_token}
Cache the token and only request a new one when it is about to expire, not on every request.