Orders | Payments

Credit (refund) a payment on an order through the payment provider.

The credit is sent to the payment provider identified by paymentMethodName, and the resulting credit transaction is added to the order's payment list. The result is returned even when the provider rejects the credit - check success and errorMessage in the response.

Use lineItemIds to credit specific order lines (for providers that support line-level refunds, and to distribute the credited amount on the order lines), or shipmentId to credit shipping cost for a specific shipment. Both can be omitted when crediting an amount only.

Sample request:

POST /api/orders/EPIC000001/CreditPayment
{
    "paymentMethodName": "Vipps",
    "transactionId": "xyz789",
    "amount": 100.0,
    "comment": "Refund for damaged item",
    "reason": "Damaged item",
    "storeId": "STORE-1",
    "lineItemIds": [ "lineItem-1" ]
}
post/api/Orders/{orderId}/CreditPayment

Request

  • Base URL: https://api.omnium.no (the document declares no server; this is the origin it was published from)
  • URL: https://api.omnium.no/api/Orders/{orderId}/CreditPayment
  • Auth: API key in header Authorization

Path parameters

orderIdstring nullable required

The ID of the order to credit. (Required)

Request body

paymentMethodNamestring nullable

Identifies the payment provider. Must match a configured provider name in Omnium. Examples: "Klarna", "Vipps", "Stripe", "Adyen", "GiftCard", "Dintero" (Required)

transactionIdstring nullable

Transaction identifier from the payment provider for the payment to credit. (Required)

invoiceNumberstring nullable

Invoice number, used by invoice-based payment providers to identify the invoice to credit.

amountnumber

The amount to credit, in the order's billing currency.

commentstring nullable

Free-text comment stored on the credit payment.

reasonstring nullable

Reason for the credit, e.g. "Return of damaged item".

storeIdstring nullable

The store or warehouse ID the credit should be attributed to.

lineItemIdsstring[] nullable

Line item IDs on the order the credit applies to. Used by providers that support line-level refunds, and to distribute the credited amount on the order lines. Leave empty when crediting an amount not tied to specific lines. Cannot be combined with Omnium.Public.Payments.Models.OmniumCreditPaymentRequest.ShipmentId.

shipmentIdstring nullable

ID of a shipment on the order, set when crediting shipping cost for a specific shipment. Cannot be combined with Omnium.Public.Payments.Models.OmniumCreditPaymentRequest.LineItemIds.

Response

The credit was processed, and the result from the payment provider is returned.

successboolean

True when the payment provider accepted the credit.

transactionIdstring nullable

Transaction identifier for the credit transaction from the payment provider.

paymentMethodNamestring nullable

The payment provider that handled the credit.

amountnumber nullable

The credited amount, in the order's billing currency.

invoiceNumberstring nullable

Invoice number for the credit, set by invoice-based payment providers.

errorMessagestring nullable

Error message from the payment provider when Omnium.Public.Payments.Models.OmniumCreditPaymentResult.Success is false.

commentstring nullable

Comment set by the payment provider about how the credit was handled, e.g. that it was refunded onto a newly issued gift card.

Changes

No recorded changes to this operation across all 1 revision of this API.