Webhooks
External Payments Webhook Documentation
Purpose
This webhook allows you to provide access to a customer who has purchased a product. If a purchase URL is specified for the product, it will be listed as available for purchase on our platform. In this case, a sessionId
will be added as a query parameter to the purchase URL, which should also be included in the webhook message.
Prerequisites
Product Reference: Ensure the product is created in the database via Backoffice → Payments → Products → NEW.
The product type should be set to EXTERNAL.
Optionally, you can add a purchase URL and a purchase management URL.
Webhook URL
Test Environment:
https://api.test.livearenasports.com/payment/webhook
Production Environment:
https://api.livearenasports.com/payment/webhook
Request Schema
Each webhook message should include a unique transactionId
to ensure idempotency and prevent duplicate transactions.
Webhook Payload
Payload with sessionId
This structure is used when a sessionId
is provided. The sessionId
links the webhook message to the purchase, product, and user.
{
"siteId": "string",
"action": "CANCEL_AT_PERIOD_END" | "CANCEL_IMMEDIATELY" | "CREATE_SUB",
"sessionId": "string",
"transactionId": "string"
"target": {
"id": "string",
"extId": "string"
}
}
siteId: Identifier for the site initiating the webhook.
action: The action taken for the subscription (e.g.,
CANCEL_AT_PERIOD_END
,CANCEL_IMMEDIATELY
,CREATE_SUB
).sessionId: Links the message to the product purchase and the user.
transactionId: Unique identifier for the transaction, used for idempotency.
target: Information about the target of the purchase (e.g., if the product relates to a specific broadcast).
Example: Payload with sessionId
curl --location --request POST 'https://api.livearenasports.com/payment/webhook' \
--header 'site-id: BACKOFFICE' \
--header 'Authorization: Bearer <YOUR-TOKEN-HERE>' \
--header 'Content-Type: application/json' \
--data-raw '{
"siteId": "COM_META",
"action": "CREATE_SUB",
"sessionId": "66f6a48661abb1356be9793e",
"transactionId": "e32865a9-dc9b-4a80-9587-2e322af84474"
}'
Payload without sessionId
If the sessionId
is not provided, you must include the product
and user
details in the webhook message.
{
"siteId": "string",
"action": "CANCEL_AT_PERIOD_END" | "CANCEL_IMMEDIATELY" | "CREATE_SUB",
"transactionId": "string"
"product": {
"id": "string",
"extId": "string"
},
"user": {
"id": "string",
"email": "string"
"firstName": "string",
"lastName": "string",
"createUser": true | false,
"kickbackGroup": {
"id": "string",
"extId": "string"
}
},
"target": {
"id": "string",
"extId": "string"
}
}
product: The product related to the transaction. Use either
id
orextId
. If both are present,id
takes precedence.user: Information about the customer. You can use either the
id
oremail
. If both are present,id
will be prioritized.target: Used if the product requires it (e.g., a pay-per-view broadcast).
Example: Payload without sessionId
curl --location --request POST 'https://api.livearenasports.com/payment/webhook' \
--header 'site-id: BACKOFFICE' \
--header 'Authorization: Bearer <YOUR-TOKEN-HERE>' \
--header 'Content-Type: application/json' \
--data-raw '{
"siteId": "COM_META",
"transactionId": "e32865a9-dc9b-4a80-9587-2e322af84474"
"action": "CREATE_SUB",
"product": {
"id": "64c639ab1dbf447d57917346",
},
"user": {
"email": "magnus@brilliantworks.se"
}
}'