Skip to content

@mbanq/core-sdk-js v0.50.0


@mbanq/core-sdk-js / commands / GetCardAuthorizationById

Function: GetCardAuthorizationById()

GetCardAuthorizationById(params): Command<{ params: { associations?: "notes" | "media"; authorizationId: number; cardToken: string; }; }, { account?: { accountToken: string; cardToken: string; }; accountBalance: number; amount: number; amountDetails?: { cashBackAmount: number; exchangeRate: number; feeAmount: number; localCurrency: string; localCurrencyAmount: number; localSurchargeAmt: number; }; authType: string; availableBalance: number; avsData: { address: string; zip: string; }; card?: { accountId: number; activatedAt?: { date: number[]; time: { hour: number; minute: number; nano: number; second: number; }; }; atmWithdrawalsEnabled: boolean; businessCardIDEnabled: boolean; cardType: string; contactlessPaymentEnabled: boolean; digitalFirst: boolean; embossedNames: string[]; expiresOn: number[]; fulfillmentStatus: string; id: number; internationalPaymentsEnabled: boolean; network: string; onlinePaymentEnabled: boolean; physicalCardActivated: boolean; posPaymentEnabled: boolean; primaryAccountNumber: string; productId: number; registeredOn: number[]; status: string; token: string; virtual: boolean; }; clearedAmount: number; createdAt: string; currency: string; emv?: { is_emv: boolean; }; errorDetails?: Record<string, string[]>; executionCode: string; executionMessage: string; expiryDate: number[]; externalAuthId: string; externalCardId?: string; externalOriginalAuthId: string; flag: string; gatewayToken?: string; id: number; incremental: boolean; internalId: string; international: boolean; isEcommerce?: boolean; media?: Record<string, any>; merchant: { country: string; description: string; mcc: string; merchantId: string; postalcode: string; }; network?: string; pinCapability?: string; rawAuthorizationDetails?: { account: { account_status: string; cad: number; card_status: string; expiration_date: string; merchant_supplied_expiration_date: string; pan: string; prn: string; xid: number; }; amounts: { amt_til_limit: string; available_funds: string; billing_currency: string; billing_currency_amount: string; cashback_amount: string; currency: string; exchange_rate: string; fee_amount: string; local_currency: string; local_currency_amount: string; trans_amount: string; upcharge_amount: string; }; auth_id: string; auth_type: string; avs_data: { address: string; zip: string; }; digital_payment_data: Record<string, any>; ecommerce: { is_ecommerce: boolean; merchant_asserts_authenticated: boolean; merchant_asserts_authentication_attempted: boolean; merchant_asserts_data_protection: boolean; raw_eci: string; }; eligible_for_balance_return: boolean; emv: { is_emv: boolean; }; entry_type: string; id: string; international: boolean; mcc: number; merchant: { acquirer_id: string; merchant_country: string; merchant_description: string; merchant_id: string; merchant_postal_code: string; merchant_state: string; terminal_id: string; }; mti: string; network: string; original_id: string; partial_supported: boolean; pin_entry_capability: string; response_code: string; response_code_objects: Record<string, string[]>; risk_code: string; risk_score: string; subnetwork: string; timestamp: string; transaction: { cardholder_present: string; recurring: string; transaction_initiator_code: string; }; transaction_type: string; validation_results: { aav: string; arqc: string; avs_result: string; cvv1: string; cvv2: string; cvv3: string; offline_pin: string; pin: string; }; version: string; }; releasedAt?: string; returnBalance: boolean; riskScore?: string; settledAmount: number; status: string; transaction: { cardHolderPresent: string; entryType: string; recurring: string; validationResults: { aav: string; arqc: string; avsResult: string; cvv1: string; cvv2: string; cvv3: string; offlinePin: string; pin: string; }; }; transactionType: string; }>

Defined in: src/commands/rest/card.ts:967

Get Card Authorization By Id

Retrieves detailed information about a specific card authorization by its unique identifier. This endpoint allows you to fetch all relevant details related to a card authorization, including the transaction type, amount, status, and associated merchant information.

It is useful for monitoring and managing card authorizations effectively.

