Skip to content

Commit

Permalink
docfix/Regarding VRPs
Browse files Browse the repository at this point in the history
  • Loading branch information
simonredfern committed Nov 27, 2024
1 parent 885b6e9 commit 4d3d2b0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
1 change: 1 addition & 0 deletions obp-api/src/main/scala/code/api/util/ApiTag.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ object ApiTag {
// When using these tags in resource docs, as we now have many APIs, it's best not to have too use too many tags per endpoint.
val apiTagOldStyle = ResourceDocTag("Old-Style")
val apiTagTransactionRequest = ResourceDocTag("Transaction-Request")
val apiTagVrp = ResourceDocTag("VRP")
val apiTagApi = ResourceDocTag("API")
val apiTagBank = ResourceDocTag("Bank")
val apiTagAccount = ResourceDocTag("Account")
Expand Down
10 changes: 5 additions & 5 deletions obp-api/src/main/scala/code/api/v5_0_0/APIMethods500.scala
Original file line number Diff line number Diff line change
Expand Up @@ -783,9 +783,7 @@ trait APIMethods500 {
s"""
|
|This endpoint continues the process of creating a Consent. It starts the SCA flow which changes the status of the consent from INITIATED to ACCEPTED or REJECTED.
|Please note that the Consent cannot elevate the privileges logged in user already have.
|
|""",
|Please note that the Consent cannot elevate the privileges logged in user already have.|Please note that the Consent you are using cannot exceed the personal use.
EmptyBody,
consentJsonV500,
List(
Expand All @@ -800,7 +798,7 @@ trait APIMethods500 {
InvalidConnectorResponse,
UnknownError
),
apiTagConsent :: apiTagPSD2AIS :: apiTagPsd2 :: Nil)
apiTagConsent :: apiTagPSD2AIS :: apiTagPsd2 :: apiTagVrp, Nil
staticResourceDocs += ResourceDoc(
createConsentByConsentRequestIdSms,
implementedInApiVersion,
Expand All @@ -811,7 +809,9 @@ trait APIMethods500 {
s"""
|
|This endpoint continues the process of creating a Consent. It starts the SCA flow which changes the status of the consent from INITIATED to ACCEPTED or REJECTED.
|Please note that the Consent cannot elevate the privileges logged in user already have.
|
|Please note that the Consent you are using cannot exceed the personal use.
|
|
|""",
EmptyBody,
Expand Down
28 changes: 21 additions & 7 deletions obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3293,18 +3293,32 @@ trait APIMethods510 {
"/consumer/vrp-consent-requests",
"Create Consent Request VRP",
s"""
|Client Authentication (mandatory)
|This endpoint is used to begin the process of creating a consent that may be used for Variable Recurring Payments (VRPs).
|
|It is used when applications request an access token to access their own resources, not on behalf of a user.
|VRPs are useful in situations when a beneficiary needs to be paid different amounts on a regular basis.
|
|The client needs to authenticate themselves for this request.
|In case of public client we use client_id and private key to obtain access token, otherwise we use client_id and client_secret.
|The obtained access token is used in the HTTP Bearer auth header of our request.
|Once granted, the consent allows its holder to initiate multiple Transaction Requests to the Counterparty defined in this endpoint as long as the
|Counterparty Limits are respected.
|
|Client, Consumer or Application Authentication is mandatory for this endpoint.
|
|i.e. the caller of this endpoint is the API Client, Consumer or Application rather than a specific User.
|
|At the end of the process the following objects are created in OBP or connected backend systems:
| - An automatically generated View which controls access.
| - A Counterparty that is the Beneficiary of the Variable Recurring Payments. The Counterparty specifies the Bank Account number or other routing address.
| - Limits for the Counterparty which constrain the amount of money that can be sent to it in various periods (yearly, monthly, weekly).
|
|The Account holder may modify the Counterparty or Limits e.g. to increase or decrease the maximum possible payment amounts or the frequencey of the payments.
|
|
|In the case of a public client we use the client_id and private key to obtain an access token, otherwise we use the client_id and client_secret.
|The obtained access token is used in the HTTP Authorization header of the request as follows:
|
|Example:
|Authorization: Bearer eXtneO-THbQtn3zvK_kQtXXfvOZyZFdBCItlPDbR2Bk.dOWqtXCtFX-tqGTVR0YrIjvAolPIVg7GZ-jz83y6nA0
|
|After successfully creating the VRP consent request, you need to call the `Create Consent By CONSENT_REQUEST_ID` endpoint to finalize the consent.
|After successfully creating the VRP consent request, you need to call the `Create Consent By CONSENT_REQUEST_ID` endpoint to finalize the consent using the CONSENT_REQUEST_ID returned by this endpoint.
|
|""".stripMargin,
postVRPConsentRequestJsonV510,
Expand All @@ -3317,7 +3331,7 @@ trait APIMethods510 {
InvalidConnectorResponse,
UnknownError
),
apiTagConsent :: apiTagPSD2AIS :: apiTagPsd2 :: Nil
apiTagConsent :: apiTagVrp :: apiTagTransactionRequest :: Nil
)

lazy val createVRPConsentRequest : OBPEndpoint = {
Expand Down

0 comments on commit 4d3d2b0

Please sign in to comment.