Skip to content
innovorder
⌘K

Money movement

Order Payments

Retrieve and update payment records attached to orders. Each order can have one or more order payments, each representing a payment attempt or partial payment using a specific payment method.

GET/order_payments/{orderPaymentId}Get an order payment

Retrieve a single order payment by its ID. Returns the payment details including status, amount, and associated payment method.

Parameters

NameTypeRequiredDescription
orderPaymentIdintegerYesThe ID of the order payment to retrieve.

Response

json
{
  "status": 200,
  "code": "order_payment_found",
  "message": "Order payment has been successfully found.",
  "data": {
    "orderPaymentId": 34210,
    "orderId": 582901,
    "paymentMethodId": 12,
    "amount": 1250,
    "paymentStatus": "OK",
    "metadata": null,
    "createdAt": "2025-03-10T14:22:00.000Z",
    "updatedAt": "2025-03-10T14:22:05.000Z"
  }
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"order_payment_found"Machine-readable application code for the result.
messagestring"Order payment has been successfully found."Human-readable result message. Do not use this value for program logic.
dataobject{…}Endpoint-specific response payload.
data.orderPaymentIdinteger34210Identifier of the associated order payment.
data.orderIdinteger582901Identifier of the order.
data.paymentMethodIdinteger12Identifier of the associated payment method.
data.amountinteger1250The amount value.
data.paymentStatusstring"OK"The payment status value.
data.metadatanullnullAdditional metadata supplied with the response.
data.createdAtstring"2025-03-10T14:22:00.000Z"Timestamp when this resource was created.
data.updatedAtstring"2025-03-10T14:22:05.000Z"Timestamp when this resource was last updated.

PUT/order_payments/{orderPaymentId}Update an order payment

Update the metadata or payment status of an existing order payment. The paymentStatus field accepts: PENDING, OK, KO, or REFUNDED.

Parameters

NameTypeRequiredDescription
orderPaymentIdintegerYesThe ID of the order payment to update.

Request Body

json
{
  "metadata": "{\"transactionRef\":\"txn_abc123\"}",
  "paymentStatus": "OK"
}
Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
metadatastring"{\"transactionRef\":\"txn_abc123\"}"Additional metadata supplied with the response.
paymentStatusstring"OK"The payment status value.

Response

json
{
  "status": 200,
  "code": "order_payment_updated",
  "message": "Order payment has been successfully updated.",
  "data": {
    "orderPaymentId": 34210,
    "orderId": 582901,
    "paymentMethodId": 12,
    "amount": 1250,
    "paymentStatus": "OK",
    "metadata": "{\"transactionRef\":\"txn_abc123\"}",
    "createdAt": "2025-03-10T14:22:00.000Z",
    "updatedAt": "2025-03-10T14:30:12.000Z"
  }
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"order_payment_updated"Machine-readable application code for the result.
messagestring"Order payment has been successfully updated."Human-readable result message. Do not use this value for program logic.
dataobject{…}Endpoint-specific response payload.
data.orderPaymentIdinteger34210Identifier of the associated order payment.
data.orderIdinteger582901Identifier of the order.
data.paymentMethodIdinteger12Identifier of the associated payment method.
data.amountinteger1250The amount value.
data.paymentStatusstring"OK"The payment status value.
data.metadatastring"{\"transactionRef\":\"txn_abc123\"}"Additional metadata supplied with the response.
data.createdAtstring"2025-03-10T14:22:00.000Z"Timestamp when this resource was created.
data.updatedAtstring"2025-03-10T14:30:12.000Z"Timestamp when this resource was last updated.