🪄 API Reference
💳 Payment processing and transactions
Verifies that the connection to the One-CP API is established and returns the provider information. This endpoint is used for health checks and connection validation.
GET /status HTTP/1.1
Host: api.1-cp.com
Accept: */*
{
"status": "ready",
"provider": "667999d063824b596cf82155"
}
Creates a new transaction for corporate checkout processing. This endpoint accepts a complete checkout request with items, pricing, and metadata to generate a transaction ready for payment processing.
Currency of the CorporateCheckout
EUR
Title of the CorporateCheckout
Off site event
Additional notes about the CorporateCheckout. (Internal note only - not visible to the customer)
Internal note
POST /initialize HTTP/1.1
Host: api.1-cp.com
Content-Type: application/json
Accept: */*
Content-Length: 577
{
"currency": "EUR",
"items": [
{
"category": "text",
"period": {
"start": "2024-04-16T12:07:05.159Z",
"end": "2024-04-16T15:07:05.159Z"
},
"departure": "FRA",
"destination": "MUC",
"airline": "LH",
"serviceClass": "ECONOMY_CLASS",
"flightNumber": "LH441",
"fareClass": "Y"
}
],
"refIDs": {
"google-id": "667999d063824b596cf82155sdfwew334435"
},
"title": "Off site event",
"attachments": [
{
"url": "http://file_url.pdf",
"type": "INVOICE"
}
],
"note": "Internal note",
"email": {
"subject": "Your booking confirmation",
"content": "Thank you for your booking. Please find your details below.",
"recipients": [
"[email protected]"
]
}
}
{
"transactionId": "667999d063824b596cf82155"
}
Cancels items in an existing contract and processes refunds based on cancellation policies.
Features:
Partial or full cancellation support
Automatic refund calculation based on cancellation policies
Optional invoice file upload for documentation
Real-time refund processing
Cancellation Process:
Validate contract status and permissions
Calculate refundable amount based on cancellation policy
Process refund transaction
Update contract status
Generate cancellation receipt
PATCH /cancel HTTP/1.1
Host: api.1-cp.com
Content-Type: multipart/form-data
Accept: */*
Content-Length: 159
{
"contractId": "667999d063824b596cf82155",
"itemsOrder": [
0,
1
],
"amount": 1000,
"invoiceTitle": "Cancellation Invoice",
"invoiceNumber": "INV-2024-001",
"file": "binary"
}
{
"status": "SUCCESS",
"errorMessage": "error.message"
}