Skip to main content
Base URL: https://your-domain.com/api
All endpoints on this page require Authorization: Bearer {token}.

Overview

QR codes in Doss encode a user or merchant identifier as an encrypted string. When scanned, the application decodes the string to determine the QR code type (user, standard merchant, or express merchant) and routes to the appropriate payment flow.

GET /get-user-qr-code

Returns the user’s active QR code secret (URL-encoded).

Request parameters

user_id
number
required
The authenticated user’s ID.

Response fields

status
number
200 on success, 401 if no active QR code found.
secret
string
URL-encoded QR code secret string.
curl --request GET \
  --url 'https://your-domain.com/api/get-user-qr-code?user_id=42' \
  --header 'Authorization: Bearer {token}'

POST /add-or-update-user-qr-code

Generates or refreshes the QR code for the authenticated user.

Request parameters

user_id
number
required
The authenticated user’s ID.

Response fields

status
number
200 on success.
secret
string
URL-encoded secret for the new QR code.
curl --request POST \
  --url https://your-domain.com/api/add-or-update-user-qr-code \
  --header 'Authorization: Bearer {token}' \
  --header 'Content-Type: application/json' \
  --data '{"user_id": 42}'

POST /perform-qr-code-operation

Decodes a scanned QR code and returns the merchant type and details. Use this when the user scans any QR code to determine whether it belongs to a standard or express merchant.

Request parameters

resultText
string
required
The raw QR code string scanned from the device camera.
user_id
number
required
The authenticated user’s ID.

Response fields

status
boolean | number
true on success, 404 for an invalid QR code.
userType
string
Decoded type: standard_merchant or express_merchant.
merchantId
string
Merchant ID decoded from the QR code.
merchantDefaultCurrencyCode
string
Merchant’s default currency code.
merchantPaymentAmount
string
Pre-set payment amount (standard merchant only).
message
string
Error message on failure.
curl --request POST \
  --url https://your-domain.com/api/perform-qr-code-operation \
  --header 'Authorization: Bearer {token}' \
  --header 'Content-Type: application/json' \
  --data '{"resultText": "SCANNED_QR_STRING", "user_id": 42}'

POST /send-money-request-money-perform-qr-code-operation

Decodes a user QR code for use in the send money or request money flow. Returns the receiver’s email.

Request parameters

resultText
string
required
The raw QR code string scanned from a user’s QR code.
user_id
number
required
The authenticated user’s ID.

Response fields

status
boolean | number
true on success, 404 on failure.
userType
string
user on success.
receiverEmail
string
The decoded receiver’s email address.
message
string
Error message on failure.
curl --request POST \
  --url https://your-domain.com/api/send-money-request-money-perform-qr-code-operation \
  --header 'Authorization: Bearer {token}' \
  --header 'Content-Type: application/json' \
  --data '{"resultText": "SCANNED_USER_QR", "user_id": 42}'

Build docs developers (and LLMs) love