Skip to main content

Submit Reservation

This API allows third-party systems to create reservations and redirect customers to a checkout page for completing payments.

Step 1: Submit Reservation

Endpoint


POST [https://demo-api.frontpayment.no/api/v1/connect/reservations/submit](https://demo-api.frontpayment.no/api/v1/connect/reservations/submit)

Authentication

This endpoint requires a Bearer Token for authentication. You will need to obtain this token from Front Payment and include it in the Authorization header of your request.

Example Authorization Header: Authorization: Bearer YOUR_FRONTPAID_BEARER_TOKEN

Request Payload

{
  "customerDetails": {
    "uuid": "",
    "type": "private",
    "countryCode": "+880",
    "msisdn": "1724313009",
    "email": "[email protected]",
    "name": "Nafees",
    "preferredLanguage": "en",
    "personalNumber": "19635464524",
    "organizationId": null,
    "address": {
      "street": "Dhaka",
      "zip": "3500",
      "city": "Cumilla",
      "country": "NO"
    }
  },
  "orderDate": "03 Sep, 2025",
  "dueDateForPaymentLink": "1756871295",
  "referenceNo": null,
  "customerReference": null,
  "sendOrderBy": {
    "sms": false,
    "email": true
  },
  "products": {
    "0": {
      "name": "Test",
      "productId": null,
      "rate": 1,
      "tax": "0",
      "amount": 1
    }
  },
  "orderSummary": {
    "subTotal": 1,
    "totalTax": 0,
    "grandTotal": 1
  },
  "chargeValidity": "55",
  "customerNotes": null,
  "tnc": null,
  "settings": {
    "secureDetails": false,
    "isChargePartiallyRefundable": false
  },
  "callback": {
    "callbackUrl": "https://wp.frontpayment.no"
  }
}

Validation Rules

Field Type Description
customerDetailsarrayRequired. Customer details information.
customerDetails.typestringRequired. Customer type (private or corporate).
customerDetails.countryCodestringRequired. Country dialing code (e.g., +880).
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 format).
orderDatestringRequired. Reservation order date.
dueDateForPaymentLinkstringRequired. Expiry timestamp for payment link.
referenceNostringOptional. Internal reference number.
customerReferencestringOptional. Customer’s reference number.
sendOrderByarrayRequired. Defines communication channels (SMS, email).
sendOrderBy.smsbooleanRequired. Whether to send via SMS.
sendOrderBy.emailbooleanRequired. Whether to send via Email.
productsarrayRequired. List of products in the order.
products.*.namestringRequired. Product name.
products.*.productIdstringOptional. Product ID (max 25 chars).
products.*.ratenumericRequired. Unit rate.
products.*.taxnumericRequired. Tax value.
products.*.amountnumericRequired. Quantity of product.
orderSummary.subTotalnumericRequired. Subtotal of products.
orderSummary.totalTaxnumericRequired. Total tax amount.
orderSummary.grandTotalnumericRequired. Final payable amount.
customerNotesstringOptional. Customer-provided notes.
tncstringOptional. Terms & Conditions.
chargeValiditystringOptional. Must be numeric string.
settingsarrayOptional. Additional settings.
settings.secureDetailsbooleanOptional. Indicates secure details requirement.
settings.isChargePartiallyRefundablebooleanOptional. Whether partial refunds are allowed.
callbackarrayOptional. Callback configuration.
callback.callbackUrlurlOptional. URL to receive payment notifications.
---

Example Success Response

{
  "status_code": 201,
  "status_message": "OK",
  "message": "Reservation Submitted Successfully",
  "is_data": true,
  "data": {
    "customerUuid": "CSRT1358046874",
    "reservationUuid": "RES1943140879",
    "checkoutUrl": "https://stg.frontpayment.no/reservations/details/RES1943140879"
  }
}

Step 2: Redirect to Checkout

After receiving a successful response, the customer should be redirected to the checkoutUrl provided. At checkout, the customer can choose from supported payment methods:

  • Vipps
  • Google Pay
  • Visa
  • Mastercard

Once the payment is completed successfully, the user will be redirected to a success page.


Step 3: Callback Notification

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