Quick guide
Create an account, get a secret key, and make your first PaymentGateway API request.
This guide takes you from zero to a first API call. For the details of keys, modes and headers, see Authentication.
1. Create an account
Sign up or sign in to the Dashboard at https://dashboard.paycose.com. Your account comes with an application and the countries you operate in.

2. Switch to test mode
Turn on Test mode in the Dashboard sidebar. Everything you create while it is on — keys included — works with test data only, so no real money moves.
3. Create a secret key
Open Developer → Service Accounts and click New Key. Give the service account a name and click create. The Dashboard then shows the key pair once:
| Key | Format | Use |
|---|---|---|
| Secret key | sk_test_… | Your server sends it on every API request. |
| Publishable key | pk_test_… | The Checkout SDK uses it in the browser. |
Copy the secret key into your secret manager now — it is not shown again. If you lose it, use Roll secret key on the service account to issue a new one.
export SECRET_KEY="sk_test_..."4. Set your base URL and country
Every request goes to the same base URL and names the country you operate in:
export WALLET="https://api.paycose.com/api/v1/app1/platform/wallet"
export COUNTRY="TH"app1 is a fixed path segment; the key already identifies your account. The
country is a two-letter code your account is set up for.
5. Make your first request
List your payment intents to confirm the key works:
curl "$WALLET/payment_intents" \
-H "Authorization: Bearer ${SECRET_KEY}" \
-H "X-Country: ${COUNTRY}"You get a list back — empty on a new account. Every object in it has
"livemode": false, because the key is a test key. If something is wrong you get
an error instead; the common ones are listed under
Authentication errors.