Authentication with Vouchr Services

Vouchr sets up it’s SSO session via JWT. Since Wirecard services currently do not support JWT as far as we’re aware, we’ve set up an endpoint to verify a Wirecard bearer token and create a JWT token from it that will be able to validate with Vouchr Services.

Auth Endpoint:

  • Method: POST
  • Url: https://wd-svc-dev.vouchrsdk.com/auth
  • Headers: Authorization: Bearer <wirecardToken>
  • Request:
{
	"clientId":"123456",
	"loadingNumber":"2040865170263"
}
  • Response:
{
    "idToken": "eyJhbGciOiJub25lIn0.eyJzdWIiOiIyMDQwODY1MTcwMjYzIiwiYXVkIjoidm91Y2hyIiwibmJmIjoxNTY0NzY4NTU4LCJwaG9uZV92ZXJpZmllZCI6dHJ1ZSwicGhvbmUiOiIrMzQxMTEyMjI1NTUiLCJpc3MiOiJ2b3VjaHIud2lyZWNhcmQiLCJsYXN0X25hbWUiOiJKdWFuIE1hbnVlbCIsImV4cCI6MTU2NDc3MjE1OCwiaWF0IjoxNTY0NzY4NTU4LCJmaXJzdF9uYW1lIjoiSnVhbiBNYW51ZWwiLCJqdGkiOiJkNDMyZmI1Ni05ZGQ2LTQ5ZTAtOTljZi1kYjM5NTIxNzFiYmYifQ."
}
  • Error Responses:
  • 403 - Forbidden (if authentication fails)

Using idToken to Sign in to Vouchr Services:

To use the idToken to sign into vouchr services, use

  • network: WIRECARD_JWT
  • idToken: <jwt from above>

Android:

The response above could be used in place of the getJWT method in https://docs.vouchrsdk.com/android/jwtlogin.html .

The credential can be constructed with:

val credential = Credential(networkName, JWT)

Using a level 2 token to perform actions

When using the sdk to finalize (create) or claim, the user’s l2 token should be added to the body of the create and claim requests so that it will be used just for those operations. Details will be provided in a separate Vouchr Wirecard Payments document.