Skip to main content

Authorization History

Introduction

The Authorization history service allows retrieving customer's prepaid card authorizations and reviewing their details.

Key Features

  • Retrieve a list of past prepaid card authorizations.
  • View details of a specific authorization.

Prerequisites

Before integrating the Authorization History Service, ensure you have:

  • A valid Paysafe account with appropriate permissions.
  • Set up instructions for Paysafe SDK Android or iOS.

To get started, initialize the AuthorizationHistoryService instance in your app as shown below:

import com.paysafe.wallet.android.core.wallet.Wallet

val authorizationHistoryService = Wallet.getInstance().getAuthorizationHistoryService()

Functionalities

Get Authorization History

Use getAuthorizationHistory method to retrieve a list of all user authorizations. Configure the filtering and pagination by providing an AuthorizationHistoryParameters object.

The result is an AuthorizationList object containing a list of Authorization objects and a PagingResultMeta object, used for pagination implementation.

val parameters = AuthorizationHistoryParameters(
accountId = "1234567890",
limit = null,
offset = null, // adjust the offset to the desired starting position
startDate = null,
endDate = null,
status = null,
cardId = null
)

val authorizationList = authorizationHistoryService.getAuthorizationHistory(parameters)

Get Single Authorization

Use getAuthorization method to retrieve a specific user authorization by ID. The result is an Authorization object, containing amounts,fees, creation time, challenge type and other various authorization details.

val authorizationId = "1234567890"

val authorization = authorizationHistoryService.getAuthorization(authorizationId)