Parameters

params

Request parameters including card token, authorization ID, and optional associations

associations?

"notes" | "media" = ...

authorizationId

number = ...

cardToken

string = ...

Returns

Command<{ params: { associations?: "notes" | "media"; authorizationId: number; cardToken: string; }; }, { account?: { accountToken: string; cardToken: string; }; accountBalance: number; amount: number; amountDetails?: { cashBackAmount: number; exchangeRate: number; feeAmount: number; localCurrency: string; localCurrencyAmount: number; localSurchargeAmt: number; }; authType: string; availableBalance: number; avsData: { address: string; zip: string; }; card?: { accountId: number; activatedAt?: { date: number[]; time: { hour: number; minute: number; nano: number; second: number; }; }; atmWithdrawalsEnabled: boolean; businessCardIDEnabled: boolean; cardType: string; contactlessPaymentEnabled: boolean; digitalFirst: boolean; embossedNames: string[]; expiresOn: number[]; fulfillmentStatus: string; id: number; internationalPaymentsEnabled: boolean; network: string; onlinePaymentEnabled: boolean; physicalCardActivated: boolean; posPaymentEnabled: boolean; primaryAccountNumber: string; productId: number; registeredOn: number[]; status: string; token: string; virtual: boolean; }; clearedAmount: number; createdAt: string; currency: string; emv?: { is_emv: boolean; }; errorDetails?: Record<string, string[]>; executionCode: string; executionMessage: string; expiryDate: number[]; externalAuthId: string; externalCardId?: string; externalOriginalAuthId: string; flag: string; gatewayToken?: string; id: number; incremental: boolean; internalId: string; international: boolean; isEcommerce?: boolean; media?: Record<string, any>; merchant: { country: string; description: string; mcc: string; merchantId: string; postalcode: string; }; network?: string; pinCapability?: string; rawAuthorizationDetails?: { account: { account_status: string; cad: number; card_status: string; expiration_date: string; merchant_supplied_expiration_date: string; pan: string; prn: string; xid: number; }; amounts: { amt_til_limit: string; available_funds: string; billing_currency: string; billing_currency_amount: string; cashback_amount: string; currency: string; exchange_rate: string; fee_amount: string; local_currency: string; local_currency_amount: string; trans_amount: string; upcharge_amount: string; }; auth_id: string; auth_type: string; avs_data: { address: string; zip: string; }; digital_payment_data: Record<string, any>; ecommerce: { is_ecommerce: boolean; merchant_asserts_authenticated: boolean; merchant_asserts_authentication_attempted: boolean; merchant_asserts_data_protection: boolean; raw_eci: string; }; eligible_for_balance_return: boolean; emv: { is_emv: boolean; }; entry_type: string; id: string; international: boolean; mcc: number; merchant: { acquirer_id: string; merchant_country: string; merchant_description: string; merchant_id: string; merchant_postal_code: string; merchant_state: string; terminal_id: string; }; mti: string; network: string; original_id: string; partial_supported: boolean; pin_entry_capability: string; response_code: string; response_code_objects: Record<string, string[]>; risk_code: string; risk_score: string; subnetwork: string; timestamp: string; transaction: { cardholder_present: string; recurring: string; transaction_initiator_code: string; }; transaction_type: string; validation_results: { aav: string; arqc: string; avs_result: string; cvv1: string; cvv2: string; cvv3: string; offline_pin: string; pin: string; }; version: string; }; releasedAt?: string; returnBalance: boolean; riskScore?: string; settledAmount: number; status: string; transaction: { cardHolderPresent: string; entryType: string; recurring: string; validationResults: { aav: string; arqc: string; avsResult: string; cvv1: string; cvv2: string; cvv3: string; offlinePin: string; pin: string; }; }; transactionType: string; }>

Command object that executes the API request

Example

typescript
const command = GetCardAuthorizationById({
  cardToken: '2586c4ba-1254-41ae-b7b8-dcb81d7a04dd',
  authorizationId: 6,
  associations: 'notes'
});
const result = await client.request(command);
console.log(result.executionMessage);
console.log(result.merchant.description);

Released under the MIT License.