Build payments into your product with TPE virtual. Start integrating →
Logo

Create an integration

Install a program on one MyTPE account and give it only the access it needs.

An integration connects one program to one account. Create a separate integration for each program, and for each account it works on.

Only the account owner can create an integration, and the account's plan must include the external API. Staff can't create one while impersonating a merchant.

  1. In the MyTPE dashboard, switch to the account that the program will work on.
  2. Go to the Developers page and open the Integrations tab.
  3. Click New integration.
  4. Enter a name that identifies the program.
  5. Select only the permissions the program needs. See Scopes.
  6. Optional: add the IP ranges your server uses. See Restrict an integration by IP address.
  7. Click Create integration.
  8. Copy the client ID and the client secret into your server's secret store.

MyTPE shows the secret only once. If you lose it, rotate the credentials.

Keep the client secret on your server. Don't put it in a browser, a mobile app, a public repository or a public environment variable such as NEXT_PUBLIC_*.

Get a token

curl -X POST https://api.mytpe.app/oauth/token \
  -d grant_type=client_credentials \
  -d client_id="$MYTPE_CLIENT_ID" \
  -d client_secret="$MYTPE_CLIENT_SECRET" \
  -d scope="links:write"

Send the token as Authorization: Bearer <token>. Request a new one when it expires, and don't request one for each API call: token requests have their own limit.

On this page