Confirmation

In this tutorial you will learn what to do after the user has completed payment link successfully.

OEN example

Ecster does a HTTP POST request to the notificationURL provided in the createPaymentLink and updatePaymentLink request with the following parameters:

  • orderId
  • orderReference
  • status
  • time
  • event

You can see all order and event statuses in the API Reference section. 

Below you have an JSON example on how a OEN response look like.

POST /<your notificationURL>

Content-Type: application/json

{
  "orderId": "eYBtAD0wTZIzDWkVpGhe",
  "orderReference": "10000",
  "status": "READY"
  "time": "2019-02-07T12:27:28Z",
  "event":"CREATED"
}

What to do when you receive an OEN notification

After you have received an OEN you should always call Ecster's REST call getOrder, this way you will get the full order with current status so you can update your order in your own system. You can read all about getOrder here.

Change order reference

This function lets you update or set the parameter orderReference after an order have been processed. 

You only have to send a HTTP POST request with the orderReference you want it to be, it has no limit of how many times it can be changed.

Below you see an example:

 

PUT /rest/public/v1/orders/<internalReference>/orderReference

x-api-key: JKN675aVeMR9Mleh786FGf2ff7T1okmH6
x-merchant-key: 10569832
Content-Type: application/json

{
 "orderReference":"neworderref"
}

Next step

You have now managed to handle a confirmation of a purchase.

Next step is to integrate functions like, get, search and delete a payment links. Please continue to the Get payment link step.

Go to next step here

Request test account