Notifications
Aera calls your server when a checkout session is completed.
When a checkout session is completed, Aera sends a notification to your server. Use it as the signal to check the payment, instead of waiting for the shopper's browser.
Where notifications go
- For one session, to the
merchantData.callbackUrlyou send in the session request. It can be absolute or relative, and must be on a domain configured for your merchant account. - If no
merchantData.callbackUrlis provided, to the notification URL configured for your merchant account.
What a notification looks like
Example notification
{
"eventType": "CHECKOUT_SESSION_COMPLETED",
"status": "0",
"pspReference": "01J9Z8X7W6V5T4S3R2Q1P0N9M8",
"merchantReference": "order-1234",
"paymentMethod": "CARD",
"paymentScheme": "VISA"
}| Field | Description |
|---|---|
eventType | What happened. CHECKOUT_SESSION_COMPLETED: the shopper finished the checkout session. |
status | The result. 0 means success. |
pspReference | The payment the notification is about. |
merchantReference | Your reference from the session request. |
paymentMethod | The payment method the shopper used, for example CARD or VIPPS. |
paymentScheme | The card scheme or payment method, for example VISA or VIPPS. |
Handle a notification
- Acknowledge the notification.
- Check that it comes from Aera: check the signature. See Signatures and security.
- Call Get payment status with the
pspReference, and update your order from the status.
Updated 4 days ago
Did this page help you?