Open Bank sandbox - Get Autorization code for 'openid accounts payment' scope does not work

Not applicable

Hi Opan Bank Team,

I am trying to generate access token for the scope "openid accounts payment", but it seems there is some problem in code or the way it is extracting scope from the request. In response I am getting invalid scope but the scope was selected from the UI itself.

The App has access to all products so does not seem to be a app-product association problem.

I am attaching all the required details/ screenshots:

1. App-Product details:

4458-app-products.png

2. Authorize Request from the UI:

4459-authorize-request.png

3. Authorize Response: In the response I am getting invalid scope.

4460-authorize-response.png

Could some please help what should be the value of scope?

If some has tried this solution I would really like to understand how they managed to use PIS service.

@Prashanth Subrahmanyam @rrai @sudharshan@apigee.com

Solved Solved
1 6 334
1 ACCEPTED SOLUTION

@Vipul Agarwal Could you try with just the scope "openid accounts"?

You cannot use the payments scope in this call as that scope expects another parameters in the request which is a jwt.

That said, when I use the payments scope, I get a different error response, but an error nonethless.

If you are facing an issue, please check on openbank.apigee.com as well and let me know if you see a difference from your own portal. That will also help us troubleshoot where the problem is.

View solution in original post

6 REPLIES 6

@Vipul Agarwal Could you try with just the scope "openid accounts"?

You cannot use the payments scope in this call as that scope expects another parameters in the request which is a jwt.

That said, when I use the payments scope, I get a different error response, but an error nonethless.

If you are facing an issue, please check on openbank.apigee.com as well and let me know if you see a difference from your own portal. That will also help us troubleshoot where the problem is.

@Prashanth Subrahmanyam The scope "openid accounts" works fine but now I want to use PIS service so for that I need to have access token with "openid accounts payment" scope.

Please correct me if I am wrong.

I followed the documentation and providing all the required parameters in the /authorize API but doesn't help.

PS: All the screenshots above are from openbank.apigee.com only not from our own portal.

Also you said "You cannot use the payments scope in this call as that scope expects another parameters in the request which is a jwt." Where do we need to pass that parameter in /authorize request??


Could you please help in step by step process as well as all the required params (if I am missing anything in the request) to initiate a payment using PIS?

Thanks.

@Vipul Agarwal the flow is a little different for payment API. You will not get an access token and then make the API call, but the access token is generated on the fly. It is a one-time access token that is revoked the moment it is used.

For all practical purposes, you can assume that the client app makes just one API call to the payment transfer API and the Oauth process happens behind the scenes. Hope this makes sense.

For this you will have to pass a jwt which contains details of the payment. This is specified in more detail in the following page - https://openbank.apigee.com/oauth2

You can also test this API directly here -> Initiate Transfer, and you don't need an oauth token prior to doing this.

Does this help? If you want more details, then I will make a detailed write-up about the flow.

@Prashanth Subrahmanyam Thanks a lot Prashant. It worked. I was able to initiate payment.

Just one last question. Does openbank solution supports an api to fetch transaction details of specific transaction??

for ex:

https://apis-bank-dev.apigee.net/apis/v1/accounts/acr:token/transactions/b53a3244-d33b-11e6-864f-0ed... am sending the access token in Authorization header.

I am trying to hit this URL but there is no response. Neither error nor Success response. Its getting timed out.

I am giving the value from "id" attribute in the transaction object in following response:

[
  {
    "account_number": 2139531801,
    "amount": 200,
    "booking_code": "2SFBJ28553",
    "booking_date": "1462517645809",
    "currency": "GBP",
    "subject": "Online Purchase",
    "transaction_type": "sepa_credit_transfer",
    "transaction_type_details": {
      "remote_iban": "GB32ESSE40486562136016",
      "remote_bic": "RBOSGB2109H",
      "remote_name": "BigZ online store"
    },
    "value_date": "1462517645809",
    "id": "2f800f33-059f-11e7-a9a4-12dcd08f689c",
    "created_at": 1489156691295,
    "updated_at": 1489156691295
  },
  .
  .
  .
  .
  {
    "account_number": 2139531801,
    "amount": 200,
    "booking_code": "2SFBJ28553",
    "booking_date": "1462517645809",
    "currency": "GBP",
    "subject": "Online Purchase",
    "transaction_type": "sepa_credit_transfer",
    "transaction_type_details": {
      "remote_iban": "GB32ESSE40486562136016",
      "remote_bic": "RBOSGB2109H",
      "remote_name": "BigZ online store"
    },
    "value_date": "1462517645809",
    "id": "b53a3244-d33b-11e6-864f-0edc0450f81c",
    "created_at": 1483616407840,
    "updated_at": 1483616407840
  },
  {
    "account_number": 2139531801,
    "amount": 200,
    "booking_code": "2SFBJ28553",
    "booking_date": "1462517645809",
    "currency": "GBP",
    "subject": "Online Purchase",
    "transaction_type": "sepa_credit_transfer",
    "transaction_type_details": {
      "remote_iban": "GB32ESSE40486562136016",
      "remote_bic": "RBOSGB2109H",
      "remote_name": "BigZ online store"
    },
    "value_date": "1462517645809",
    "id": "0c2d19b2-d32d-11e6-864f-0edc0450f81c",
    "created_at": 1483610111265,
    "updated_at": 1483610111265
  }
]<br>

Please let me know if sth else is expected in request.

@Vipul Agarwal The API currently doesn't seem to support fetching a specific transaction ID. The results should be sorted however in reverse chronological order, so that the first one is always the latest one.

We'll take this as a feature request and will add fetching transactions by ID and also getting transactions by a date range.

@Prashanth Subrahmanyam Thanks for your help Prashanth 🙂