Get Transaction
You can use this call to retrieve details of a Bancontact transaction.
Prerequisite
Get an access_token
and use it as 'Bearer' token in your request. Find more details here.
Request
GET https://api.pay.cm.com/api/v1/paymentmethods/bancontact/v1/transactions/{transactionId}
Response
{
"id": "8db1e7fa-ba8a-4189-92fd-67a20217443d",
"orderId": "8db1e7fa-ba8a-4189-92fd-67a20217443d",
"reference": "20210623130413",
"amount": 1200,
"currency": "EUR",
"description": "Order at yourdomain.tld",
"expiresAt": "2006-01-02T15:04:05Z",
"language": "nl",
"country": "BE",
"webhooks": [
{
"url": "https://yourdomain.tld/order-webhooks?purchaseId=order123",
"events": [
"FINALSTATUS"
]
},
{
"url": "https://yourdomain.tld/payment-webhooks?purchaseId=order123",
"events": [
"REFUND_STATUS"
]
},
{
"url": "https://yourdomain.tld/payment-webhooks?purchaseId=order123",
"events": [
"STATUS_CHANGE"
]
}
],
"status": "OPEN",
"action": {
"qrcode": {
"url": "https://qrbackend.tld/images/213981209381209390821.png"
},
"intent": {
"url": "https://docdata.tld/pay?order=123"
},
"redirect": {
"url": "https://checkout.tld/3ds/bancontact/v1/123"
}
},
"createdAt": "2006-01-02T15:04:05Z",
"refunds": {
"refundedAmount": 300,
"refundedPendingAmount": 100
},
"returnUrls": {
"success": "https://yourdomain.tld/order/payment-success.html",
"cancelled": "https://yourdomain.tld/order/payment-cancelled.html",
"expired": "https://yourdomain.tld/order/payment-expired.html",
"failed": "https://yourdomain.tld/order/payment-failed.html"
}
}
Parameters
Parameter | Type | Description | Constraints |
---|---|---|---|
id | String(36) | Transaction unique identifier. | |
orderId | String(36) | Unique identifier. | |
reference | String(1...255) | An identifier specified by you. If webhooks were specified in the request this identifier is added to the webhook request payload. | |
amount | Int(1...99999999) | Integer representing the amount of the checkout. Denomination in the smallest currency subunit (e.g. eurocents). | |
currency | String (ISO 4217) | Currency code. | ISO 4217 currency code. |
description | String(1...255) | Description of the transaction. | |
expiresAt | String(RFC3339) | Expiration time. | |
language | String(ISO 639-1) | Preferred language of the user interface. | |
country | String | Country of the Customer. | ISO 3166 Country Code. |
status | String | OPEN - Transaction has been created. This is the initial status.SUCCESS - Transaction successfully paid.CANCELLED - Transaction has been cancelled by your customers.EXPIRED - Transaction has not succeeded; expired.FAILURE - Transaction has not succeeded; unknown reason. | |
action | action Object | The next action to be performed by you for this transaction. If a transaction has been created (so not yet started) then qrcode action (which includes the URL of the Bancontact QR code image to be shown to your customer), and intent action (which includes the intent URL to be shared with your customer) will appear as possible actions. If the transaction has been successfully started using /paymentmethods/bancontact/v1/transactions/{transactionId}/start then only redirect action will appear. | This parameter is nullable, and it is only available while the transaction is OPEN . |
createdAt | String(RFC3339) | Creation time. | ISO 8601 date and time. |
returnUrl | String(2000) | Specifies the URL where your customers will be redirected to. | Either returnUrl or returnUrls must be specified, but not both. |
returnUrls | returnUrls Object | Specifies a URL where your customers will be redirected to per transaction status. For example, your customers will be redirected to returnUrls.success when the status of the transaction changes to SUCCESS . | Either returnUrl or returnUrls must be specified, but not both. |
Optional parameters
Response codes
HTTP status | Description |
---|---|
200 | Transaction details are successfully retrieved. |
4XX | Client error response (See message for details). This response is given when the User input was incorrect or something illegal was attempted (eg. using a service without having that service configured for the user, or not being authorized). |
5XX | Server error response (See message for details). |
Updated 5 months ago