PaymentService

public final class PaymentService : PaymentServiceProtocol

The payment service. Interacts with the Gini Health API to support Gini Pay Connect functionality.

  • Returns a list of payment providers.

    Declaration

    Swift

    public func paymentProviders(completion: @escaping CompletionResult<PaymentProviders>)

    Parameters

    completion

    A completion callback, returning the payment list on success

  • Returns a payment provider.

    Declaration

    Swift

    public func paymentProvider(id: String,
                                completion: @escaping CompletionResult<PaymentProvider>)

    Parameters

    id

    The the payment provider’s unique identifier

    completion

    A completion callback, returning the payment provider on success

  • Creates a payment request.

    Declaration

    Swift

    public func createPaymentRequest(sourceDocumentLocation: String?,
                                     paymentProvider: String,
                                     recipient: String,
                                     iban: String,
                                     bic: String?,
                                     amount: String,
                                     purpose: String,
                                     completion: @escaping CompletionResult<String>)

    Parameters

    sourceDocumentLocation

    The URI of the source document whenever the payment details were extracted by the Gini system beforehand (optional)

    paymentProvider

    The id of the target payment provider - see payment providers

    recipient

    The recipient of the payment

    iban

    The iban (international bank account number) of the payment recipient

    bic

    The bic (bank identifier code) for the payment

    amount

    The amount of the paymentt

    purpose

    The purpose of the payment, eg. the invoice or the customer identifier

    completion

    A completion callback, returning the payment request on success

  • Returns a payment request.

    Declaration

    Swift

    public func paymentRequest(id: String,
                               completion: @escaping CompletionResult<PaymentRequest>)

    Parameters

    id

    The the payment request’s unique identifier

    completion

    A completion callback, returning the payment request on success

  • Returns a list of payment requests.

    Declaration

    Swift

    public func paymentRequests(limit: Int? = 20,
                                offset: Int? = 0,
                                completion: @escaping CompletionResult<PaymentRequests>)

    Parameters

    limit

    The maximum number of payment requests to return (default 20), (optional)

    offset

    A starting offset (default 0), (optional)

    completion

    A completion callback, returning the request list on success

  • Undocumented

    Declaration

    Swift

    public var apiDomain: APIDomain