API integration keys
Integration keys are used by all of your SDKs and APIs to secure and link your payments to your business.
Securing your keys
1. Create a Yoco account
Before you can get started, you will need to create a Yoco account.
2. Fetch your keys from the Yoco Business Portal
Once you have a Yoco account, you can fetch your integration keys in the Yoco Business Portal.
To locate your keys, go to Sell Online
→ Payment Gateway
.
In total, you will receive four keys:
- set of test mode public and secret keys for testing purposes
- set of live mode public and secret keys for actual transactions
note
Secret keys start with: sk_test_ (for test mode) or sk_live_ (for live mode).
note
Public keys start with: pk_test_ (for test mode) or pk_live_ (for live mode).
Test mode
Test mode allows you to test your integration without the risk of affecting real transactions or moving actual money.
To enable test mode, use your test secret key in the Authorization
header, as seen here.
While in test mode, the processingMode
field of your Checkout will be set to test
.
This field is returned in Step 1: Create the Checkout and Step 3: Verify that the payment is successful of the Checkout lifecycle.
The value of processingMode
is determined by the API keys you use.
When attempting a test payment, it is recommended to utilise our provided test card details.
note
Your test transactions will not appear in your Sales History.
important
To test your refund integration, you will need to perform a transaction in live mode.
Further Info
Your secret key should be stored securely on your server and is used to authenticate API calls made by your server to Yoco.
caution
You should never include your secret key in your front-end code or on your website.