Olympus PayDevelopers

Quickstart

You will create a sandbox API key, create a payment link, pay it in the sandbox, and read the payment back.

1. Create an account#

Sign up at merchant.olympuspay.co. You do not need to finish business verification to use the sandbox.

2. Create a sandbox API key#

In the dashboard open Developers, then API keys, then Create key and choose Sandbox. Copy the key when it is shown: it starts with olp_test_ and is displayed once. Store it as an environment variable, never in source control or in a browser.

export OLYMPUS_API_KEY="olp_test_..."

3. Make your first request#

Check that the key works:


curl https://merchant.olympuspay.co/api/v1/account \
  -H "Authorization: Bearer $OLYMPUS_API_KEY"

A 200 means your key is valid. A 401 means it is missing, wrong, revoked, expired or used from an IP address the key does not allow. See Authentication.


curl https://merchant.olympuspay.co/api/v1/payment-links \
  -X POST \
  -H "Authorization: Bearer $OLYMPUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Order 1001",
    "amount": 250.00,
    "currency": "BWP",
    "idempotencyKey": "order-1001"
  }'

The response contains the link's id and the payUrl to send your customer to. Running the request again with the same idempotencyKey returns the same link.

5. Pay it#

Open the payUrl in a browser. Because the link was created with a sandbox key, it shows a sandbox confirmation page instead of a real card form. Choose Succeeded or Failed. No money moves.

6. Read the payment back#

curl "https://merchant.olympuspay.co/api/v1/payments?limit=5" \
  -H "Authorization: Bearer $OLYMPUS_API_KEY"

You will see the payment with status of succeeded (or failed) and amount in minor units.

7. Receive an event instead of polling#

Register an HTTPS endpoint with POST /webhooks and Olympus Pay will call it when the payment changes state. See Webhooks, including how to verify the signature.

8. Go live#

When you are ready for real money, finish business verification and create a live key: Go live.