Skip to main content

Create Session for Invoice Order

This endpoint allows you to export an order as an invoice to Front Payment Go. Upon successful submission, it returns:

  • Order UUID
  • Customer UUID
  • Bank ID Verification URL (for customer identity verification)

Step 1: Create a Payment Link

To initiate an invoice order, your system will need to call the following endpoint to generate an order. For corporate customer this will give a Bank Id Verification Url and for private the order will be directly INVOICED.

Endpoint

POST https://demo-api.frontpayment.no/api/v1/connect/orders/invoice/submit

Authentication

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

Example Authorization Header: Authorization: Bearer YOUR_FRONTPAID_BEARER_TOKEN


Payload Schema

Field Type Description
products.*.name string Required. Name of the product.
products.*.productId string Optional. Unique identifier for the product. (max: 25 chars).
products.*.quantity numeric Required. Quantity of the product.
products.*.rate numeric Required. Rate per unit of the product.
products.*.discount numeric Optional. Discount applied to the product.
products.*.tax numeric Required. Tax rate (e.g., 0, 12, 15, 25). Unless you have other configuration.
products.*.amount numeric Required. Total amount for the product line item.
orderSummary.subTotal numeric Required. Subtotal of all products before tax and discount.
orderSummary.totalTax numeric Required. Total tax for the order.
orderSummary.totalDiscount numeric Required. Total discount for the order.
orderSummary.grandTotal numeric Required. Grand total of the order.
orderDate string Required. Unix timestamp for the Date of the order, which must be current or future date.
referenceNo string Optional. Reference number.
customerReference string Optional. Customer reference.
invoiceInterval numeric Optional. Invoice interval (allowed: 0,1,2).
separateInvoices boolean Optional. Whether invoices should be separated.
invoiceFeeApplicable boolean Required. Whether invoice fee applies.
invoiceMaturity numeric Optional. Invoice maturity period.
settings.secureDetails boolean Optional. Enable secure details.
customerDetails.type string Required. Customer type (private/corporate).
customerDetails.countryCode string Required. Country code for the customer's phone number (e.g., "+47").
customerDetails.msisdn string Required. Mobile Subscriber ISDN Number (phone number).
customerDetails.email email Required. Customer's email address.
customerDetails.name string Required. Customer's full name.
customerDetails.personalNumber string Required Customer's personal identification number, must be 11 characters.
customerDetails.preferredLanguage string Optional. Customer preferred language. Available languages are en,no,sv,da,de. If nothing is given it will set default to no.
customerDetails.organizationId string Required. if corporate. Must be alphanumeric.
customerDetails.address.street string Required. Street address of the customer.
customerDetails.address.zip string Required. Zip code of the customer's address.
customerDetails.address.city string Required. City of the customer's address.
customerDetails.address.country string Required. ISO Alpha-2 country code (e.g., NO). Custom validation IsoAlpha2Country applies.
callback.callbackUrl url Required The URL to which Front Payment will send updates. Must be a valid url.
callback.success url Required. The URL to redirect to upon successful payment.Must be a valid url.
callback.failure url Required. The URL to redirect to upon failed payment.Must be a valid url.

Example Request

{
  "products": [
    {
      "name": "Router",
      "productId": "R_1",
      "quantity": "1",
      "rate": 40,
      "discount": 0,
      "tax": "0",
      "amount": 40
    }
  ],
  "orderSummary": {
    "subTotal": "40",
    "totalTax": "0",
    "totalDiscount": "0.00",
    "grandTotal": "40"
  },
  "orderDate": "1755150488",
  "customerDetails": {
    "type": "private",
    "countryCode": "+47",
    "msisdn": "46567468",
    "email": "[email protected]",
    "name": "Zahidul",
    "preferredLanguage": "en",
    "personalNumber": "28038712383",
    "organizationId": "",
    "address": {
      "street": "Klosterenget 144",
      "zip": "7030",
      "city": "Trondheim",
      "country": "NO"
    }
  },
  "referenceNo": "Dhaka",
  "customerReference": "3500",
  "invoiceInterval": 0,
  "separateInvoices": true,
  "invoiceFeeApplicable": true,
  "invoiceMaturity": 10,
  "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"
  }
}

Example Success Response

{
  "status_code": 201,
  "status_message": "OK",
  "message": "orderCreatedSuccessfully",
  "is_data": true,
  "data": {
    "orderUuid": "ODR4286244937",
    "customerUuid": "CSRT3419523642",
    "bankIdUrl": "https://auth.current.bankid.no/precheck/auth?...state=eyJvcmRlclV1aWQiOiJPRFI0Mjg2MjQ0OTM3IiwiY29ubmVjdCI6InllcyJ9"
  }
}

Other Responses

Internal Error (500)
{
  "status_code": 500,
  "status_message": "Internal Dependency Error",
  "message": "Internal Error Occurred Please Try Again Later",
  "is_error": true,
  "errors": {
    "happenedAt": "String",
    "internalErrorDetails": "Array"
  }
}
Execution Exception (510)
{
  "status_code": 510,
  "status_message": "Execution Exception Occurred",
  "message": "Something Went Wrong",
  "is_error": true,
  "errors": "Array"
}

Step 2: Bank ID Verification and Agreement Signing

After successfully completing Step 1, you may receive one of two responses.

Private Customers

If you are a private customer, you will receive a bankIdUrl in the previous request response. You'll need to redirect the user to this URL, where they will verify their identity using their personal ID.

After successful verification, the user will be automatically redirected to a digital agreement for their signature. Once the agreement is signed, their order will be invoiced

Corporate Customers

If you are a corporate customer, your order will be invoiced directly, skipping the BankID verification and agreement signing steps.


Our system will also notify your system of the payment status via the callbackUrl you provided in your initial request.

Notifications via Callback URL

Go To Notication Via Callback Url Page