Fetch Card Authentication
GET/card_auths/:id
Retrieve a card authentication and its result once the cardholder has finished.
The result object is returned only with secret key authentication. A
publishable key may fetch the authentication for 15 minutes after creation —
for example to check the status after the cardholder is redirected back —
but result is always null on those responses.
Request
Path Parameters
ID of the card authentication to fetch.
Responses
- 200
- 401
- 403
- 404
Successful operation
- application/json
- Schema
- Example (from schema)
Schema
available— enrollment succeeded; redirect the cardholder totransaction_url.in_progress— the cardholder is completing the challenge.authenticated— completed successfully;resultis populated.failed— enrollment or authentication failed.- 1.00 SAR = 100
- 1.00 KWD = 1000
- 1 JPY = 1
Unique identifier of the card authentication.
Possible values: [initiated, available, in_progress, authenticated, failed]
Possible values: >= 100
A positive integer representing the payment amount in the smallest currency unit.
Examples:
ISO-4217 three-letter currency code.
Redirect the cardholder here to complete the challenge. null once the authentication is no longer awaiting a challenge.
card
object
Possible values: [mada, visa, master, amex, unionpay]
The scheme through which the payment is processed.
Masked card number showing only last four digits.
result
object
nullable
Populated once the authentication reaches a terminal state (authenticated or
failed). Returned only when the request is authenticated with the secret key;
publishable-key requests always receive null.
Possible values: Value must match regular expression ^\d{2}$
The Electronic Commerce Indicator (ECI).
The authentication value (CAVV / AAV), Base64 encoded.
Directory Server transaction ID.
3DS protocol version.
Possible values: [Y, A, N, U, R, C]
EMVCo transaction status.
EMVCo transaction status reason code, when provided.
Directory Server used to perform the authentication.
ACS transaction ID.
Directory Server reference number.
ACS reference number.
3DS Server transaction ID.
true if authenticated without a challenge, false otherwise.
Human-readable message, set on failures.
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "initiated",
"amount": 100,
"currency": "SAR",
"callback_url": "https://merchant.example/3ds/return",
"transaction_url": "https://api.moyasar.com/v1/card_auth/ca_2a1b.../prepare",
"card": {
"company": "mada",
"last_digits": "XXXX-XXXX-XXXX-1111"
},
"result": {
"eci": "05",
"authentication_value": "AAICCGhVkQAAACcQaCFSdYh0YUg=",
"ds_transaction_id": "f8c3a0d2-7e76-4df1-8ba4-f457386d14bf",
"version": "2.2.0",
"transaction_status": "Y",
"transaction_status_reason": "string",
"auth_scheme": "visa",
"acs_transaction_id": "002cef25-c015-4f95-bfd5-220138133161",
"ds_reference_number": "VISA.V 17 0003",
"acs_reference_number": "3DS_LOA_ACS_MOMD_020301_00793",
"three_ds_server_transaction_id": "f0d50f2f-86c4-47aa-a4e3-c81547c1f8fa",
"is_frictionless": false,
"message": "string"
},
"created_at": "2024-07-29T15:51:28.071Z"
}
Invalid authorization credentials
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [authentication_error]
Possible values: [Invalid authorization credentials]
{
"type": "authentication_error",
"message": "Invalid authorization credentials",
"errors": null
}
Invalid authorization credentials
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [api_error]
Possible values: [User not authorized]
{
"type": "api_error",
"message": "User not authorized",
"errors": null
}
Card authentication not found.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [record_not_found]
{
"type": "record_not_found",
"message": "The <object type> record you were looking for was not found.",
"errors": null
}