This documentation is for WSO2 Open Banking version 1.4.0. View documentation for the latest release.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: consent creation payload

...

Expand
titleClick here to see how it is done

POST /domestic-payment-consents

This endpoint allows the PISP to ask an ASPSP to create a new domestic-payment-consent resource. The ASPSP creates the domestic-payment-consent resource and responds with a unique ConsentId to refer to the resource.

  • Use the following format in the request body.

    Code Block
    {
      "Data": {
        "Initiation": {
          "InstructionIdentification": "stringANSM023",
          "EndToEndIdentification": "stringFRESCO.21302.GFX.37",
          "LocalInstrumentInstructedAmount": [{
            "Amount": "UK20.OBIE.BACS00",
            "UK.OBIE.BalanceTransfer",
     Currency": "GBP"
          },
          "UK.OBIE.CHAPS",DebtorAccount": {
            "SchemeName": "UK.OBIE.Euro1SortCodeAccountNumber",
            "Identification": "UK.OBIE.FPS11280001234567",
            "UK.OBIE.Link",
     Name": "Andrea Smith"
          "UK.OBIE.MoneyTransfer",
     },
          "UK.OBIE.Paym",CreditorAccount": {
            "SchemeName": "UK.OBIE.SEPACreditTransferSortCodeAccountNumber",
            "Identification": "UK.OBIE.SEPAInstantCreditTransfer08080021325698",
            "UK.OBIE.SWIFT",
            "UK.OBIE.Target2Name": "Bob Clements"
          ]},
          "InstructedAmountRemittanceInformation": {
            "AmountReference": "stringFRESCO-037",
            "CurrencyUnstructured": "string"Internal ops code 5120103"
       },       "DebtorAccount": {}
        }
      },
      "SchemeNameRisk": [{
              "UK.OBIE.BBAN","PaymentContextCode": "PartyToParty"
              "UK.OBIE.IBAN",
              "UK.OBIE.PAN",
              "UK.OBIE.Paym",
              "UK.OBIE.SortCodeAccountNumber"
            ],
            "Identification": "string",
            "Name": "string",
            "SecondaryIdentification": "string"
          },
          "CreditorAccount": {
            "SchemeName": [
              "UK.OBIE.BBAN",
              "UK.OBIE.IBAN",
              "UK.OBIE.PAN",
              "UK.OBIE.Paym",
              "UK.OBIE.SortCodeAccountNumber"
            ],
            "Identification": "string",
            "Name": "string",
            "SecondaryIdentification": "string"
          },
          "CreditorPostalAddress": {
            "AddressType": "Business",
            "Department": "string",
            "SubDepartment": "string",
            "StreetName": "string",
            "BuildingNumber": "string",
            "PostCode": "string",
            "TownName": "string",
            "CountrySubDivision": "string",
            "Country": "string",
            "AddressLine": [
              "string"
            ]
          },
          "RemittanceInformation": {
            "Unstructured": "string",
            "Reference": "string"
          },
          "SupplementaryData": {}
        },
        "Authorisation": {
          "AuthorisationType": "Any",
          "CompletionDateTime": "2019-07-26T06:03:44.272Z"
        }
      },
      "Risk": {
        "PaymentContextCode": "BillPayment",
        "MerchantCategoryCode": "string",
        "MerchantCustomerIdentification": "string",
        "DeliveryAddress": {
          "AddressLine": [
            "string"
          ],
          "StreetName": "string",
          "BuildingNumber": "string",
          "PostCode": "string",
          "TownName": "string",
          "CountrySubDivision": [
            "string"
          ],
          "Country": "string"
        }
      }
    }
  • Add all mandatory headers:
    • x-fapi-financial-id - The unique id of the ASPSP to which the request is issued. This id will be issued by the OBIE.
    • Authorization - An Authorisation Token as per https://tools.ietf.org/html/rfc6750. Enter the application access token, you generated from the above step .

    • x-idempotency-key - Every request will be processed only once per x-idempotency-key. The Idempotency key will be valid for 24 hours.
    • x-jws-signature - A detached JWS signature of the body of the payload.
  • A sample request follows the format given below.

    Code Block
    curl -X POST \
      https://<WSO2_OB_APIM_HOST>:8243/open-banking/v3.1/pisp/domestic-payment-consents \
      -H 'Authorization: Bearer <APPLICATION_ACCESS_TOKEN>' \
      -H 'Cache-Control: no-cache' \
      -H 'Content-Type: application/json' \
      -H 'x-fapi-financial-id: open-bank' \
      -H 'x-idempotency-key: 188610727' \
      -H 'x-jws-signature: fdffv' \
      -d '{
      "Data": {
        "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"
          },
          "DebtorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "11280001234567",
            "Name": "Andrea Smith"
          },
          "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"
        }
      }
    }'
  • The response will bear the ConsentId.

    Code Block
    {
        "Data": {
            "Status": "AwaitingAuthorisation",
            "StatusUpdateDateTime": "2019-07-26T08:08:12Z",
            "CreationDateTime": "2019-07-26T08:08:12Z",
            "ConsentId": "4a40cde1-e596-4612-93dc-85e2aa083dbb",
            "Initiation": {
                "DebtorAccount}
    }
  • Add all mandatory headers:
    • x-fapi-financial-id - The unique id of the ASPSP to which the request is issued. This id will be issued by the OBIE.
    • Authorization - An Authorisation Token as per https://tools.ietf.org/html/rfc6750. Enter the application access token, you generated from the above step .

    • x-idempotency-key - Every request will be processed only once per x-idempotency-key. The Idempotency key will be valid for 24 hours.
    • x-jws-signature - A detached JWS signature of the body of the payload.
  • A sample request follows the format given below.

    Code Block
    POST  https://<WSO2_OB_APIM_HOST>:8243/open-banking/v3.1/pisp/domestic-payment-consents \
    Authorization: Bearer <APPLICATION_ACCESS_TOKEN>
    x-idempotency-key: FRESCO.21302.GFX.20
    x-jws-signature: TGlmZSdzIGEgam91cm5leSBub3QgYSBkZXN0aW5hdGlvbiA=..T2ggZ29vZCBldmVuaW5nIG1yIHR5bGVyIGdvaW5nIGRvd24gPw==
    x-fapi-financial-id: open-bank
    x-fapi-customer-last-logged-time:  Sun, 10 Sep 2017 19:43:31 GMT
    x-fapi-customer-ip-address: 104.25.212.99
    x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
    Content-Type: application/json
    Accept: application/json
     
    {
      "Data": {
        "Initiation": {
          "InstructionIdentification": "ANSM023",
            "SchemeNameEndToEndIdentification": "UKFRESCO.21302.OBIEGFX.SortCodeAccountNumber37",
          "InstructedAmount": {
            "IdentificationAmount": "1128000123456720.00",
     
                  "Name"Currency": "Andrea Smith"
              GBP"
     },     },
           "RemittanceInformationDebtorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "UnstructuredIdentification": "Internal ops code 512010111280001234567",
                    "Reference"Name": "FRESCO-101Andrea Smith"
          },
         }, "CreditorAccount": {
              "EndToEndIdentificationSchemeName": "FRESCOUK.21302OBIE.GFX.20SortCodeAccountNumber",
    
               "InstructionIdentificationIdentification": "ACME41208080021325698",
       
            "CreditorAccountName": {"Bob Clements"
           },
           "SecondaryIdentification": "0002",
           RemittanceInformation": {
            "SchemeNameReference": "UK.OBIE.SortCodeAccountNumberFRESCO-037",
            "Unstructured": "Internal ops code     "Identification": "08080021325698",5120103"
          }
        }
      },
      "NameRisk": "ACME{
    Inc"    "PaymentContextCode": "PartyToParty"
      }
    }
  • The response will bear the ConsentId.

    Code Block
    HTTP/1.1 201 Created
     },
                "InstructedAmountx-jws-signature: V2hhdCB3ZSBnb3QgaGVyZQ0K..aXMgZmFpbHVyZSB0byBjb21tdW5pY2F0ZQ0K
    x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
    Content-Type: application/json
     
    {
      "Data": {
        "ConsentId": "7290",
        "Status": "AwaitingAuthorisation",
        "AmountCreationDateTime": "165.882017-06-05T15:15:13+00:00",
    
                   "Currency"StatusUpdateDateTime": "GBP"2017-06-05T15:15:13+00:00",
                }
            }"Initiation": {
        },     "RiskInstructionIdentification": {
     "ANSM023",
          "PaymentContextCodeEndToEndIdentification": "EcommerceGoodsFRESCO.21302.GFX.37",
            "DeliveryAddressInstructedAmount": {
                "StreetNameAmount": "Acacia Avenue20.00",
    
               "CountrySubDivisionCurrency": ["GBP"
            },
           "WessexDebtorAccount": {
               ],
       "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "AddressLineIdentification": ["11280001234567",
            "Name": "Andrea Smith"
         "Flat 7"},
          "CreditorAccount": {
            "SchemeName"Acacia Lodge"
     : "UK.OBIE.SortCodeAccountNumber",
              ],
    "Identification": "08080021325698",
               "BuildingNumberName": "27Bob Clements",
          },
          "TownNameRemittanceInformation": "Sparsholt",{
                "CountryReference": "UKFRESCO-037",
      
             "PostCodeUnstructured": "GU31 2ZZInternal ops code 5120103"
          }
     },   }
      },
      "MerchantCategoryCodeRisk": "5967",
     {
          "MerchantCustomerIdentificationPaymentContextCode": "053598653254PartyToParty"
     
      },
     
      "Links": {
      
         "Self": "https://localhost:8243api.alphabank.com/open-banking/v3.1/pisp/domestic-payment-consents/4a40cde1-e596-4612-93dc-85e2aa083dbb"
     7290"
      },
     
      "Meta": {}
    }

