Portal Management - Monetization impossible?

One important aspect in offering API’s is monetizing them. In the Tyk Portal Management there is a hint for monetization:
2018-01-23 08-35-23

Bit this is confusing to me. Reviewing PayPal or Stripe, they provide a JavaScript code, but here at tyk, one can only add a URL. How to realize a payment? I need a hint how to receive payments.


Here is a basic flow for implementing monetization https://tyk.io/docs/publish/monetise/

Basic idea is that Tyk passkey key request ID to redirect URL, and once payment is made, you call Tyk Dashboard Key approval API with this ID to enable user token.

the basic flow says:

“When Tyk hands off to the redirected app, it will also add the key request ID to the request, so the application that handles the transaction can then use the Tyk Dashboard REST API to approve the key request (triggering the email that notifies the developer of their token, as well as notifying the calling application of the raw token), closing the loop.”

Where do they add the key request ID? - Header? - My idea is to create a separate page in portal management where payment is made. The requirement is that this page could access to the key request ID.

You should check for tyk_key_request_id url query param.

Okay, there is a command to check for it:

foreach (getallheaders() as $name => $value) {
    echo "$name: $value" . "<br>";

The result from this gave me that the key request is part of the Referer URL.
Does anybody know how to implement this key into PayPal payment?

What is still unclear for me is how to realize “closing the loop”. So when I redirect the key request ID to a service like Paypal or Stripe, then how do I send this key back to let tyk portal know that payment is made? @leon : how would you realize this?

I think idea here is that you need to have some server layer on your side which will handle this logic. If you just redirect directly to paypal, its not going to work.

First, you redirect to your app which handles transactions, it remembers key request id, and redirects to paypal page.

@leon : I first have to wait until I know if Key Request Issue can be solved before I proceed with this topic.