DigetPay

object DigetPay

Public entry point of the DigetPay SDK.

Typical usage:

// once, e.g. in Application.onCreate()
DigetPay.initialize(context, DigetPayConfig(apiKey = "...", environment = Environment.SANDBOX))

// whenever the user pays
DigetPay.checkout(activity, request, callback)

Functions

Link copied to clipboard
fun capture(paymentId: String, amount: Double, callback: OperationCallback<TransactionResult>)

Captures (settles) a previously authorized payment. Use after a successful authorization (CardPaymentRequest.auth = true).

Link copied to clipboard
fun checkout(activity: Activity, request: CheckoutRequest, callback: PaymentCallback)

Starts a hosted checkout: creates the session, opens the payment screen and reports the outcome to callback. Exactly one callback method runs, on the main thread.

Link copied to clipboard

Lists merchant-wide POS transactions across all linked terminals.

fun getMerchantTransactions(page: Int, pageSize: Int, dateFrom: String?, dateTo: String?, status: String?, callback: OperationCallback<MerchantTransactionsResult>)
Link copied to clipboard

Lists recurring payment records returned by GET /v1/payment/s2s/recurring.

Link copied to clipboard

Queries live transaction status from the gateway (GET /payment/checkout/status). paymentId is the UUID returned as paymentId (S2S) or id (checkout).

Link copied to clipboard

Stores the merchant configuration. Safe to call more than once.

Link copied to clipboard

Starts a server-to-server (S2S) card payment: computes the hash, calls the sale endpoint, then shows the 3-D Secure page (if any) and reports the outcome.

Link copied to clipboard

Charges a stored card using a recurring token obtained from the original sale that was started with recurringInit = true.

Link copied to clipboard
fun refund(paymentId: String, amount: Double, callback: OperationCallback<RefundResult>)

Refunds part or all of a settled payment.

Link copied to clipboard

Voids (cancels) a payment before it is settled.

Link copied to clipboard

Java-friendly alias for void. Java callers cannot invoke a method named void directly because it is a reserved keyword.