| title | Auth And Onboarding |
|---|---|
| description | Curl examples for dashboard auth, merchant selection, and merchant onboarding. |
curl --location "$BASE_URL/auth/signup" \
--header "Content-Type: application/json" \
--data '{
"email": "[email protected]",
"password": "StrongPass#123",
"merchant_id": "merchant_demo"
}'curl --location "$BASE_URL/auth/login" \
--header "Content-Type: application/json" \
--data '{
"email": "[email protected]",
"password": "StrongPass#123"
}'Response contains a dashboard JWT:
{
"token": "eyJ...",
"user_id": "user_123",
"email": "[email protected]",
"merchant_id": "merchant_demo",
"role": "admin",
"merchants": []
}curl "$BASE_URL/auth/me" \
--header "$AUTH_HEADER"curl "$BASE_URL/auth/merchants" \
--header "$AUTH_HEADER"curl --location "$BASE_URL/auth/switch-merchant" \
--header "$AUTH_HEADER" \
--header "Content-Type: application/json" \
--data '{ "merchant_id": "merchant_demo" }'curl --location "$BASE_URL/onboarding/merchant" \
--header "$AUTH_HEADER" \
--header "Content-Type: application/json" \
--data '{ "merchant_name": "Demo Merchant" }'curl --location "$BASE_URL/auth/logout" \
--header "$AUTH_HEADER" \
--request POST