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)

Request

  • Endpoint: https://demo-api.frontpayment.no/api/v1/connect/orders/invoice/submit
  • Method: POST
  • Authorization: Bearer <token>

Payload

Validation Schema

Rules

Ensure your payload adheres to the following validation rules:

Field Type Description
products.*.name string Required.Required. ProductThe name.name of the product.
products.*.productId string Optional.Optional. UniqueThe identifierunique (max:ID 25of chars).the product.
products.*.quantity numeric Required.Required. Quantity of the product.
products.*.rate numeric Required.Required. UnitRate rate/price.per unit of the product.
products.*.discount numeric Optional.Optional. Discount applied.applied to the product.
products.*.tax numeric  Required.Required. Tax applied.rate must be (e.g., 0, 12, 15, 25), Unless you have other configuration unless otherwise configured.
products.*.amount numeric Required.Required. Total amount afterfor calculation.the product line item.
orderSummary.subTotal numeric Required.Required. Subtotal of all items.products before tax and discount.
orderSummary.totalTax numeric Required.Required. TotalThe tax.total tax for the order.
orderSummary.totalDiscount numeric Required.Required. Total discount.discount for the order.
orderSummary.grandTotal numeric Required.Required. Grand total.total of the order.
orderDate string Required.Required. OrderUnix datetimestamp (timestamp).for the Date of the order.
referenceNo string Optional.Optional. ReferenceAny number.reference information from your side. example: Order Uuid generated from your application.
customerReference string Optional.Optional. Customer reference.reference
orderFromstringOptional. Must be PARTNER if present.
fpgoUuidstringOptional. Must exist in `App\Models\Order`.
invoiceInterval numeric Optional.Optional Invoice interval (allowed: 0,1,2).
separateInvoices boolean Optional.Optional Whether invoices should be separated.
invoiceFeeApplicable boolean Required.Required Whether invoice fee applies.
invoiceMaturity numeric Optional.Optional Invoice maturity period.
callback.callbackUrlurlOptional. General callback URL.
callback.successstringRequired. Success callback URL.
callback.failurestringRequired. Failure callback URL.
settings.secureDetails boolean Optional.Optional Enable secure details.
orderFromstringOptional. Must be "PARTNER" if present.
fpgoUuidstringOptional. Must exist in App\Models\Order.
customerDetails.type string Required.Required Customer type (private / corporate).
customerDetails.countryCode string Required.Required CustomerCountry countrycode code.for the customer's phone number (e.g., "+47")
customerDetails.msisdn string Required.Required CustomerMobile mobileSubscriber number.MSISDN Number (phone number).
customerDetails.email email Required.Required CustomerCustomer's email address.
customerDetails.name string Required.Required Customer full name.
customerDetails.personalNumber string Required.Required Mustif customer type is private. Customer's personal identification number, must be 11 digits.
customerDetails.preferredLanguagestringOptional. Preferred language.characters.
customerDetails.organizationId string Required if corporate.customer type is corporate. Must be alphanumeric.
customerDetails.preferredLanguagestringOptional Customer preferred language. Available languages are en , no , sv , da , de. If nothing is given it will set default to no.
customerDetails.address.street string Required.Required Street address.address of the customer.
customerDetails.address.zip string Required.Required ZIPZip code.code of the customer's address.
customerDetails.address.city string Required.Required City.City of the customer's address.
customerDetails.address.country string Required.Required CountryISO Alpha-2 country code (e.g., "NO"). Custom validation IsoAlpha2Country applies.
callback.callbackUrlurlRequired The URL to which Front Payment will send updates. Must be a valid url.
callback.successurlRequired The URL to redirect to upon successful payment. Must be a valid url.
callback.failureurlRequired 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"
}

Notifications via Callback URL

Go To Notication Via Callback Url Page