Create a browser session
curl --request POST \
--url https://sandbox-platform.jupico.com/v1/sessions/browser/authorize \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"subMerchantId": "jpt-sim-cs-apple"
}
'import requests
url = "https://sandbox-platform.jupico.com/v1/sessions/browser/authorize"
payload = { "subMerchantId": "jpt-sim-cs-apple" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({subMerchantId: 'jpt-sim-cs-apple'})
};
fetch('https://sandbox-platform.jupico.com/v1/sessions/browser/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://sandbox-platform.jupico.com/v1/sessions/browser/authorize';
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({subMerchantId: 'jpt-sim-cs-apple'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Session
Create a browser session
Creates a browser authorization session for the Jupico web components. Call this from your backend, then pass the returned session to the component so card or bank account data is tokenized client-side and never touches your servers.
POST
https://sandbox-platform.jupico.com
/
v1
/
sessions
/
browser
/
authorize
Create a browser session
curl --request POST \
--url https://sandbox-platform.jupico.com/v1/sessions/browser/authorize \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"subMerchantId": "jpt-sim-cs-apple"
}
'import requests
url = "https://sandbox-platform.jupico.com/v1/sessions/browser/authorize"
payload = { "subMerchantId": "jpt-sim-cs-apple" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({subMerchantId: 'jpt-sim-cs-apple'})
};
fetch('https://sandbox-platform.jupico.com/v1/sessions/browser/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://sandbox-platform.jupico.com/v1/sessions/browser/authorize';
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({subMerchantId: 'jpt-sim-cs-apple'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
The subMerchantId associated with the checkout.
Example:
"jpt-sim-cs-apple"
Response
Authorization session successfully created.
Was this page helpful?

