Skip to main content

Create Session for Reservation

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

Step 1: Submit Reservation

Third-party systems can create a reservation and generate a payment link by calling the following endpoint.

Endpoint:
POST https://demo-api.frontpayment.no/api/v1/connect/reservations/submit

Authentication:
This endpoint requires a Bearer Token for authorization.


Request Payload Example

{
  "customerDetails": {
    "uuid": "",
    "type": "private",
    "countryCode": "+47",
    "msisdn": "46567468",
    "email": "[email protected]",
    "name": "Nafees",
    "preferredLanguage": "en",
    "personalNumber": null,
    "organizationId": null,
    "address": {
      "street": "Dhaka",
      "zip": "3500",
      "city": "Cumilla",
      "country": "NO"
    }
  },
  "orderDate": "20 Aug, 2024",
  "dueDateForPaymentLink": "1724294524",
  "referenceNo": null,
  "customerReference": null,
  "sendOrderBy": {
    "sms": false,
    "email": false
  },
  "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,
  "submitPayment": {
    "via": "visa"
  },
  "callback": {
    "callbackUrl": "https://wp.frontpayment.no/?order_identifier=rRbl1FWZG59o&order_status=success",
    "success": "https://wp.frontpayment.no/?order_identifier=rRbl1FWZG59o&order_status=success",
    "failure": "https://frontpayment.no/?order_identifier=rRbl1FWZG59o&order_status=failed"
  },
  "settings": {
    "secureDetails": false,
    "isChargePartiallyRefundable": true
  }
}

Validation Rules

Field Type Description
customerDetailsarrayRequired. Customer details information.
customerDetails.typestringRequired. Customer type (private or corporate).
customerDetails.countryCodestringRequired. Country dialing code (e.g., +47).
customerDetails.msisdnstringRequired. Mobile phone number without country code.
customerDetails.emailemailRequired. Valid customer email address.
customerDetails.namestringRequired. Full name of the customer.
customerDetails.preferredLanguagestringRequired. Preferred language (e.g., en, no).
customerDetails.personalNumberstringOptional. Must be exactly 11 digits if provided.
customerDetails.organizationIdstringRequired if type=corporate. Alphanumeric only.
customerDetails.addressarrayRequired. Customer address details.
customerDetails.address.streetstringRequired. Street name.
customerDetails.address.zipstringRequired. Postal code.
customerDetails.address.citystringRequired. City name.
customerDetails.address.countrystringRequired. Country code (ISO).
orderDatestringRequired. Order date (validated by custom rule).
dueDateForPaymentLinkstringRequired. Timestamp for payment link validity.
referenceNostringOptional. Reference number.
customerReferencestringOptional. Customer reference ID.
sendOrderByarrayRequired. Notification preferences.
sendOrderBy.smsbooleanRequired. Whether to send order by SMS.
sendOrderBy.emailbooleanRequired. Whether to send order by email.
productsarrayRequired. List of product items.
products.*.namestringRequired. Product name.
products.*.productIdstringOptional. Product identifier (max: 25 chars).
products.*.ratenumericRequired. Product rate.
products.*.taxnumericRequired. Product tax.
products.*.amountnumericRequired. Total product amount.
orderSummary.subTotalnumericRequired. Order subtotal.
orderSummary.totalTaxnumericRequired. Total tax.
orderSummary.grandTotalnumericRequired. Grand total amount.
customerNotesstringOptional. Notes from customer.
tncstringOptional. Terms and conditions.
chargeValiditystringOptional. Validity in minutes (digits only).
submitPaymentarrayRequired. Payment submission details.
submitPayment.viastringRequired. Payment method (visa, mastercard).
callbackarrayOptional. Callback URLs.
callback.callbackUrlurlOptional. General callback URL.
callback.successurlOptional. Success redirect URL.
callback.failureurlOptional. Failure redirect URL.
settingsarrayOptional. Additional settings.
settings.secureDetailsbooleanOptional. Whether secure details are enabled.
settings.isChargePartiallyRefundablebooleanOptional. Whether partial refunds are allowed.

Example Success Response

{
  "status_code": 201,
  "status_message": "OK",
  "message": "Reservation Submitted Successfully",
  "is_data": true,
  "data": {
    "customerUuid": "CSRT3463048878",
    "reservationUuid": "RES4161996022",
    "paymentUrl": "https://v1.checkout.bambora.com/aa7ec3f47b0d45b286bcc595ab0d9613"
  }
}

Step 2: Payment Process

  • From the success response in Step 1, the user is redirected to the paymentUrl.

  • The preselected payment method (visa, mastercard, visa/dankort) will be shown, but the user can change it.

  • After successful payment:

    • The third-party system is notified via the provided callbackUrl.
    • The user is redirected to the success or failure URL provided in the request payload.

Notifications via Callback URL

The callbackUrl is an endpoint on your server that our system will call via an HTTP GET request whenever the status of the specified order changes from its initial state.

Go To Notication Via Callback Url Page