Skip to main content

Submit Reservation

With this API endpoint, you can export reservations to Front Payment Go and get checkout URLs in return. 

Endpoint : https://demo-api.frontpayment.no/api/v1/connect/reservations/submit
Method : POST
Authorization : Bearer
Payload Validations :
'customerDetails' => 'required|array',
'customerDetails.customerUuid' => 'required|string',
'customerDetails.type' => 'required|string|in:private,corporate',
'customerDetails.countryCode' => 'required|string',
'customerDetails.msisdn' => 'required|string',
'customerDetails.email' => 'required|email',
'customerDetails.name' => 'required|string',
'customerDetails.preferredLanguage' => 'required|string',
'customerDetails.personalNumber' => 'nullable|string|size:11',
'customerDetails.organizationId' => 'required_if:customerDetails.type,corporate|nullable|string|regex:/^[a-zA-Z0-9]+$/',
'customerDetails.address' => 'required|array',
'customerDetails.address.street' => 'required|string',
'customerDetails.address.zip' => 'required|string',
'customerDetails.address.city' => 'required|string',
'customerDetails.address.country' => 'required|string|in:ISO Alpha 2',
'orderDate' => 'required|string',
'dueDateForPaymentLink' => 'required|string',
'referenceNo' => 'nullable|string',
'customerReference' => 'nullable|string',
'sendOrderBy' => 'required|array',
'sendOrderBy.sms' => 'required|boolean',
'sendOrderBy.email' => 'required|boolean',
'products' => 'required|array',
'products.*.name' => 'required|string',
'products.*.productId' => 'nullable|string',
'products.*.rate' => 'required|numeric',
'products.*.tax' => 'required|numeric|in:0,12,15,25 (Unless you have other configuration)',
'products.*.amount' => 'required|numeric',
'orderSummary.subTotal' => 'required|numeric',
'orderSummary.totalTax' => 'required|numeric',
'orderSummary.grandTotal' => 'required|numeric',
'chargeValidity' => 'nullable|string|regex:/^\d+$/',  // charge will be available for 90 days if null given
'customerNotes' => 'nullable|string',
'tnc' => 'nullable|string',
'settings' => 'sometimes|array',
'settings.isChargePartiallyRefundable' => 'sometimes|boolean'
Example Payload :
{
    "customerDetails": {
        "uuid": "",
        "type": "private",
        "countryCode": "+47",
        "msisdn": "46567468",
        "email": "[email protected]",
        "name": "Kari Nordmann",
        "preferredLanguage": "en",
        "personalNumber": null,
        "organizationId": null,
        "address": {
            "street": "Luramyrveien 65",
            "zip": "4313",
            "city": "Sandnes",
            "country": "NO"
        }
    },
    "orderDate": "17 Sep, 2023",
    "dueDateForPaymentLink": "1695041918",
    "referenceNo": null,
    "customerReference": null,
    "sendOrderBy": {
        "sms": false,
        "email": true
    },
    "products": {
        "0": {
            "name": "Test",
            "productId": null,
            "rate": 1000,
            "tax": "0",
            "amount": 1000
        }
    },
    "orderSummary": {
        "subTotal": 1000.00,
        "totalTax": 0,
        "grandTotal": 1000.00
    },
    "chargeValidity" : "55",
    "customerNotes": null,
    "tnc": null,
    "settings": {
      "isChargePartiallyRefundable": true  
    }
}

Response Structure :
{
    "status_code": 201,
    "status_message": "OK",
    "message": "Reservation Submitted Successfully",
    "is_data": true,
    "data": {
      "customerUuid":"String",
      "orderUuid": "String",
      "checkoutUrl": "String"
    }
}

{
    "status_code": 510,
    "status_message": "Execution Exception Occurred",
    "message": "Something Went Wrong",
    "is_error": true,
    "errors": "Array"
}

Example Response :
{
    "status_code": 202,
    "status_message": "OK",
    "message": "Order Submitted Successfully",
    "is_data": true,
    "data": {.
      "customerUuid":"CSRT1098785092",
      "reservationUuid": "RES3855804929",
      "checkoutUrl": "https://demo.frontpayment.no/reservations/details/RES3855804929"
    }
}