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).
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
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 orderRequest 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"
}
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.