Authentication
Every request uses HTTP Basic authentication, with your merchant ID as the username and your secret as the password. To give access to something you trust less than your own backend, generate a secret that expires after a set time, only works for one session, or only allows the operations you list.
- Generate a secret:
POST /v3/auth
Generate a secret
POST /v3/auth
Section: Authentication. Base URLs: Playground https://playground-api.briqpay.com, Production https://api.briqpay.com. Auth: HTTP Basic.
Optional: See the Authentication guide for more information.
Request body
lifetime(object): Define how long this secret should be valid for.unit(string, one of:"second","minute","hour","day", default"hour")count(integer, default24)
scopes(object)sessionId(string): Optional: Scope this secret to only be valid for a specific session.tokenId(string): Optional: Scope this secret to only be valid for a specific tokenized payment method.operations(array of string): Optional: Define which operations this secret can be used for.
Request examples
Advanced
curl -X POST 'https://playground-api.briqpay.com/v3/auth' \
-H 'Authorization: Basic <base64(merchantId:secret)>' \
-H 'Content-Type: application/json' \
-d '{
"lifetime": {
"unit": "hour",
"count": 24
},
"scopes": {
"sessionId": "c366f6fc-2757-43e2-bc50-2b65f57f60a1",
"operations": [
"read_session"
]
}
}'
Session
curl -X POST 'https://playground-api.briqpay.com/v3/auth' \
-H 'Authorization: Basic <base64(merchantId:secret)>' \
-H 'Content-Type: application/json' \
-d '{
"scopes": {
"sessionId": "c366f6fc-2757-43e2-bc50-2b65f57f60a1"
}
}'
Operations
curl -X POST 'https://playground-api.briqpay.com/v3/auth' \
-H 'Authorization: Basic <base64(merchantId:secret)>' \
-H 'Content-Type: application/json' \
-d '{
"scopes": {
"operations": [
"read_session"
]
}
}'
Lifetime
curl -X POST 'https://playground-api.briqpay.com/v3/auth' \
-H 'Authorization: Basic <base64(merchantId:secret)>' \
-H 'Content-Type: application/json' \
-d '{
"lifetime": {
"unit": "hour",
"count": 24
}
}'
Responses
201
secret(string)expiresAt(string)
400
error(object)code(string, one of:"INVALID_DATA","UNKNOWN")message(string)
403
error(object)code(string, one of:"INVALID_CREDENTIALS","INVALID_API_KEY","AUTH_SECRET_EXPIRED")message(string)
404
error(object)code(string, one of:"SESSION_NOT_FOUND")message(string)
For AI tools: this page as Markdown, llms.txt (every page as Markdown) and the OpenAPI spec.