Versions Compared

Key

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

Insert excerpt
Consent Management APIs
Consent Management APIs
nopaneltrue

The Payment Consent API provides payment consent capabilities as API resources.

Info

You can find the REST API documentation for Payments Information Sharing Consent Management APIs below:

Table of Contents
maxLevel3
minLevel3

Create payment consent

This API resource creates consent. 

POST /payments/{PaymentType}

The following parameters need to be provided for the API call:

Parameter

Description

Required/optional

PaymentType

The payment type. For example; domestic, or international.

Required

OBWriteConsent1Param

The payment body sent in the request.

Required

x-fapi-financial-id

The unique ID of the ASPSP to which the request is issued. The unique ID will be issued by WSO2 Open Banking.

Required

x-fapi-interaction-id

An RFC4122 UID used as a correlation ID.

Optional

x-idempotency-key

Every request is processed only once per x-idempotency-key. The idempotency key is valid for 24 hours.

Required

x-wso2-client-id

The client ID, or the consumer  key.

Required


A sample request is shown below:

Code Block
{
  "Data": {
    "Initiation": {
      "InstructionIdentification": "ACME412",
      "EndToEndIdentification": "FRESCO.21302.GFX.20",
      "InstructedAmount": {
        "Amount": "167.88",
        "Currency": "GBP"
      },
      "DebtorAccount":{
      	"SchemeName": "UK.OBIE.SortCodeAccountNumber",
      	"Identification":"11111111111234",
      	"Name":"Sachithra Dangalla"
      },
      "CreditorAccount": {
        "SchemeName": "SortCodeAccountNumber",
        "Identification": "08080021325698",
        "Name": "ACME Inc",
        "SecondaryIdentification": "0002"
      },
      "RemittanceInformation": {
        "Reference": "FRESCO-101",
        "Unstructured": "Internal ops code 5120101"
      }
    }
  },
  "Risk": {
    "PaymentContextCode": "EcommerceGoods",
    "MerchantCategoryCode": "5967",
    "MerchantCustomerIdentification": "053598653254",
    "DeliveryAddress": {
      "AddressLine": [
        "Flat 7",
        "Acacia Lodge"
      ],
      "StreetName": "Acacia Avenue",
      "BuildingNumber": "27",
      "PostCode": "GU31 2ZZ",
      "TownName": "Sparsholt",
      "CountrySubDivision": [
        "Wessex"
      ],
      "Country": "UK"
    }
  }
}

A sample successful response is shown below:

Code Block
{
    "Data": {
        "PaymentId": "080a9046-11be-4085-9c32-0a55ff09ff96",
        "Status": "AcceptedTechnicalValidation",
        "CreationDateTime": "2019-03-21T06:04:44Z",
        "Initiation": {
            "InstructionIdentification": "ACME412",
            "EndToEndIdentification": "FRESCO.21302.GFX.20",
            "InstructedAmount": {
                "Amount": "167.88",
                "Currency": "GBP"
            },
            "DebtorAccount": {
                "SchemeName": "UK.OBIE.SortCodeAccountNumber",
                "Identification": "11111111111234",
                "Name": "Sachithra Dangalla"
            },
            "CreditorAccount": {
                "SchemeName": "SortCodeAccountNumber",
                "Identification": "08080021325698",
                "Name": "ACME Inc",
                "SecondaryIdentification": "0002"
            },
            "RemittanceInformation": {
                "Unstructured": "Internal ops code 5120101",
                "Reference": "FRESCO-101"
            }
        }
    },
    "Risk": {
        "PaymentContextCode": "EcommerceGoods",
        "MerchantCategoryCode": "5967",
        "MerchantCustomerIdentification": "053598653254",
        "DeliveryAddress": {
            "AddressLine": [
                "Flat 7",
                "Acacia Lodge"
            ],
            "StreetName": "Acacia Avenue",
            "BuildingNumber": "27",
            "PostCode": "GU31 2ZZ",
            "TownName": "Sparsholt",
            "CountrySubDivision": [
                "Wessex"
            ],
            "Country": "UK"
        }
    },
    "Links": {
        "Self": "https://192.168.108.15:8243/open-banking/v1.1/pisp//null/080a9046-11be-4085-9c32-0a55ff09ff96"
    },
    "Meta": {}
}

