Discussions
pre_authorized_payment_tokens
For the Satispay payment method, a server-to-server call is made to the Satispay authentication service to generate a pre-authorisation token.
POST https://authservices.satispay.com/g_business/v1/pre_authorized_payment_tokens
Body
{
‘reason’: ‘GetPreauthToken’,
‘callback_url’: ‘https://magento.ilsole24ore.com/satispay/authcallback/?id={uuid}’,
‘metadata’: {
‘customer_id’: 352655,
‘redirect_url’: ‘https://magento.ilsole24ore.com/satispay/authcallback/?id={uuid}’
}
}
Response
{
‘id’: ‘3e795a46-a4ea-42ba-8267-d9427aaf516d’,
‘code_identifier’: ‘S6Y-PPT--3E795A46-A4EA-42BA-8267-D9427AAF516D’,
‘shop_uid’: ‘8db49982-109e-48fe-891c-f1f1529d8a2c’,
‘status’: ‘PENDING’,
‘reason’: ‘GetPreauthToken’,
‘callback_url’: ‘https://magento.ilsole24ore.com/satispay/authcallback/?id={uuid}’,
‘metadata’: {
‘customer_id’: 352655,
‘redirect_url’: ‘https://magento.ilsole24ore.com/satispay/authcallback/?id={uuid}’
}
}
The returned id value (UUID) represents the pre_auth_token that is subsequently included in the gateway's aggregated response (custom_info.pre_auth_token).
During order confirmation, if the user selects the Satispay payment method, the frontend:
Reads the pre_auth_token value returned previously.
Initialises the payment modal.
Loads an iframe to the Satispay authorisation endpoint.
iframe URL
https://online.satispay.com/authorize/3e795a46-a4ea-42ba-8267-d9427aaf516d?iframe=true
Where:
3e795a46-a4ea-42ba-8267-d9427aaf516d corresponds to the pre_auth_token generated via the pre_authorized_payment_tokens API.
The parameter iframe=true enables embedded rendering of the authorisation flow within the modal.
Unfortunately, an error message appears: something went wrong