cURL
curl --request POST \ --url https://api.pcxpay.com/v1/payments/bank-validation/truelayer/callback \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "code": "<string>", "state": "<string>" } '
{ "success": true, "access_token": "<string>", "refresh_token": "<string>", "expires_in": 123, "user_id": "<string>", "message": "<string>" }
Called after the TrueLayer redirect. Exchanges the code for access and refresh tokens. Use the returned access_token for account holder verification.
code
access_token
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Authorization code from TrueLayer redirect
User ID passed as state parameter
Token exchange successful