Webhook events Copy section link Copied!

Webhook events have the following characteristics:

  • All events are sent to your server as a POST request with a JSON payload
  • Each event is sent with a specific "User-Agent" with the value "AgoraPay/1.0"
  • Should an event fail to be transmitted to your server (i.e. your endpoint didn't send a HTTP 200 response), 2 retries with 20 seconds of interval are performed


2 types of events are sent by AgoraPay:

  • Payment processing
  • Operation updates

You are free to expose a single REST endpoint URL for both events or to deploy 2 endpoint URLs, one for each type.

Operation acknowledgement Copy section link Copied!

This webhook event is sent by AgorayPay for any operation creation or change of status. Please refer to the payin operation life cycle discussion of the financial section to see all the statuses that will trigger an update notification.


The event includes the following parameters:

Field name

From version

Description

eventCode

1.0

operation (fix value)

versionNumber

1.0

Version number of the webhook

transactionId

1.0

transactionId for this payment

orderRef

1.0

The orderReference sent by the Marketplace for this payment

operationType

1.0

Type of payment

  • 1: Purchase
  • 2: Refunds
  • 4: Transfer
  • 5: SCT/SDD fund receipt
  • 6: Reload request or payout Identifiable via operationSide
  • 7: Authorisation only
  • 8: Pre-authorisation only
  • 9: Unpaid

operationStatus

1.0

Status of the transaction

  • R: registered
  • W: in the process of being cashed out
  • E: cashed
  • C: cancelled
  • S: suspended

amount

1.0

Amount of the operation

currencyCode

1.0

Currency of the transaction

operationDate

1.0

Operation date

operationMasterId

1.0

For unpaid: transactionId of the payment transaction impacted by the unpaid

Not present if initial transaction

operationRefundId

1.0

Linked transaction.

For unpaid: transactionId of the payment transaction impacted by the unpaid

TransactionCase of refund: transactionId of the refunded payment transaction

Not present if initial transaction

paymentMethodTypeId

1.0

Payment methodId

  • 1: SDD
  • 2: SCT
  • 3: Transfer
  • 4: Card
  • 5: SWIFT
  • 6: SDD B2B
  • 10: SCT Inst (Instant Payment)
  • 11: Payment Initiation

operationSide

1.0

Direction of funds

  • 1: pay in (a recharge is a payin)
  • 0: transfer
  • -1: payout

metaData

1.0

Provision of the json as provided via API by the Marketplace.

Not present if field not provided as input.

relatedMsgStatus

2.0

Additional complementary information provided to the status operation.

In addition to a C status:

  • 0: customer initiates the cancellation (or usecase of SDD: Cancellation of direct debit following receipt of an unpaid amount before clearing)
  • 200: transactions not completed by the client and canceled due to timeout
  • 201: transactions declined during acceptation process

eventStatusLabel

2.0

Message associated to relatedMsgStatus

rejectReasonCode

2.0

Will eventually be fed with information on operations, in particular on unpaid bills.

rejectReasonLabel

2.0

Will eventually be fed with information on operations, in particular on unpaid bills.

Here is a payload example you can receive in the status update notification:

JSON
Copy
Copied
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{
"eventCode": "operation",
"versionNumber": "1.0",
"transactionId": "412021",
"orderRef": "orderRef_20210307102704303",
"operationType": "7",
"operationStatus": "R",
"amount": "121.50",
"currencyCode": "EUR",
"accountNumber": "1300600000EUR01049110",
"operationDate": "20210319",
"operationMasterId": "0",
"operationRefundId": "0",
"paymentMethodTypeId": "4",
"operationSide": "1"
}
Copy
Copied