Authorize an authenticated transaction

Submit a payment authorization with PCI Proxy, using 3D authentication data from /init call.

If you processed authentication only through either Secure Fields or 3D API, this API can be called to authorize the amount against your acquiring contract.

  • The service requires HTTP basic authentication. The required credentials can be found in our dashboard. Please refer to API authentication data for more information.

  • Make sure to use our 3D Secure enabled test credit cards here.

Authorize a stored card

post
Authorize

https://api.sandbox.datatrans.com/v1/transactions/{transactionId}/authorize
Authorize transactions which are alrady authenticated.
Request
Response
Request
Path Parameters
transactionId
required
integer
The transactionIdreceived after authentication was done.
Headers
Authorization
required
string
Basic MTAwMDAxMTAxMTpYMWVXNmkjJA== see Setup
Content-Type
required
string
API consumes application/json; charset=UTF-8
Body Parameters
amount
optional
integer
The amount of the transaction in the currency’s smallest unit. For example use 1000 for EUR 10.00
refno
required
string
The merchants reference number. It should be unique for each transaction.currency - ISO character code (e.g. EUR)
3D
optional
object
Refer to the official EMVCo 3D specification 2.1.0 for parameter requirements. https://www.emvco.com/emv-technologies/3d-secure/
Response
200: OK
Transaction successfully authorized
{
"acquirerAuthorizationCode": "133707"
}

In test mode, only test credit cards are allowed.

Examples

Reserve amount (authorize)
Reserve amount (authorize)

To reserve an amount, simply send an authorization request with an amount (amount=1000):

Reserve
curl -L -X POST 'https://api.sandbox.datatrans.com/v1/transactions/200515165904788120/authorize' \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Authorization: Basic MTEwMDAyMzc1NTpxWE5WczE4NVpYdWVSMGZV' \
-H 'Content-Type: text/plain' \
-d'{
"amount": "1000",
"refno": "3Dv2-Test"
}'
Response (successful)
{
"acquirerAuthorizationCode": "133808"
}