Error Handling and Status Codes

Merge will return an HTTP response whenever an endpoint is invoked. All HTTP 2xx codes indicate successful processing of the request. All other response codes should be treated as a failed request.

Transactions

It is important to note that receiving and HTTP 2xx code does not mean that the transaction has been completed successfully. Transactions are processed asynchronously. Merge will notify you via a web hook when the transaction completes (or fails) See Webhooks . Until you receive the final result via web hook, you must treat the transaction as being in a pending state.

You are able to check the state of a given transaction by calling the appropriate transaction endpoint.

Request to endpoints that create transactions are idempotent - this means that you can make the request as often as you like (provided you use the same nonce). If you do - the results will always be the same. A transaction with a nonce will never be duplicated.

Status Codes

Merge returns standard HTTP response codes.

  • HTTP 2xx means that the request was successful
  • HTTP 4xx means that an error was caused by the client
  • HTTP 5xx means that an error occurred on our platform.

If a request was issued for a resource, and the resource was not found, then the API will return HTTP status 404. An example of this is:

{{baseUrl}}/recipient/:recipient_id/1234

If the recipient with ID = 1234 does not exist, the API will respond with HTTP 404.


Did this page help you?