Introduction
API Reference
- Auth
- Events
- ListRates
- Lists
- Locations
- Organizations
- Payments
- TicketRates
- Tickets
- Webhook Endpoints
Webhooks
- Introduction
- Events
Checkout tickets
Checkout tickets
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/tickets/checkout \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{
"redirect_url": "https://app.yourwebpage.com/checkout/internal-id/success",
"error_url": "https://app.yourwebpage.com/checkout/internal-id/error",
"send_resourcers": true,
"metadata": {
"key": "value"
},
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"tickets": [
{
"price_id": "1234567890",
"qr_code": "ABCDE12345",
"full_name": "John Doe",
"phone": "+34666666666",
"email": "john@fourvenues.com",
"gender": "0",
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"supplement_id": "1234567890"
}
],
"warranty": true
}
]
}'
{
"data": {
"payment_id": "1234567890",
"payment_url": "https://payment.yourwebpage.com/1234567890",
"total_amount": 10,
"tickets": [
{
"_id": "5f8d0f8b9d2b3b0017b6d8a0",
"event_id": "5f8d0f8b9d2b3b0017b6d8a0",
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"qr_code": "ABCDE12345",
"status": "active",
"price": {
"_id": "1643064796675",
"name": "Early Bird",
"price": 12,
"valid_until": "2022-01-01T00:00:00.000Z",
"quantity": 0,
"fee_type": "percentage",
"fee_quantity": 10,
"includes": "1 Drink",
"additional_info": "Only valid before 2:00 am."
},
"payment_currency": "EUR",
"channel_id": "5f8d0f8b9d2b3b0017b6d8a0",
"fees": {
"organization": 1.1,
"discocil": 0.7
},
"full_name": "John Doe",
"phone": "1234567890",
"email": "john.appleseed@fourvenues.com",
"gender": 0,
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"supplement_id": "1234567890",
"price": 1
}
],
"refunded": 10,
"refunded_at": "2020-10-19T07:00:00.000Z",
"refunds": [
{
"channel_id": "5f8d0f8b9d2b3b0017b6d8a0",
"amount": 10,
"at": "2020-10-19T07:00:00.000Z"
}
],
"for": 1,
"enter": 1,
"entry_time": "2022-07-19T07:00:00.000Z",
"total_supplements": 2,
"total_fees": 1.1,
"total_price": 16.1,
"warranty": {
"total": 1,
"hours": 12
}
}
],
"conditions_changed": true
}
}
Authorizations
Body
Ticket rate id of a ticket.
"5f8d0f8b9d2b3b0017b6d8a0"
Price id of the ticket.
"1234567890"
QRCode. Optional. If not provided, it will be generated automatically.
"ABCDE12345"
Full name of a ticket. May be required depending on the settings of the ticket rate.
"John Doe"
Phone number of a ticket. May be required depending on the settings of the ticket rate.
"+34666666666"
Email of a ticket. May be required depending on the settings of the ticket rate.
"john@fourvenues.com"
0
, 1
Client's birthday.
"1990-01-01"
Client's address.
"123 Main St, New York, NY 10001"
Client's postal code.
"10001"
Client's country code. (ISO3166-2)
"ES"
Client's personal document type.
dni
, nie
, passport
, other
"dni"
Client's personal document number.
"1234567890"
Supplement's identifier.
"1234567890"
If the warranty is enabled.
URL to redirect the user after the checkout.
"https://app.yourwebpage.com/checkout/internal-id/success"
URL to redirect the user if the checkout fails.
"https://app.yourwebpage.com/checkout/internal-id/error"
If the resources (tickets in that case) should be sent via email (and Whatsapp if is enabled) by Fourvenues.
true
Metadata to be stored in the ticket. Max 1kb.
{ "key": "value" }
Response
Payment id.
"1234567890"
Payment URL.
"https://payment.yourwebpage.com/1234567890"
Total amount of the payment.
10
The unique identifier for a ticket
"5f8d0f8b9d2b3b0017b6d8a0"
Event id of a ticket
"5f8d0f8b9d2b3b0017b6d8a0"
Ticket rate id of a ticket
"5f8d0f8b9d2b3b0017b6d8a0"
QRCode of a ticket
"ABCDE12345"
Status of a ticket
processing
, active
, voided
, filled_client
, pending_payment
"active"
A ticket rate can have one or multiple prices but only one can be active at a time.
Price of the ticket.
12
Date until the price will be available.
"2022-01-01T00:00:00.000Z"
Max number of tickets that can be purchased with this price. <br>NOTE: 0 means unlimited.
0
Content the price includes.
"1 Drink"
Additional info.
"Only valid before 2:00 am."
Unique identifier for the price.
"1643064796675"
Name of the price.
"Early Bird"
Type of the fee.
percentage
, fixed
"percentage"
Quantity of the fee.
10
Currency of the payment
"EUR"
Channel id of a ticket
"5f8d0f8b9d2b3b0017b6d8a0"
Full name of a ticket
"John Doe"
Phone number of a ticket
"1234567890"
Email of a ticket
"john.appleseed@fourvenues.com"
Gender of the client.
0 = women
, 1 = men
0
Birthday of a ticket
"1990-01-01"
Address of a ticket
"123 Main St, New York, NY 10001"
Postal code of a ticket
"10001"
Country code of a ticket
"ES"
Personal document type of a ticket
dni
, nie
, passport
, other
"dni"
Personal document number of a ticket
"1234567890"
Total refunded amount of a ticket
10
Refunded date of a ticket
"2020-10-19T07:00:00.000Z"
Clients that can access with this ticket
1
Clients that have entered with this ticket
1
Entry time of the clients with this ticket
"2022-07-19T07:00:00.000Z"
Total price of the supplements
2
Total price of the fees
1.1
Total price of the ticket + all extras (supplements, fees, warranty price, etc.)
16.1
If the conditions of the ticket rate have changed. This means that the price of the ticket rate has changed and is different from the one asked by the client.
true
curl --request POST \
--url https://channels-service-alpha.fourvenues.com/tickets/checkout \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '{
"redirect_url": "https://app.yourwebpage.com/checkout/internal-id/success",
"error_url": "https://app.yourwebpage.com/checkout/internal-id/error",
"send_resourcers": true,
"metadata": {
"key": "value"
},
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"tickets": [
{
"price_id": "1234567890",
"qr_code": "ABCDE12345",
"full_name": "John Doe",
"phone": "+34666666666",
"email": "john@fourvenues.com",
"gender": "0",
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"supplement_id": "1234567890"
}
],
"warranty": true
}
]
}'
{
"data": {
"payment_id": "1234567890",
"payment_url": "https://payment.yourwebpage.com/1234567890",
"total_amount": 10,
"tickets": [
{
"_id": "5f8d0f8b9d2b3b0017b6d8a0",
"event_id": "5f8d0f8b9d2b3b0017b6d8a0",
"ticket_rate_id": "5f8d0f8b9d2b3b0017b6d8a0",
"qr_code": "ABCDE12345",
"status": "active",
"price": {
"_id": "1643064796675",
"name": "Early Bird",
"price": 12,
"valid_until": "2022-01-01T00:00:00.000Z",
"quantity": 0,
"fee_type": "percentage",
"fee_quantity": 10,
"includes": "1 Drink",
"additional_info": "Only valid before 2:00 am."
},
"payment_currency": "EUR",
"channel_id": "5f8d0f8b9d2b3b0017b6d8a0",
"fees": {
"organization": 1.1,
"discocil": 0.7
},
"full_name": "John Doe",
"phone": "1234567890",
"email": "john.appleseed@fourvenues.com",
"gender": 0,
"birthday": "1990-01-01",
"address": "123 Main St, New York, NY 10001",
"postal_code": "10001",
"country_code": "ES",
"personal_document_type": "dni",
"personal_document_number": "1234567890",
"answers": [
{
"question_id": "1234567890",
"answer": "Answer"
}
],
"supplements": [
{
"supplement_id": "1234567890",
"price": 1
}
],
"refunded": 10,
"refunded_at": "2020-10-19T07:00:00.000Z",
"refunds": [
{
"channel_id": "5f8d0f8b9d2b3b0017b6d8a0",
"amount": 10,
"at": "2020-10-19T07:00:00.000Z"
}
],
"for": 1,
"enter": 1,
"entry_time": "2022-07-19T07:00:00.000Z",
"total_supplements": 2,
"total_fees": 1.1,
"total_price": 16.1,
"warranty": {
"total": 1,
"hours": 12
}
}
],
"conditions_changed": true
}
}