If you'd like to test our Payouts API, follow the simple steps below. For more information about our Payouts API, check our documentation.
Requirements
Download the files below before starting:
Steps:
-
Importing Payouts API File:
-
- Open Insomnia Core and go to the
Preferences
menu, then open the Data
tab

- From the
Data
tab, click on the Import Data
selector and choose the From file
option

- Select and import the Insomnia Payouts API file.
- You should now see a
TrueLayer Payouts folder
folder with the payout endpoints available

-
- Go to
Preferences
> Plugins
and enter JWS by TrueLayer in the plugin search bar.
Once you installed it, you should make sure it’s active.

-
Setting the required properties.
- The last step is making sure your environment has the required properties (they are defined with a JSON object, see here). You can either add the properties in the global environments (Image 1 & 2 below) or by right-clicking on the folder and setting the properties at the folder level (Image 3 & 4 below) or a combination of both (folder level properties override global environment properties).

Global environment variables.
Folder level environment variables.
- Each one of these properties can be found in the following locations:
ENVIRONMENT_URI
- When you click an option in the dropdown, this variable will automatically set.
REQUIRE_JWS
- This must be set to true
CERTIFICATE_ID
- This is taken from the TrueLayer console, found in the settings section of the Payouts API dashboard, it is found underneath the “KID” section.
Client_ID
- This can be found in your console in the setting menu.
Client_Secret
- This can be found where you stored the client_secret.txt
file.
PRIVATE_KEY
- This is the private key that you created.
JSON does not allow line breaks, so you have to replace all the line breaks with a newline character “\n”.
Here is what a certificate looks like before you edit it
You can run this command in the terminal putting in your private key file's location after the command.
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' file_location/cert-name.pem
It should then look like this:
You can then copy and paste the returned string into the PRIVATE_KEY
value section.
You are now ready to use the endpoints! Make sure to trigger the “generate payouts token” request first. That will generate the access token the other endpoints need to work (the token is shared automatically to the other endpoints).