## payex-checkout-v1

# Callbacks

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:

Property | 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
}

> Note! It is highly probable that this part of the documentation will get changes in the near future.

Tags: px-custom-page-content
Created by Asbjørn Ulsberg on 2018/07/05 12:48

- Comments (0)
- Attachments (0)
- Information

# Applications

# Tips

Jump to any page in the wiki with Ctrl+G or Meta+G.
See more shortcuts.

# Need help?

If you need help with XWiki you can contact:

- Community Support
- Professional Support