-
Notifications
You must be signed in to change notification settings - Fork 2
Payments
To create a linkID payment session, you have to piggyback a LinkIDPaymentContext on the LinkIDAuthenticationContext or the LinkIDLTQRContent .
The flow is the same as a linkID authentication session with the exception that you'll receive an asynchronous payment poke whenever the payment has been completed ( or failed ).
When polling linkID, you'll have to monitor the value of the LinkIDPaymentState property in the LinkIDAuthPollResponse for the state of the payment.
If a linkID user chooses to continue the payment in his browser ( see Configuration ), the paymentMenuURL will be filled in and you'll have to redirect the user to there.
The amount to be payed. The currency can be traditional ( e.g. EUR) in which case the amount is specified in cents ( 100 == 1 EUR ) or in wallet coin type ( see Wallets )
An optional description regarding the content of what is being payed for. Will be displayed in the client, as in the payment confirmation e-mail and the linkID user's activity feed.
For each linkID application, multiple payment profiles can be configured, e.g. for certain payments only creditcards are allowed, for others creditcards and SEPA is allowed, ... . You can override the default payment profile with this property.
- Order reference An order reference which will be used in payment status updates sent from linkID to your webapp. This is optional, if not specified linkID will generate a UUID one for you. The order reference is returned in the PaymentResponse piggybacked on the returned SAML v2.0 authentication response
- Payment profile within the payment configuration in linkID and DocData for your application, you can define multiple payment profiles. These allow for specifying that for example for a certain transaction only credit cards are allowed to be used. This is optional, a default will be configured when setting up your app within the linkID backend.
- Payment validation time payment validation time is the time linkID will wait for validation of the payment transaction.
If a linkID user wants to make a linkID payment, but has not yet linked a payment method to his linkID account, you have the following options:
-
Add the payment method in the client: This if this is enabled for the specific payment method type. You do not have to do anything here, the linkID backend configuration for your application/payment merchant will do everything.
-
Add the payment method in the browser: If enabled, the linkID client will show a continue in browser button. When the user selects this, linkID will return a paymentMenuURL in the PaymentResponse in the AuthenticationResponse. It is then your webapp's responsibility to redirect the user to this URL to finalize the payment. To enabled this, set the PaymentAddBrowser variable in the PaymentContext you pass to linkID to REDIRECT. The alternative is to just disable this option.
Depending on the type of payment method, validation of the payment transaction can take more time than you want. Depending on your needs you can optionally make linkID wait a bit longer or not wait at all. By default linkID waits 5 seconds.
Either way, when linkID receives a notification that the payment transaction has been validated, it can inform your webapp of this. For this we will need to know where we can do this. Consult a linkID guy to configure this for your app.
We will notify you via a simple HTTP GET as follows
https://your.host.com/site/paymentUpdate?orderRef=132456-78996-4563-45636
You then need to request detailed payment information for that transaction using the linkID payment web service.
Check out following examples for more detail: