Pular para o conteúdo

Register enrollment device

Registers the FIDO2 / WebAuthn credential produced by navigator.credentials.create() after Enrollment device options. When the enrollment status is AUTHORISED, the link is ready for redirectless payments.

POST/api/v1/jsr/enrollments/{enrollmentId}/device

Register device

Completes device binding for a JSR enrollment with WebAuthn attestation payload.

Auth: Bearer Token

Parâmetros de path

1 campo
enrollmentId
pathstring

Enrollment id returned by Create enrollment (`data.id`).

Cabeçalhos

1 campo
x-client-ip
headerstring

End-user client IP.

Corpo da requisição

6 campos
id
bodystring

Credential id (base64url of rawId).

rawId
bodystring

Must match `id` per WebAuthn mapping.

type
bodystring

Credential type (e.g. public-key).

authenticationAttachment
bodystring

platform or cross-platform.

response
bodyobject
clientDataJSON
bodystring

Base64url clientDataJSON.

attestationObject
bodystring

Base64url attestationObject.

clientExtensionResults
bodyobject

Optional extension results from the browser.

curl --request POST \
  --url 'https://embedded-payment-manager.hml.linaob.com.br/api/v1/jsr/enrollments/enr_abc123/device' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <SEU_TOKEN>' \
  --header 'x-client-ip: 198.21.104.1' \
  --data '{
  "id": "credentialIdBase64url",
  "rawId": "credentialIdBase64url",
  "type": "public-key",
  "authenticationAttachment": "platform"
}'

Response

200Device registered; enrollment details returned.
Response body
object
  • dataobjectrequired

    EnrollmentResponse — see OpenAPI for full nested fields.

    • enrollmentIdstring

      Enrollment id.

    • creationDateTimestring

      Creation timestamp.

    • statusstringrequired

      One of AWAITING_RISK_SIGNALS, AWAITING_ACCOUNT_HOLDER_VALIDATION, AWAITING_ENROLLMENT, AUTHORISED, REJECTED, REVOKED.

    • statusUpdateDateTimestring

      Last status update.

    • permissionsstring

      e.g. PAYMENTS_INITIATE.

    • expirationDateTimestring

      Enrollment expiry.

    • enrollmentNamestring

      Friendly name.

  • messagestring

    Response message.

  • typestring

    Envelope type.

  • statusCodeinteger· nullable

    HTTP status in envelope.

200 · Device registered; enrollment details returned.
{
  "data": {
    "enrollmentId": "enr_abc123",
    "creationDateTime": "2024-06-01T12:00:00Z",
    "status": "AUTHORISED",
    "statusUpdateDateTime": "2024-06-01T12:05:00Z",
    "permissions": "PAYMENTS_INITIATE",
    "enrollmentName": "User iPhone"
  },
  "message": "OK",
  "type": "success",
  "statusCode": 200
}

Next steps