POST api/order/Payment/Credits/Save

Allows for the creation of a new payment from system credits for the given order. This will deduct from system credits to apply to the order.

Request Information

URI Parameters

None.

Body Parameters

The credit details to apply

CreditPaymentViewModel
NameDescriptionTypeAdditional information
OrderID

This is the orderID to apply the credit to

integer

Required

CreditAccountID

This is the credit account to apply the credits to. Often there is only a "General" account of 1

integer

Required

Amount

The payment amount to apply. This amount must be no greater than the order total or the amount available in the credit account requested.

decimal number

Required

Description

Any description that need to be given to the Payment Credit. This is Optional

string

None.

PaymentDate

Payment Date of the Payment record created, if not entered the default value is current date. This is Optional.

date

None.

Request Formats

application/xml, text/xml

Sample:
<CreditPaymentViewModel>
  <OrderID>1</OrderID>
  <CreditAccountID>2</CreditAccountID>
  <Amount>3</Amount>
  <Description>sample string 4</Description>
  <PaymentDate>01/09/2025 02:01:00</PaymentDate>
</CreditPaymentViewModel>

application/json, text/json

Sample:
{
  "OrderID": 1,
  "CreditAccountID": 2,
  "Amount": 3.0,
  "Description": "sample string 4",
  "PaymentDate": "2025-01-09T02:01:00.6947888-05:00"
}

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'FormUrlEncodedFormatter' to write type 'CreditPaymentViewModel'.

Response Information

Resource Description

ApiResultOfPaymentViewModel
NameDescriptionTypeAdditional information
Result

PaymentViewModel

None.

IsSuccessful

boolean

None.

MessageTranslationKey

string

None.

Message

string

None.

Messages

Collection of ApiResultMessage

None.

Response Formats

application/xml, text/xml, application/json, text/json

Sample:

Sample not available.