Authentication

All requests to the SebPay API must be authenticated using your API keys.

1

Required Headers

X-Public-Key

Account identification

This key is used to uniquely identify your account. It is visible client-side, meaning it can be seen by users of your application or website. This key is generally recognizable by a specific prefix.
This prefix is either pk_live_, indicating a key used in a real production environment, or pk_test_, indicating a key used in a test or development environment. The prefix makes it easy to distinguish the type of environment the key is associated with.

X-Secret-Key

Signing & Sensitive Actions

Used to sign requests and authorize the execution of sensitive actions within the system. This key is of paramount importance for security and must absolutely REMAIN private and confidential. Disclosing it could compromise the integrity of the system.
It is easily identifiable by its distinctive prefix, which is either sk_live_ for real production environments, or sk_test_ for test and development environments.
It is crucial to handle this key with the utmost care and ensure it is never publicly exposed.

NEVER share your secret key or include it in client-side code (frontend).

Example request

curl -X POST https://newapi.sebpay.bj/api/v1/collections \

-H "X-Public-Key: pk_live_..." \

-H "X-Secret-Key: sk_live_..." \

-H "Content-Type: application/json" \

-d '{ "amount": 1000, ... }'