Hosted Checkout
'@internal'
Get session details
API to return details of a given session. <br><strong>Access Token Required scope:</strong> checkout/sessions/id/get
get/v2/checkout/sessions/{session_id}
Request
- Base URLhttps://docs.teya.com (the document declares no server; this is the origin it was published from)
- Auth
- OAuth 2Authorization codehttps://id.teya.xyz/oauth/v2/oauth-authorizeClient credentialsToken URLhttps://id.teya.xyz/oauth/v2/oauth-token
- or OAuth 2Authorization codehttps://id.teya.com/oauth/v2/oauth-authorizeClient credentialsToken URLhttps://id.teya.com/oauth/v2/oauth-token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
session_idstring uuid required
This is the id of the session that has been created and will be used to interact across different systems
Example:14411456-79c8-4d8c-8498-f01907093b83
The session id
Headers
User-Agentstring required
Example:YourCompany-Integration/1.0
Identifies your integration, for example YourCompany-Integration/1.0. Requests without a User-Agent can be blocked by our firewall before they reach the API.
Response
Session has been returned
Example response
{
"amount": {
"currency": "USD",
"value": 100
},
"billing_address": {
"city": "London",
"country": "GB",
"state": "London",
"street_address_line1": "Main Street",
"street_address_line2": "No. 1",
"street_address_line3": "Building 1",
"zipcode": "10001"
},
"business_data": {
"active": true,
"address": {
"city": "New York",
"country": "US",
"state": "NY",
"street_address_line1": "123 Main St",
"street_address_line2": "Suite 100",
"street_address_line3": "Building 1",
"zipcode": "10001"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My Business"
},
"cancel_url": "https://mywebsite.com/checkout/cart",
"customer": {
"email": "emailaddress@example.com",
"name": "John Doe",
"phone_number": "+447911123456"
},
"customer_success_email": "john.doe@example.com",
"failure_url": "https://mywebsite.com/checkout/failure",
"language": "en-GB",
"line_items": [
{
"description": "Product 1",
"quantity": 1,
"unit_price": 50
},
{
"description": "Product 2",
"quantity": 2,
"unit_price": 25
}
],
"merchant_reference": "1234567890",
"merchant_success_email": "customer@mywebsite.com",
"metadata": {
"campaign": "summer_sale",
"order_id": "12345"
},
"payment_link_id": "01960f72-872c-7894-a7da-98b0eaaf6588",
"payment_link_type": "SINGLE_USE",
"payment_status": "NONE",
"post_success_payment": "SHOW_SUCCESS_PAGE",
"required_customer_fields": [
"SHIPPING_ADDRESS",
"EMAIL",
"PHONE"
],
"session_id": "14411456-79c8-4d8c-8498-f01907093b83",
"session_status": "ACTIVE",
"source_reference_id": "1234567890",
"success_url": "https://mywebsite.com/checkout/success",
"transaction_id": "tr_72302a4d-b2f9-4663-93f8-d9260e5370c8",
"type": "SALE",
"logo_url": "https://example.cloudfront.net/stores/123/logo.png",
"checkout_custom_note": "Thank you for shopping with us!",
"privacy_policy_url": "https://mywebsite.com/privacy",
"terms_url": "https://mywebsite.com/terms"
}Changes
No recorded changes to this operation across all 1 revision of this API.