Direct Integration - Add Payment

The Add Payment interface is used to provide settlement information for open positions, particularly when a payment has been made outside of the online platform, such as in a brick-and-mortar store (omnichannel use case).

Report a payment

The standard use case involves reporting payments made through channels that are not automatically tracked by Accounting as a Service. This could include in-store payments, such as when a customer pays at a physical location, and the client needs to ensure that the payment is reflected in the system.

Key points: Ensure all mandatory fields are completed as per the API-Explorer definition.

General Workflow

  1. Order placement: Customer places an order online.
  2. Order submission: Client provides the order to Accounting as a Service using the Create Order interface with a payment method that is not captured by Accounting as a Service (e.g., In-Store Open Invoice).
  3. In-store payment: End-customer goes to the brick and mortar store and makes the payment there.
  4. Payment reporting to OMS: The cashier system reports the payment to the client’s Order Management System (OMS).
  5. Client reports payment: Client reports the payment to Accounting as a Service using the Add Payment interface.
  6. Booking payment-receipt: Accounting as a Service books the receipt of the payment (or partial payment).

Request Submission

To create an order, make a POST request to:

/accounting/{version}/businesses/{businessCode}/customers/{customerNumber}/orders/{orderReference}/payments
  • {businessCode}: Represents the legal entity (e.g., use "1000" in sandbox).
  • {customerNumber}: The end-customer’s unique identifier.
  • {orderReference}: The orderReference provided for the original order in the create order

Request Body Structure

Below is an example of a complete request body for reporting a payment:

POST /accounting/v1/businesses/1000/customers/TFI2021072801/orders/ODE12345678901/payments HTTP/1.1
Host: api-uat.accounting.riverty.io
X-Subscription-Key: YOUR_API_SUBSCRIPTION_TOKEN
X-Request-ID: ID239487ASF3AF2434fasdf366d //your transaction ID that needs to be used, if the data has to be send again
Content-Type: application/json
{
    "authorizedAmount": 5.00,
    "paymentProvider": "ACME Payment Services"
}

Response Handling

Make sure you received feedback to the request validation via EDI Error Sent notification. Errors related to validation or processing are returned with descriptive messages to facilitate troubleshooting.If the order could be processed without errors, a confirmation will be sent. It is important that the order has been processed correctly, or the subsequent processes will end up in errors as well. For more details: Error Handling section.