This page contains information about the available parameters for the Revolut Reader iOS SDK. For detailed instructions on how to integrate the SDK, see the Revolut Reader guides.
RevolutReaderKit
object. It provides all the necessary tools for initialising the SDK and authenticating users. For more information, see: Revolut Reader guides: Initialise the SDK.RevolutCardReaderKit.shared.initialise(
clientId: "<clientId>",
returnURL: "<returnURL>",
environment: .production
)
RevolutCardReaderKit.initialise
method:
Parameter | Description | Format | Required |
---|---|---|---|
clientId | The unique identifier of the client application obtained from the Revolut Developer Portal. | String | Yes |
returnURL | The URL of your app being opened upon payment completion. | String | Yes |
environment | The environment used by the RevolutCardReaderKit . Possible values:
note Currently, only .production environment is available on the RevolutCardReaderKit . | Enum | Yes |
RevolutCardReaderKit.shared.startProfileFlow(
onResult handleResult: { result in
// This closure is where you handle the result of the profile flow.
// Depending on the result, you might update the UI, log events, or handle errors.
}
)
RevolutCardReaderKit.startProfileFlow
method:
Parameter | Description | Type | Required |
---|---|---|---|
onResult | This closure is a callback function executed when the payment operation is completed. The result parameter within this closure represents the outcome of the payment process. This callback is crucial for handling the result of the payment request. note For more information on what is returned in the callback, see: Error codes. | Closure | Yes |
let paymentDefinition = PaymentDefinition(
money: Money(
amount: 15_00,
currency: .GBP
),
description: "My first transaction",
locationId: "8d9a7125-805f-40f3-a405-bc89765db996"
)
RevolutCardReaderKit.shared.startPaymentFlow(
definition: paymentDefinition,
onResult: { result in
// This closure is where you handle the result of the payment flow.
// Depending on the result, you might update the UI, log events, or handle errors.
}
)
PaymentDefinition
parameters:
Parameter | Description | Type | Required |
---|---|---|---|
money | An instance of Money containing amount and currency information. | Class | Yes |
description | The description of the payment. | String | No |
locationId | The unique identifier of your store's location associated with the payment. | String | No |
Money
object:
Parameter | Description | Type | Required |
---|---|---|---|
amount | The amount to be paid by the customer, given in minor currency unit following the ISO 4217 standard. For example, €70.34 is represented by the value 70_34 . | Int64 | Yes |
currency | The payment currency in ISO 4217 format. Possible values
caution Specifying an unsupported currency will return an error. | Enum | Yes |
RevolutCardReaderKit.startPaymentFlow
method:
Parameter | Description | Type | Required |
---|---|---|---|
definition | The parameter refers to an instance of PaymentDefinition , which encapsulates all the necessary information required to process a payment. | Class | Yes |
onResult | This closure is a callback function executed when the payment operation is completed. The result parameter within this closure represents the outcome of the payment process. This callback is crucial for handling the result of the payment request. note For more information on what is returned in the callback, see: Error codes. | Closure | Yes |
let refundDefinition = RefundDefinition(
money: Money(
amount: 15_00,
currency: .GBP
),
description: "Refund for a macchiato",
paymentId: "<paymentId>"
)
RevolutCardReaderKit.shared.refund(
definition: refundDefinition,
onResult: { result in
// Handle the result of the refund process
// This could include updating the user interface, logging the refund, or handling errors
}
)
RefundDefinition
parameters:
Parameter | Description | Type | Required |
---|---|---|---|
money | An instance of Money containing amount and currency information. | Class | Yes |
description | The description of the refund. | String | No |
paymentId | The unique identifier of the payment that is being refunded. | String | Yes |
Money
object:
Parameter | Description | Type | Required |
---|---|---|---|
amount | The amount to be refunded to the customer, given in minor currency unit following the ISO 4217 standard. For example, €70.34 is represented by the value 70_34 . | Int64 | Yes |
currency | The refund currency in ISO 4217 format. Possible values
caution Specifying an unsupported currency will return an error. | Enum | Yes |
RevolutCardReaderKit.refund
method:
Parameter | Description | Type | Required |
---|---|---|---|
definition | The parameter refers to an instance of RefundDefinition , which encapsulates all the necessary information required to process a refund. | Class | Yes |
onResult | This closure is a callback function executed when the refund operation is completed. The result parameter within this closure represents the outcome of the refund process. This callback is crucial for handling the result of the refund request. note For more information on what is returned in the callback, see: Error codes. | Closure | Yes |