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.

...

Expand
titleClick here to see how it is done

POST /domestic-scheduled-payment-consents

This API endpoint allows the PISP to ask an ASPSP to create a new domestic-scheduled-payment-consent resource. The ASPSP creates the domestic-scheduled-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": {
        "Permission":"Create",
        "Initiation": {
          "RequestedExecutionDate": "2018-08-06T00:00:00+00:00",
          "InstructedAmount": {
            "Amount": "200.00",
            "Currency": "GBP"
          },
          "DebtorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "11280001234567",
            "Name": "Andrea Frost"
          },
          "CreditorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "08080021325698",
            "Name": "Tom Kirkman"
          },
          "RemittanceInformation": {
            "Reference": "DSR-037",
            "Unstructured": "Internal ops code 5120103"
          }
        }
      },
      "Risk": {
        "PaymentContextCode": "PartyToParty"
      }
    }
  • 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 POST \
      https://<WSO2_OB_APIM_HOST>:8243/open-banking/v3.1/pisp/domestic-scheduled-payment-consents HTTP/1.1
     \
      -H 'Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA' \
      -H 'x-idempotency-key: FRESCO.21302.GFX.20' \
      -H 'x-jws-signature: TGlmZSdzIGEgam91cm5leSBub3QgYSBkZXN0aW5hdGlvbiA=..T2ggZ29vZCBldmVuaW5nIG1yIHR5bGVyIGdvaW5nIGRvd24gPw==' \
      x-H 'x-fapi-financial-id: OB/2017/001
    open-bank' \
      -H 'x-fapi-customer-last-logged-time:  Sun, 10 Sep 2017 19:43:31 GMT' \
      -H 'x-fapi-customer-ip-address: 104.25.212.99' \
      -H 'x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
     { --cert <PUBLIC_KEY_FILE_PATH> --key <PRIVATE_KEY_FILE_PATH> \
    -d '{
      "Data": {
        "Permission":"Create",
        "Initiation": {
          "RequestedExecutionDate": "2018-08-06T00:00:00+00:00",
          "InstructedAmount": {
            "Amount": "200.00",
            "Currency": "GBP"
          },
          "DebtorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "11280001234567",
            "Name": "Andrea Frost"
          },
          "CreditorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "08080021325698",
            "Name": "Tom Kirkman"
          },
          "RemittanceInformation": {
            "Reference": "DSR-037",
            "Unstructured": "Internal ops code 5120103"
          }
        }
      },
      "Risk": {
        "PaymentContextCode": "PartyToParty"
      }
    }'
  • The response will bear the ConsentId.

    Code Block
    HTTP/1.1{
    201 Created
    x-jws-signature: V2hhdCB3ZSBnb3QgaGVyZQ0K..aXMgZmFpbHVyZSB0byBjb21tdW5pY2F0ZQ0K
    x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
    Content-Type: application/json
     
    {
      "Data": {
        "ConsentId": " "Data": {
        "ConsentId": "7290",
        "Permission": "Create",
        "Status": "AwaitingAuthorisation",
        "CreationDateTime": "2018-05-05T15:15:13+00:00",
        "StatusUpdateDateTime": "2018-05-05T15:15:13+00:00",
        "Initiation": {
          "RequestedExecutionDate": "2018-08-06T00:00:00+00:00",
          "InstructedAmount": {
            "Amount": "200.00",
            "Currency": "GBP"
          },
          "DebtorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "11280001234567",
            "Name": "Andrea Frost"
          },
          "CreditorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "08080021325698",
            "Name": "Tom Kirkman"
          },
          "RemittanceInformation": {
            "Reference": "DSR-037",
            "Unstructured": "Internal ops code 5120103"
          }
        }
      },
      "Risk": {
        "PaymentContextCode": "PartyToParty"
      },
      "Links": {
        "Self": "https://obank.com/open-banking/v3.1/pisp/domestic-scheduled-payment-consents/7290"
      },
      "Meta": {}
    }

GET /domestic-scheduled-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-scheduled-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'

...

  • 
      --cert <PUBLIC_KEY_FILE_PATH> --key <PRIVATE_KEY_FILE_PATH> \

Multiexcerpt include
MultiExcerptNameUserAccessToken
PageWithExcerptDomestic Payments v3.1.1

...

Once the domestic-scheduled-payment-consent has been authorised by the PSU, the PISP can proceed to submitting the domestic-scheduled-payment for processing. This request is an instruction to the ASPSP to begin the process of the domestic scheduled payment. 

Expand
titleClick here to see how it is done

POST /domestic-scheduled-payments

The PISP must ensure that the Initiation and Risk sections of the domestic-scheduled-payment match the corresponding Initiation and Risk sections of the domestic-scheduled-payment-consent resource. The response contains DomesticScheduledPaymentId along with the payment submission details. 

Any operations on the domestic-scheduled-payment resource will not result in a Status change for the domestic-scheduled-payment resource.


Localtab Group
Localtab
titleRequest
Code Block
curl POST \
  https://<WSO2_OB_APIM_HOST>:8243/open-banking/v3.1/pisp/domestic-scheduled-payments HTTP/1.1Authorization: Bearer  \
  -H 'Authorization: Bearer <USER_ACCESS_TOKEN>' \
  -H 'x-idempotency-key: FRESNO.1317.GFX.22' \
  -H 'x-jws-signature: TGlmZSdzIGEgam91cm5leSBub3QgYSBkZXN0aW5hdGlvbiA=..T2ggZ29vZCBldmVuaW5nIG1yIHR5bGVyIGdvaW5nIGRvd24gPw==' \
  -H 'x-fapi-financial-id: OB/2017/001
 open-bank' \
  -H 'x-fapi-customer-last-logged-time:  Sun, 10 Sep 2017 19:43:31 GMT' \
  -H 'x-fapi-customer-ip-address: 104.25.212.99' x-\
  -H 'x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  --cert <PUBLIC_KEY_FILE_PATH> --key <PRIVATE_KEY_FILE_PATH> \
