Netsuite Reconciliation for Magento

The NetSuite Reconciliation for Magento feature enables Magento merchants to connect and reconcile Paystand payments with their corresponding NetSuite records.

This reconciliation ensures that every payment captured in Magento is properly linked to the correct Invoice or Sales Order in NetSuite, enabling accurate accounting and financial reporting.

Merchants typically implement this flow using their preferred integration platform (iPaaS) such as Boomi, Celigo, Mulesoft, or Workato.
These middleware tools handle the data mapping and process orchestration — while Paystand provides the API endpoint that performs the actual reconciliation in NetSuite

API Endpoint

POST 
https://api.paystand.com/v3/netsuites/apply-payment/public

This endpoint connects an existing Paystand payment record to a NetSuite transaction (Invoice or Sales Order).
It must be invoked by your iPaaS or middleware once both the payment and the NetSuite transaction are created.

Authentication

This endpoint authenticates with your Paystand publishable key, sent in the x-publishable-key header. It is designed for server-to-server calls from your iPaaS: there is no login, session, or cookie involved, and no x-customer-id header is required. If the publishable key is missing or invalid, the endpoint returns 401.

Headers

{
 "Accept": "application/json",
 "Content-Type": "application/json",
 "x-publishable-key": "{{publishableKey}}"
}
 

Body

{
 "paymentId": "{{paymentId}}",          // string, Paystand payment ID from Magento
 "transactionId": {{transactionId}},    // number, NetSuite internal ID for the invoice or order
 "transactionType": "{{transactionType}}" // string, 'invoice' or 'salesOrder'
}
 

Requirements

  • The NetSuite Invoice or Sales Order must already exist in NetSuite before you call this endpoint.
  • The payment subtotal — the amount excluding Paystand fees — cannot exceed the remaining balance on the NetSuite Invoice or Sales Order. Overpayments are rejected.
  • The x-publishable-key value must be stored securely within your iPaaS environment and treated as a credential. No session cookie is required.
  • Ensure the Paystand account used for reconciliation matches the account processing Magento payments — otherwise, ID mapping may fail due to account conflicts.
Alert icon

Important

  • Paystand provides the reconciliation API endpoint only — merchants must use an integration platform (iPaaS) to handle orchestration and mapping.
  • The NetSuite Invoice or Sales Order must exist before reconciliation is applied. If it does not, the request is still accepted but the reconciliation will not complete.
  • This endpoint requires only the x-publishable-key header. A previous version of this article showed a connect.sid session cookie — that cookie is not used by this endpoint and should not be sent.

Implementation Notes

Example iPaaS Flow:

1. Magento captures a payment and creates a Paystand paymentId.

2. iPaaS fetches the Paystand payment data via API or webhook.

3. iPaaS retrieves the corresponding NetSuite transaction ID (Invoice or Sales Order).

4. iPaaS calls POST /v3/netsuites/apply-payment/public to link both records.

5. Once processing completes, NetSuite displays the Paystand payment as a Payment record or Customer Deposit, completing the reconciliation.

Response and Processing

A 200 response means Paystand has accepted and queued the reconciliation request. It does not mean the payment has already been applied in NetSuite — processing happens asynchronously after the response is returned.

Because of this, design your integration so that it does not treat a 200 as final confirmation:

  • Validation issues such as an overpayment, or a missing NetSuite Invoice or Sales Order, surface during asynchronous processing rather than in the API response.
  • Confirm the outcome by checking the payment in the Paystand dashboard or the resulting record in NetSuite.
  • If the payment has not settled yet — for example, a card payment still completing 3-D Secure — Paystand automatically retries until it settles. You can safely call the endpoint immediately after capture.
Tips icon

Tips

  • Validate the reconciliation flow end to end with a single low-value payment before enabling it for all orders.
  • Validate that paymentId and transactionId correspond to the same merchant account to prevent ID mismatch errors.
  • Log all API responses in your iPaaS platform to simplify troubleshooting and audit tracking.
Was this article helpful?
0 out of 0 found this helpful