Initiate the authentication
This function is used to initiate the authentication. The APM platform requests the external server by providing at least a principal (PAN for example), a session ID, a chosen authentication means and information of the transaction requested for dynamic linking process. Additional information could be provided, like credential and authentication means data (challenge, OTP…) depending on which platform is in charge to generate and control the authentication. If the bank generates and controls autonomously, authenticationMeansData is not sent. Credentials field is provided only if APM has the cardholder's credentials in its local referential.
Request
- Base URLhttps://financial-services.developer.worldline.com (the document declares no server; this is the origin it was published from)
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
The bearer token. The access token is returned in response of /oauth2/token endpoint. Mandatory if OAuth2 protocol is required to secure the API.
The date and time of the request. Mandatory if OAuth2 protocol is required to secure the API.
The digest of the request, corresponding to the SHA-256 hash of the payload, encoded in Base64, prefixed by "SHA-256=". Mandatory if OAuth2 protocol is required to secure the API.
The HTTP Signature of the request, including the 4 following parameters:
- keyId: The client ID of APM platform defined during the Oauth 2.0 project;
- algorithm: The algorithm used to sign the request, corresponding to the RSA-SHA256 algorithm;
- headers: The list of headers included in the signature, separated by a space, which is currently "(request-target) date digest";
- signature: The signature of the headers value, using the chosen algorithm (rsa-sha256).
Mandatory if OAuth2 protocol using HTTP signature is required to secure the API.
The JWS Signature of the request, composed of [protected_header].[payload].[signature], where:
- [protected_header] is a base64 encoded JSON composed of parameters:
- b64: Parameter set to false;
- x5t#S256: The digest (fingerprint) of the X.509 signing certificate using SHA 256, that shall be checked against the certificate used to validate the signature;
- crit: Critical non-standard JWS header parameters (not defined in RFC 7515), set to ["sigT","sigD","b64"];
- sigT: The date and time of the signature creation, to the second, indicated in UTC (ending with Z);
- sigD: Parameter that shall contain:
- mId: Parameter set to http://uri.etsi.org/19182/HttpHeaders;
- pars: List including the following HTTP header field names: (request-target), content-type, digest;
- alg: The algorithm used to sign the request, set to RS256;
- [payload] is empty;
- [signature] is the Base64 encoded signature of protected_header concatenated with HTTP header strings.
Example of protected_header before Base64 encoding:
{
"b64": false,
"x5t#S256": "dytPpSkJYzhTdPXSWP7jhXgG4kCOWIWGiesdzkvNLzY",
"crit": [
"sigT",
"sigD",
"b64"
],
"sigT": "2023-11-26T11:26:57Z",
"sigD": {
"pars": [
"(request-target)",
"content-type",
"digest"
],
"mId": "http://uri.etsi.org/19182/HttpHeaders"
},
"alg": "RS256"
}
Example of resulting Base64 encoded protected_header (without line breaks or extra spaces):
eyJiNjQiOmZhbHNlLCJ4NXQjUzI1NiI6ImR5dFBwU2tKWXpoVGRQWFNXUDdqaFhnRzRrQ09XSVdHaWVzZHprdk5MelkiLCJjcml0IjpbInNpZ1QiLCJzaWdEIiwiYjY0Il0sInNpZ1QiOiIyMDIzLTExLTI2VDExOjI2OjU3WiIsInNpZ0QiOnsicGFycyI6WyIocmVxdWVzdC10YXJnZXQpIiwiY29udGVudC10eXBlIiwiZGlnZXN0Il0sIm1JZCI6Imh0dHA6Ly91cmkuZXRzaS5vcmcvMTkxODIvSHR0cEhlYWRlcnMifSwiYWxnIjoiUlMyNTYifQ
Example of HTTP headers:
(request-target): post /initiateAuthentication
content-type: application/json
digest: SHA-256=+xeh7JAayYPh8K13UnQCBBcniZzsyat+KDiuy8aZYdI=
Example of resulting input data for signature:
eyJiNjQiOmZhbHNlLCJ4NXQjUzI1NiI6ImR5dFBwU2tKWXpoVGRQWFNXUDdqaFhnRzRrQ09XSVdHaWVzZHprdk5MelkiLCJjcml0IjpbInNpZ1QiLCJzaWdEIiwiYjY0Il0sInNpZ1QiOiIyMDIzLTExLTI2VDExOjI2OjU3WiIsInNpZ0QiOnsicGFycyI6WyIocmVxdWVzdC10YXJnZXQpIiwiY29udGVudC10eXBlIiwiZGlnZXN0Il0sIm1JZCI6Imh0dHA6Ly91cmkuZXRzaS5vcmcvMTkxODIvSHR0cEhlYWRlcnMifSwiYWxnIjoiUlMyNTYifQ.(request-target): post /initiateAuthentication
content-type: application/json
digest: SHA-256=+xeh7JAayYPh8K13UnQCBBcniZzsyat+KDiuy8aZYdI=
Example of signed data:
Q9ZSYXJ0QWSoPBfBUR58Sqplw7BQcrcqVR6rvnqfBOvosbBLcsBjkjzi1kCF 2cJsHTJRtp6GcJmZplqRg-7_QBKQAgkUq0BGQpzZwhVYrvP0opdLEarVBrej YA05gt3qnleuS53DWmyZu9iNxhwJTYVPyXediwo3TIlSn-8XjSTZAVHa728E WK6XzRC9rEroXYPYd23iQLXetMygLaDhRT2lGhV5WvmO0wC0B6RbGiYl2zIv D0XliMP6MidX4SDY5zlzyWyFlHqX7eHpkH8xxqAsBdKb16y4IdOoRhil9yws vlzkG6-U9jmBU4y_m3mZArD22oRVXTywzFn9NUtY9w
Example of resulting JWS:
eyJiNjQiOmZhbHNlLCJ4NXQjUzI1NiI6ImR5dFBwU2tKWXpoVGRQWFNXUDdqaFhnRzRrQ09XSVdHaWVzZHprdk5MelkiLCJjcml0IjpbInNpZ1QiLCJzaWdEIiwiYjY0Il0sInNpZ1QiOiIyMDIzLTExLTI2VDExOjI2OjU3WiIsInNpZ0QiOnsicGFycyI6WyIocmVxdWVzdC10YXJnZXQpIiwiY29udGVudC10eXBlIiwiZGlnZXN0Il0sIm1JZCI6Imh0dHA6Ly91cmkuZXRzaS5vcmcvMTkxODIvSHR0cEhlYWRlcnMifSwiYWxnIjoiUlMyNTYifQ..Q9ZSYXJ0QWSoPBfBUR58Sqplw7BQcrcqVR6rvnqfBOvosbBLcsBjkjzi1kCF 2cJsHTJRtp6GcJmZplqRg-7_QBKQAgkUq0BGQpzZwhVYrvP0opdLEarVBrej YA05gt3qnleuS53DWmyZu9iNxhwJTYVPyXediwo3TIlSn-8XjSTZAVHa728E WK6XzRC9rEroXYPYd23iQLXetMygLaDhRT2lGhV5WvmO0wC0B6RbGiYl2zIv D0XliMP6MidX4SDY5zlzyWyFlHqX7eHpkH8xxqAsBdKb16y4IdOoRhil9yws vlzkG6-U9jmBU4y_m3mZArD22oRVXTywzFn9NUtY9w
Mandatory if OAuth2 protocol using JWS signature is required to secure the API."
Request body
Example request
{
"header": {
"service": "ACS_H0A",
"issuerCode": "66666",
"subIssuerCode": "66666",
"requestId": "d6156f8a-a504-48c4-8f5a-722606bd3d91",
"keyTag": "01",
"iv": "d6156f8aa50448c48f5a722606bd3d91"
},
"body": {
"principal": {
"type": "pan",
"value": "4976700000000106"
},
"expiry": {
"type": "plain",
"value": "2023-01"
},
"sessionId": "2e84b4c7-b830-4bd1-9145-fb681f0a0979",
"cardholderId": "3d6e2278-855d-4886-befe-4fbf7230fc5d",
"dynamicLinking": {
"merchant": {
"id": "123456",
"name": "merchant_çéàùöô",
"country": "250",
"url": "www.nrt.fr"
},
"transactionAmount": {
"amount": "2200",
"exponent": "2",
"currency": {
"label": "EUR",
"code": "978"
}
},
"convertedAmount": {
"amount": "2200",
"exponent": "2",
"currency": {
"label": "EUR",
"code": "978"
}
},
"transactionDate": "2025-12-23T14:18:02",
"xid": "1d1ff27f-a896-d35a-1bbc-8f5c28059736",
"binAcquirer": "700004",
"ua": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36",
"deviceChannel": "06",
"network": "VISA",
"cardType": "CREDIT",
"deviceOs": "Android",
"maskedPan": "497670xxxxxxxx15",
"maskedVPan": "471663xxxxxxxx07",
"recurringFrequency": "31",
"purchaseInstalData": "2",
"purchaseDate": "20251223141802",
"recurringAmount": {
"amount": "2200",
"exponent": "2",
"currency": {
"label": "EUR",
"code": "978"
}
}
},
"authenticationMeans": "EXTMOBAPP",
"authenticationMeansData": {
"generatedChallenges": "{\"1\":\"NNNN\",\"2\":\"MMM\"}",
"generatedOTP": "123456"
},
"credentials": {
"type": "plain",
"value": "{\"METHOD:SSN\":[{\"value\":\"[{\\\"ssn\\\":\\\"9876543210\\\"}]\"}]}"
},
"callbackURL": "tst.callback.worldline.com",
"callbackSite": "VDM",
"oobAppURLInd": "01"
},
"signature": "eyJraWQiOiJzaWduIiwidHlwIjoiSk9TRStKU09OIiwiYWxnIjoiUlMyNTYifQ..QslvRsAf7favTzmZACC6l1UbjySjezKwCIJ0T-qxWkla0GjACsp-5TzannnBoTYzpZfa9BasNVRe1UZyTKEF8ViQX_LL_XnMoDttzB15zCoKkLhgcTOqSmrUa2p_hPOTnmL40TAnlykqNA0MlOQ9nox3K7a-rlfAG4FVXypyaHN71rCBfMQiw5eY-57e3DEdcjDAIWMxKh2zaM4HZ43K2fc1DQHGB-k9aTljOZAEhe6D7dgTYV0EGAHzRw51x15xnPD7_z-sJGpun9iVZpf8fHu9dTn5lhMChQvEBqElxWpm6fET7Izm8hqMa1oUkf2l5ue9h-WotzIbzE4PQuLOxw"
}Response
Initiate response.
Example response
{
"header": {
"service": "ACS_H0A",
"issuerCode": "66666",
"subIssuerCode": "66666",
"requestId": "d6156f8a-a504-48c4-8f5a-722606bd3d91",
"keyTag": "01",
"iv": "d6156f8aa50448c48f5a722606bd3d91"
},
"body": {
"authenticationMeansData": {
"generatedChallenges": "{\"1\":\"NNNN\",\"2\":\"MMM\"}",
"generatedOTP": "123456"
},
"trialLeft": 2,
"transactionId": "3840000010b96e4ef00e",
"devices": [
{
"id": "1820b59376fed03ddab5efcc5353bdc5",
"value": "061xxxxx78"
}
]
},
"signature": "eyJraWQiOiJzaWduIiwidHlwIjoiSk9TRStKU09OIiwiYWxnIjoiUlMyNTYifQ..QslvRsAf7favTzmZACC6l1UbjySjezKwCIJ0T-qxWkla0GjACsp-5TzannnBoTYzpZfa9BasNVRe1UZyTKEF8ViQX_LL_XnMoDttzB15zCoKkLhgcTOqSmrUa2p_hPOTnmL40TAnlykqNA0MlOQ9nox3K7a-rlfAG4FVXypyaHN71rCBfMQiw5eY-57e3DEdcjDAIWMxKh2zaM4HZ43K2fc1DQHGB-k9aTljOZAEhe6D7dgTYV0EGAHzRw51x15xnPD7_z-sJGpun9iVZpf8fHu9dTn5lhMChQvEBqElxWpm6fET7Izm8hqMa1oUkf2l5ue9h-WotzIbzE4PQuLOxw"
}Changes
No recorded changes to this operation across all 1 revision of this API.