Developer Docs
Search
K

Create Customer Session

Optty widgets require a session token to verify the source the Widget is loading from, and be able to display the correct list of available Payment Methods.

Parameters

Content Type: application/json
post
https://api.qa.optty.com
/merchants/customer/sessions
Create Customer Session

Full Example

Sample Request
Sample Curl Request
Sample Response
{
"customerIdentifier":"anonymous"
}
curl -X POST "https://api.staging.optty.com/merchants/customer/sessions" \
-H "accept: application/json" \
-H "Authorization: Bearer {YOUR ACCESS TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"customerIdentifier\":\"anonymous\"}"
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkZW50aWZpZXIiOiI2NDkzZDA3NTNmYjliNzBhNGY3YzFjYjE1ZTMwYzZjMmU1ZjE5Y2FlMWE1MGJiNTllMjRkMTYwMjIyOTcyMjgzMjA4OGJhZmRiMzAwNTA5MmQ4MTdjMzNhMTUyNzQyYjExZWMyZjJmYmJkYjlmN2FkYjFjMmMyMGQ3YzhjN2RiYyIsIm1lcmNoYW50SWQiOiI0NGFkMzIxMS0yYTgzLTRiNWUtYTJlNy03ZmZlNjhlZTkyMWMiLCJpYXQiOjE2MzM5NDA2NzEsImV4cCI6MTYzNDU0NTQ3MX0.X5D3pbqMW_KbYA_SPpXAFwSD93Y60QE7i8CXF2Enw4c",
"ttl": 604800
}