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,totalAmountandcurrencyCodecan be specified directly as part of the REST endpoint.For detailed orders, the abbreviated endpoint
/orders/createcan be used andorderNumber,totalAmountandcurrencyCodecan be specified in the body together with the other detailed order parameters.Parameters taken from the URL (
orderNumber,totalAmountandcurrencyCode) will replace any parameters received in the POST body.
Request Parameters
| Property | Type | Description |
|---|---|---|
orderNumberrequired | 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" |
currencyCoderequired | 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" |
totalAmountrequired | 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 |
lineitemsrequired | 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. |
salesChanneloptional | string(0-50) | Your reference for the sales channel through which the customer is purchasing goods/services. Example: "web" |
salesLocationIdoptional | 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" |
customerconditional | 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" } } |
billTorequired | nameAndAddress | The billing name and address of the customer/company, generally the "invoice address" or "account holder" details. Example: "GATUADRESS 77" |
shipToconditional | nameAndAddress | The ship-to name and address of the recipient. Example: "GATUADRESS 77" |
orderDescriptionconditional | 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" |
purchaseReferenceconditional | string(30) | Your reference for the customer/buyer. |
merchantReferenceconditional | string(1-40) | Your reference for the order. Will be exported in the payment method settlement report. |
Response Parameters
| Property | Type | Description |
|---|---|---|
statusrequired | status | API operation status. Example: { "isSuccess": true, "errorNumber": 0, "statusKey": "SUCCESS", "statusMessage": "The operation was successful.", "errors": null, "exceptionDetails": null } |
orderIdconditional | 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" |