-d '{
  "Data": {
    "ConsentId": "7290",
    "Initiation": {
      "RequestedExecutionDate": "2018-08-06T00:00:00+00:00",
      "InstructedAmount": {
        "Amount": "200.00",
        "Currency": "GBP"
      },
      "DebtorAccount": {
        "SchemeName": "UK.OBIE.SortCodeAccountNumber",
        "Identification": "11280001234567",
        "Name": "Andrea Frost"
      },
      "CreditorAccount": {
        "SchemeName": "UK.OBIE.SortCodeAccountNumber",
        "Identification": "08080021325698",
        "Name": "Tom Kirkman"
      },
      "RemittanceInformation": {
        "Reference": "DSR-037",
        "Unstructured": "Internal ops code 5120103"
      }
    }
  },
  "Risk": {
    "PaymentContextCode": "PartyToParty"
  }
}'
Localtab
titleResponse
Code Block
HTTP/1.1 201 Createdx-jws-signature: V2hhdCB3ZSBnb3QgaGVyZQ0K..aXMgZmFpbHVyZSB0byBjb21tdW5pY2F0ZQ0K
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json
 
{
  {
  "Data": {
    "DomesticScheduledPaymentId": "7290-003",
    "ConsentId": "7290",
    "Status": "InitiationPending",
    "CreationDateTime": "2018-05-05T15:15:13+00:00",
    "StatusUpdateDateTime": "2018-05-05T15:15:13+00:00",
    "Initiation": {
      "RequestedExecutionDate": "2018-08-06T00:00:00+00:00",
      "InstructedAmount": {
        "Amount": "200.00",
        "Currency": "GBP"
      },
      "DebtorAccount": {
        "SchemeName": "UK.OBIE.SortCodeAccountNumber",
        "Identification": "11280001234567",
        "Name": "Andrea Frost"
      },
      "CreditorAccount": {
        "SchemeName": "UK.OBIE.SortCodeAccountNumber",
        "Identification": "08080021325698",
        "Name": "Tom Kirkman"
      },
      "RemittanceInformation": {
        "Reference": "DSR-037",
        "Unstructured": "Internal ops code 5120103"
      }
    }
  },
  "Links": {
    "Self": "https://obank.com/open-banking/v3.1/pisp/domestic-scheduled-payments/7290-003"
  },
  "Meta": {}
}


The following API functionality is also available in the Domestic Scheduled Payments v3.1.1.


Expand
titleRetrieval of a domestic-scheduled-payment resource

GET /domestic-scheduled-payments/{DomesticScheduledPaymentId}

The PISP retrieves the domestic-scheduled-payment resource to check its status.

Localtab Group
Localtab
titleRequest
Code Block
curl GET 
  https:/domestic-scheduled-payments/<DomesticPaymentId> HTTP/1.1
/<WSO2_OB_APIM_HOST>:8243/open-banking/v3.1/pisp/domestic-scheduled-payments/<DomesticPaymentId> \
  -H 'Authorization: Bearer <USER_ACCESS_TOKEN>' \
  -H 'x-fapi-financial-id: OB/2017/001
 open-bank' \
  -H 'x-fapi-customer-last-logged-time:  Sun, 10 Sep 2017 19:43:31 GMT
x-' \
  -H 'x-fapi-customer-ip-address: 104.25.212.99' \
  -H 'x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d' \
  -H 'Accept: application/json' \
  --cert <PUBLIC_KEY_FILE_PATH> --key <PRIVATE_KEY_FILE_PATH> \
Localtab
titleResponse
Code Block
{
    "Meta": {
         
    },
    "Links": {
        "Self": "/domestic-scheduled-payments/e807db2e-174e-4921-854d-53fa730a9aa6-87"
    },
    "Data": {
        "Status": "InitiationCompleted",
        "StatusUpdateDateTime": "2020-10-06T05:57:04Z",
        "CreationDateTime": "2020-10-06T05:57:04Z",
        "DomesticScheduledPaymentId": "e807db2e-174e-4921-854d-53fa730a9aa6-87",
        "ConsentId": "e807db2e-174e-4921-854d-53fa730a9aa6",
        "Initiation": {
            "LocalInstrument": "UK.OBIE.BACS",
            "DebtorAccount": {
                "SecondaryIdentification": "30080012343456",
                "SchemeName": "UK.OBIE.SortCodeAccountNumber",
                "Identification": "30080012343456",
                "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"
            },
            "RequestedExecutionDateTime": "2020-10-11T05:52:37.102Z",
            "InstructedAmount": {
                "Amount": "30.80",
                "Currency": "GBP"
            },
            "CreditorPostalAddress": {
                "StreetName": "Acacia Avenue",
                "CountrySubDivision": "Wessex",
                "Department": "department1",
                "BuildingNumber": "27",
                "TownName": "Sparsholt",
                "Country": "UK",
                "SubDepartment": "sub dept",
                "AddressType": "Correspondence",
                "PostCode": "GU31 2ZZ"
            }
        }
    }
}