post https://example.com/orders/create/
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
andcurrencyCode
can be specified directly as part of the REST endpoint.For detailed orders, the abbreviated endpoint
/orders/create
can be used andorderNumber
,totalAmount
andcurrencyCode
can be specified in the body together with the other detailed order parameters.Parameters taken from the URL (
orderNumber
,totalAmount
andcurrencyCode
) will replace any parameters received in the POST body.
Request Parameters
Property | Type | Description |
---|---|---|
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 | decimal | The 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:
Example: 100.00 |
lineitems required | lineitem | NOTE: 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 | customer | Information 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 | nameAndAddress | The billing name and address of the customer/company, generally the "invoice address" or "account holder" details. Example: "GATUADRESS 77" |
shipTo conditional | nameAndAddress | The 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
Property | Type | Description |
---|---|---|
status required | status | API operation status. Example: { "isSuccess": true, "errorNumber": 0, "statusKey": "SUCCESS", "statusMessage": "The operation was successful.", "errors": null, "exceptionDetails": null } |
orderId conditional | guid | Paynova's unique identifier for the order. Conditions: > This parameter will not be returned if the operation fails. Example: "30c8d09b-28c6-4246-b4d4-a3b000e181c7" |