A list of possible error responses is given below:

Code

Description

Sample Response

HTTP 400

Bad request

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

HTTP 401

Unauthorized



Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 403

Forbidden


Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 405

Method not allowed



Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 406

Not acceptable



Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 415

Unsupported Media type

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 429

Too many requests

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 500

Internal server error

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

Retrieve consent information

This API resource retrieves information corresponding to the consent ID received in the payment POST consent response.

GET /payments/{PaymentType}/{ConsentId}

The following parameters need to be provided for the API call:

Parameter

Description

Required/optional

PaymentType

The payment type. Fore example; domestic, or international.

Required

ConsentId

This is retrieved in the response at the time of consent creation.

Required

x-fapi-financial-id

The unique ID of the ASPSP to which the request is issued. The unique ID is issued by WSO2 Open Banking.

Required

x-fapi-interaction-id

An RFC4122 UID used as a correlation ID.

Optional

x-wso2-client-id

The client ID, or the consumer key.

Required

A sample request is shown below:


A sample successful response is shown below:

Code Block
{
    "Data": {
        "ConsentId": "aff2b3f0-623d-4afb-a7b0-6ee25229cfa6",
        "CreationDateTime": "2019-03-21T08:10:22Z",
        "Status": "AwaitingAuthorisation",
        "StatusUpdateDateTime": "2019-03-21T08:10:22Z",
        "CutOffDateTime": "2019-03-21T17:30Z",
        "Initiation": {
            "InstructionIdentification": "ACME412",
            "EndToEndIdentification": "FRESCO.21302.GFX.20",
            "InstructedAmount": {
                "Amount": "165.88",
                "Currency": "GBP"
            },
            "CreditorAccount": {
                "SchemeName": "UK.OBIE.SortCodeAccountNumber",
                "Identification": "08080021325698",
                "Name": "ACME Inc",
                "SecondaryIdentification": "0002"
            },
            "RemittanceInformation": {
                "Unstructured": "Internal ops code 5120101",
                "Reference": "FRESCO-101"
            }
        }
    },
    "Risk": {
        "PaymentContextCode": "EcommerceGoods",
        "MerchantCategoryCode": "5967",
        "MerchantCustomerIdentification": "053598653254",
        "DeliveryAddress": {
            "StreetName": "Acacia Avenue",
            "CountrySubDivision": [
                "Wessex"
            ],
            "AddressLine": [
                "Flat 7",
                "Acacia Lodge"
            ],
            "BuildingNumber": "27",
            "TownName": "Sparsholt",
            "Country": "UK",
            "PostCode": "GU31 2ZZ"
        }
    },
    "Links": {
        "Self": "https://192.168.108.15:8243/open-banking/v3.1/pisp//domestic-payment-consents/aff2b3f0-623d-4afb-a7b0-6ee25229cfa6"
    },
    "Meta": {}
}

A list of possible error responses is given below:

Code

Description

Sample Response

HTTP 400

Bad request

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

HTTP 401

Unauthorized



Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 403

Forbidden


Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 405

Method not allowed



Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 406

Not acceptable

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 429

Too many requests


Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 500

Internal server error



Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

Update payment consent

This API resource is used to update the payment consent given by the PSU.

POST /payment-consents

The following parameters need to be provided for the API call:

Parameter

Description

Required/optional

PaymentConsentBinding

Request containing a parameter of a payment consent given by the PSU.

Required

A sample request is shown below:

Code Block
{
"paymentRequestId" : "6d0d6b75-eab7-477f-bf5d-9b846f5dbd24",
"status" : "Authorised",
"collectionMethod" : "test",
"userId" : "test@wso2.com@carbon.super",
"accountId" : "888812345678"
}

A sample successful response is shown below:

A list of possible error responses is given below:

Code

Description

Sample Response

HTTP 400

Bad request

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

HTTP 401

Unauthorized

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 403

Forbidden

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 405

Method not allowed

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 406

Not acceptable

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 429

Too many requests

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 500

Internal server error

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

Search payment consents

This API resource retrieves/searches payment consents given by the users, providing you with a list of available payment consents that match a given search condition.

GET /payment-consents

The following parameters need to be provided for the API call:

Parameter

Description

Required/Optional

userId

