Customer Account Area
SCAYLE gives you the flexibility to build the account area according to your requirements.
Depending on your needs you can combine different APIs by e.g. fetching an orderId
from the Customer Account API and using the same id to fetch the full order via the Admin API.
In the account area, customers can manage their personal, payment and order details.
Use Customer Account API endpoints to:
- Update Customer personal details ( first name, last name, BOD, gender)
- Update Customer address
- Update Customer email and phone number
- Update Customer custom data
- Update bank information for order
- Display order details
- Update payment method
Access Customer profile via Checkout Authentication API
You need to have a valid accessToken
for the current user to load the customer profile.
See the Authentication API guide for detailed information.
To use the /api/oauth/me
endpoint within your shop backend integration, the accessToken
must be used as Authorization bearer token for calls to the Checkout API.
curl --location --request GET 'https://{{tenant-space}}.checkout.api.scayle.cloud/api/oauth/me' \
--header 'Content-Type: application/json' \
--header 'X-Shop-Id: {{shopId}}' \
--header 'Authorization: Bearer {{accessToken}}'
Display a list of past orders
To display a list of past orders, you need to fetch the /api/oauth/me
endpoint as well and parse the orderSummary
property of the response. For each order in that list you can then use one of the availableAPI endpoints to fetch the order details:
- Admin API - using the application access token
- Customer Account API - using the Authentication API access token, scoped to the current customer
Change Password
Within the account section, it's typical to include a "change password" feature. To implement the Account API endpoint, set up a form that prompts users for their current and new passwords.
Check Password reset.
Use Checkout Authentication API endpoints to: