Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Properties

...

externalUrlhttps://gini.atlassian.net/wiki/spaces/GBSV/pages/10092860/Receive+Payment+Requests
color#C5FFEF
filterSpacefalse
destinationexternalUrl
textColorPaletteDefault
titleReceive Payment Requests
bodyReceiving and handling payment requests.
textColor#000000
targettrue
layoutSimple
selectedUrlhttps://gini.atlassian.net/wiki/spaces/GBSV/pages/10092860/Receive+Payment+Requests
id4z31lisx0kq
backgroundColorPaletteDefault
Cfm card
externalUrlhttps://gini.atlassian.net/wiki/spaces/GBSV/pages/10092922/Fetch+Payment+Information
color#C5FFEF
filterSpacefalse
destinationexternalUrl
textColorPaletteDefault
titleFetch Payment Information
bodyReturning the recipient, IBAN, amount and purpose fields.
textColor#000000
targettrue
layoutSimple
selectedUrlhttps://gini.atlassian.net/wiki/spaces/GBSV/pages/10092922/Fetch+Payment+Information
idz2qpjycwrqr
backgroundColorPaletteDefault
Cfm card
externalUrlhttps://gini.atlassian.net/wiki/spaces/GBSV/pages/10158459/Resolve+Payment+Requests
color#C5FFEF
filterSpacefalse
destinationexternalUrl
textColorPaletteDefault
titleResolve Payment Requests
bodyEnabling your app to redirect.
textColor#000000
targettrue
layoutSimple
selectedUrlhttps://gini.atlassian.net/wiki/spaces/GBSV/pages/10158459/Resolve+Payment+Requests
id16safvtu2vr
backgroundColorPaletteDefault

...

hiddentrue

Status

Status
colourGreen
titleapproved

Approver

Alpar Szotyori (Unlicensed)

Find an example implementation in the example app’s pay package.

When your activity is launched with intent, follow these steps to receive and handle the payment request:

  1. Extract the payment request ID from the intent with getRequestId():

    Code Block
    languagekotlin
    val requestId = getRequestId(intent)
  2. Retrieve the payment details set by other Gini SDKs (like the Gini Health SDK) using GiniBank.getPaymentRequest():

    Code Block
    languagekotlin
    val paymentRequest: PaymentRequest = GiniBank.getPaymentRequest(requestId)
  3. Show the payment details to your user:

    Code Block
    languagekotlin
    showPaymentDetails(
        paymentRequest.recipient,
        paymentRequest.iban,
        paymentRequest.bic,
        paymentRequest.amount,
        paymentRequest.purpose
    )
  4. After the user initiates the payment, mark the payment request as paid, using GiniBank.resolvePaymentRequest():

    Code Block
    languagekotlin
    // The actual payment details used for the payment (as corrected and accepted by the user).
    val usedPaymentDetails = ResolvePaymentInput(
        recipient = "...",
        iban = "...",
        bic = "...",
        amount = "...",
        purpose = "..."
    )
    
    val resolvedPayment: ResolvedPayment = GiniBank.resolvePaymentRequest(requestId, usedPaymentDetails)
  5. Let your user return to the app that started the flow using GiniBank.returnToPaymentInitiatorApp():

    Code Block
    languagekotlin
    GiniBank.returnToPaymentInitiatorApp(context, resolvedPayment)