The username identifier of the subject.

Optional

clientId

The client name identifier of the subject.

Optional

status

The status of the consent.

Optional

fromTime

Date and time of the consent search lower limit.

Example: 2018-06-07T15:11:48Z

Optional

toTime

Date and time of the consent search upper limit.

Example: 2018-06-07T15:11:48Z

Optional

A sample request is shown below:

A sample successful response is shown below:

A list of possible error responses is given below:

Code

Description

Sample Response

HTTP 400

Bad request

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

HTTP 500

Internal server error

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

Update payment consents

This API resource updates payment consent, and stores payments submission URLs.

PUT /payments/{PaymentType}/{ConsentId}/Consumption

The following parameters need to be provided for the API call:

Parameter

Description

Required/Optional

PaymentType

Payment type

Required

ConsentId

ConsentId

Required

A sample request is shown below:

Code Block
{
	"consentType":"Dome",
	"paymentType":"Domestic",
	"metaData":[
		{
			"metadataValue":"domestic-payments", 
			"metadataKey" : ""
	}
		],
	"status":"Authorised"
	
}

A sample successful response is shown below:

A list of possible error responses is given below:

Code

Description

Sample Response

HTTP 400

Bad request

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

HTTP 401

Unauthorized

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 403

Forbidden

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 405

Method not allowed

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 406

Not acceptable

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 415

Unsupported Media type

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 429

Too many requests

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 500

Internal server error

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

This API resource provides the payment consent link.

The following parameters need to be provided for the API call:

Parameter

Description

Required/Optional

PaymentType

The payment type.

Required

ConsentId

The consent ID.

Required

A sample request is shown below:

A sample successful response is shown below:

A list of possible error responses is given below:

Code

Description

Sample Response

HTTP 400

Bad request

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

HTTP 401

Unauthorized

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 403

Forbidden

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 405

Method not allowed

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 406

Not acceptable

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 429

Too many requests

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 500

Internal server error

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}

Validate payment submission

This API resource validates the payment submission.

POST /payment-submission-validation/{PaymentType}

The following parameters need to be provided for the API call:

Parameter

Description

Required/Optional

PaymentType

The payment type.

Required

Payment Submission Consent Validation

The consent ID.

Required

A sample request is shown below:

Code Block
{
	"clientId": "67899",
    "scope": "payments",
    "paymentId": "27e394b7-266d-45f2-8548-9cd97a0c12a1",
    "initiation": {
      "InstructionIdentification": "ACME412",
      "EndToEndIdentification": "FRESCO.21302.GFX.20",
      "InstructedAmount": {
        "Amount": "165.88",
        "Currency": "GBP"
      },
      "CreditorAccount": {
        "SchemeName": "UK.OBIE.SortCodeAccountNumber",
        "Identification": "08080021325698",
        "Name": "ACME Inc",
        "SecondaryIdentification": "0002"
      },
      "RemittanceInformation": {
        "Reference": "FRESCO-101",
        "Unstructured": "Internal ops code 5120101"
      }
    }
  ,
  "risk": {
    "PaymentContextCode": "EcommerceGoods",
    "MerchantCategoryCode": "5967",
    "MerchantCustomerIdentification": "053598653254",
    "DeliveryAddress": {
      "AddressLine": [
        "Flat 7",
        "Acacia Lodge"
      ],
      "StreetName": "Acacia Avenue",
      "BuildingNumber": "27",
      "PostCode": "GU31 2ZZ",
      "TownName": "Sparsholt",
      "CountrySubDivision": [
        "Wessex"
      ],
      "Country": "UK"
    }
  },
 "requestType": "Submission"
}

A sample successful response is shown below:

A list of possible error responses is given below:

Code

Description

Sample Response

HTTP 400

Bad request

Code Block
{
 "Code": "string",
 "Id": "string",
 "Message": "string",
 "Errors": [
   {
     "ErrorCode": "string",
     "Message": "string",
     "Path": "string",
     "Url": "string"
   }
 ]
}

HTTP 500

Internal server error

Code Block
{
  "Code": "string",
  "Id": "string",
  "Message": "string",
  "Errors": [
    {
      "ErrorCode": "string",
      "Message": "string",
      "Path": "string",
      "Url": "string"
    }
  ]
}