GET /domestic-payment-consents/{ConsentId}

A PISP is able to retrieve a payment consent resource that they have created to check its status. The PISP must have an access token issued by the ASPSP using a client credentials grant.

  • Add the mandatory headers.
    • ConsentId - The unique id of the consent which you want to retrieve.
    • x-fapi-financial-id - The unique id of the ASPSP to which the request is issued. This id will be issued by the OBIE.
    • Authorization - An Authorisation Token as per https://tools.ietf.org/html/rfc6750. Enter the application access token, you generated from the above step.
  • A sample request follows the format given below.

    Code Block
    curl -X GET \
      https://<WSO2_OB_APIM_HOST>:8243/open-banking/v3.1/pisp/domestic-payment-consents/<ConsentId> \
      -H 'Authorization: Bearer <APPLICATION_ACCESS_TOKEN>' -k \
      -H 'Cache-Control: no-cache' \
      -H 'Content-Type: application/json' \
      -H 'x-fapi-financial-id: open-bank'
  • Following is a sample response.

    Code Block
    {
        "Data": {
            "Status": "AwaitingAuthorisation",
            "StatusUpdateDateTime": "2019-07-26T08:08:12Z",
            "CreationDateTime": "2019-07-26T08:08:12Z",
            "ConsentId": "4a40cde1-e596-4612-93dc-85e2aa083dbb",
            "Initiation": {
                "DebtorAccount": {
                    "SchemeName": "UK.OBIE.SortCodeAccountNumber",
                    "Identification": "11280001234567",
                    "Name": "Andrea Smith"
                },
                "RemittanceInformation": {
                    "Unstructured": "Internal ops code 5120101",
                    "Reference": "FRESCO-101"
                },
                "EndToEndIdentification": "FRESCO.21302.GFX.20",
                "InstructionIdentification": "ACME412",
                "CreditorAccount": {
                    "SecondaryIdentification": "0002",
                    "SchemeName": "UK.OBIE.SortCodeAccountNumber",
                    "Identification": "08080021325698",
                    "Name": "ACME Inc"
                },
                "InstructedAmount": {
                    "Amount": "165.88",
                    "Currency": "GBP"
                }
            }
        },
        "Risk": {
            "PaymentContextCode": "EcommerceGoods",
            "DeliveryAddress": {
                "StreetName": "Acacia Avenue",
                "CountrySubDivision": [
                    "Wessex"
                ],
                "AddressLine": [
                    "Flat 7",
                    "Acacia Lodge"
                ],
                "BuildingNumber": "27",
                "TownName": "Sparsholt",
                "Country": "UK",
                "PostCode": "GU31 2ZZ"
            },
            "MerchantCategoryCode": "5967",
            "MerchantCustomerIdentification": "053598653254"
        },
        "Links": {
            "Self": "https://localhost:8243/open-banking/v3.1/pisp/domestic-payment-consents4a40cde1-e596-4612-93dc-85e2aa083dbb"
        },
        "Meta": {}
    }

...