# Create a payment transaction

Endpoint: POST /orders/{direction}/{orderID}/payments/{paymentID}/transactions
Version: 1.0.447.36344
Security: OAuth2

## Path parameters:

  - `direction` (string, required)
    Direction of the order, from the current user's perspective.
    Enum: "Incoming", "Outgoing", "All"

  - `orderID` (string, required)
    ID of the order.

  - `paymentID` (string, required)
    ID of the payment.

## Request fields (application/json):

  - `Type` (string, required)

  - `DateExecuted` (string, required)
    Example: "2018-01-01T00:00:00-06:00"

  - `ID` (string)

  - `Currency` (string)
    Usually the same as Payment.Currency, but can be different. A marketplace owner may capture funds from the buyer user in one currency and process a payout to the seller in another.

  - `Amount` (number)
    Usually the same as Payment.Amount, but can be different. A charge might have a subsequent partial credit, for example.

  - `Succeeded` (boolean)

  - `ResultCode` (string)

  - `ResultMessage` (string)

  - `xp` (object)
    Example: {}

## Response 201 fields (application/json):

  - `ID` (string)

  - `Type` (string)
    Enum: "PurchaseOrder", "CreditCard", "SpendingAccount"

  - `DateCreated` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `CreditCardID` (string)
    Only writeable on create.

  - `SpendingAccountID` (string)
    Only writeable on create.

  - `Description` (string)

  - `Currency` (string)
    Inherited from order.

  - `Amount` (number)
    If null, payment applies to order total (or total of specific line items, if set), less any other payments where Amount is set. Value can only be negative if processing a payment for an order return.

  - `Accepted` (boolean)
    All payments must be Accepted to submit an order. This property should be updated after authorizing or capturing the payment in your middleware by a user with the elevated OrderAdmin role.

  - `OrderReturnID` (string)
    Used to indicate this payment is associated with an order return.

  - `xp` (object)
    Example: {}

  - `Transactions` (array)
    Example: [{"ID":"","Type":"","DateExecuted":"2018-01-01T00:00:00-06:00","Currency":"","Amount":0,"Succeeded":false,"ResultCode":"","ResultMessage":"","xp":{}}]

  - `Transactions.ID` (string)

  - `Transactions.Type` (string)

  - `Transactions.DateExecuted` (string)
    Example: "2018-01-01T00:00:00-06:00"

  - `Transactions.Currency` (string)
    Usually the same as Payment.Currency, but can be different. A marketplace owner may capture funds from the buyer user in one currency and process a payout to the seller in another.

  - `Transactions.Amount` (number)
    Usually the same as Payment.Amount, but can be different. A charge might have a subsequent partial credit, for example.

  - `Transactions.Succeeded` (boolean)

  - `Transactions.ResultCode` (string)

  - `Transactions.ResultMessage` (string)

  - `Transactions.xp` (object)
    Example: {}

## Response 4XX fields (application/json):

  - `StatusCode` (integer)
    Example: "404"

  - `ErrorCode` (string)
    Example: "NotFoundError"

  - `Message` (string)
    Example: "Object not found"

  - `Data` (object)
    Example: {"ObjectType":"","ObjectID":""}


