Create order creates an order in Paynova's system with a unique identifier (Order ID) which can be used in subsequent requests to intialize or authorize a payment on that order.

HTTP Request

POST /orders/create/{orderNumber}/{totalAmount}/{currencyCode}
POST /orders/create

📘

Note

For simple orders, the orderNumber, totalAmount and currencyCode can be specified directly as part of the REST endpoint.

For detailed orders, the abbreviated endpoint /orders/create can be used and orderNumber, totalAmount and currencyCode can be specified in the body together with the other detailed order parameters.

Parameters taken from the URL (orderNumber, totalAmount and currencyCode) will replace any parameters received in the POST body.

Request Parameters

PropertyTypeDescription
orderNumber
required
string(4-50)Your identifier for the order, most likely from your order management system.

Constraints:

> Must be completely unique if a credit product is selected payment method.

Example: "ORDER-123"
currencyCode
required
string(2-3)The three-letter (alpha-3) ISO currency code or currency number as per ISO 4217.

See the Currency Code page for more details.

Example: "SEK", "752"
totalAmount
required
decimalThe total amount of the order. If line items are provided, the value of this field must equal the total sum of all line items.

Constraints:

  • Please be sure to use a decimal point as the decimal separator. Commas are not supported.

  • Only two digits may be specified after the decimal point.

  • For Japanese Yuan (JPY), only whole numbers are allowed.



Example: 100.00
lineitems
required
lineitemNOTE: Line items are not supported in card or swish transactions.The line items included in this order (i.e. the items which the customer has purchased). You may include as many line items as required to specify the order.

Conditions:
> It is highly recommended that you always send in complete line item information. Several payment methods, especially invoicing methods, require complete line information and you will not be able to use these methods if lineItems are not provided.
salesChannel
optional
string(0-50)Your reference for the sales channel through which the customer is purchasing goods/services.

Example: "web"
salesLocationId
optional
string(0-50)Your identifier for the sales location. This might be a website URL, a country, a call-center location etc.

Constraints
> Only applicable for card payments.

Example: "Liljeholmen"
customer
conditional
customerInformation about the customer.

Conditions:
> Required if a credit product is selected payment method.

Example:
{ "customerId": "", "governmentId": "196006208133", "emailAddress": "[email protected]", "name": { "companyName": "", "firstName": "CHRISTOPHER", "lastName": "WILLIAMS" } }
billTo
required
nameAndAddressThe billing name and address of the customer/company, generally the "invoice address" or "account holder" details.


Example: "GATUADRESS 77"
shipTo
conditional
nameAndAddressThe ship-to name and address of the recipient.



Example: "GATUADRESS 77"
orderDescription
conditional
string(1-255)A free-text field which describes the order. This information is stored on the transaction level.

Conditions:
> Required for PayPal.

Example: "travel"
purchaseReference
conditional
string(30)Your reference for the customer/buyer.
merchantReference
conditional
string(1-40)Your reference for the order.
Will be exported in the payment method settlement report.

Response Parameters

PropertyTypeDescription
status
required
statusAPI operation status.

Example:
{ "isSuccess": true, "errorNumber": 0, "statusKey": "SUCCESS", "statusMessage": "The operation was successful.", "errors": null, "exceptionDetails": null }
orderId
conditional
guidPaynova's unique identifier for the order.

Conditions:
> This parameter will not be returned if the operation fails.

Example: "30c8d09b-28c6-4246-b4d4-a3b000e181c7"
Language