Sandbox.payex-checkout-v1.Introduction.Callbacks - Callbacks 
Page of - last modified by Asbjørn Ulsberg on 2018/07/05 12:48 
Callbacks 

Asbjørn Ulsberg

2018/07/05 12:48
Table of Contents
Implementation details

PayEx emits callbacks on all events happening to a payment asynchronously. These callbacks can be used to update the implementers backend systems, send receipts, or any other task related to a change in a payment's status.
Events like
�	Cancel
�	Capture
�	Reversal
�	Authorize
Implementation details
The implementer registers the callback-url when posting the payment session. The URL should be unique per payment. The resource contains 4 properties:
  	  Description	
payment	The URL of the affected Payment. Perform a GET request on it to retrieve the Payment status.	
paymentNumber	The human identifiable number of the Payment, used when talking or writing about the Payment. Only the URL should be used to programmatically identify the Payment.	
transactiond	The URL of the affected transaction. Perform a GET request on it to retrieve information about the Transaction.	
transactionNumber	The human identifiable number of the Transaction, used when talking or writing about the Transaction. Only the URL should be used to programmatically identify the Transaction.	
A Credit Card Callback looks like this:
POST scheme://your.defined.host/and-path/for-recieving HTTP/1.1
Content-Type: application/json

{
      "payment": "/psp/creditcard/payments/<paymentId>",
      "paymentNumber": 123456,
      "transaction": "/psp/creditcard/payments/<paymentId>/transactions/<transactionId>",
      "transactionNumber": 12345678
}
 It is highly probable that this part of the documentation will get changes in the near future.