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: Fix selflink

...

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": "ANSM023",
          "EndToEndIdentification": "FRESCO.21302.GFX.37",
          "InstructedAmount": {
            "Amount": "20.00",
            "Currency": "GBP"
          },
          "DebtorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "11280001234567",
            "Name": "Andrea Smith"
          },
          "CreditorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "08080021325698",
            "Name": "Bob Clements"
          },
          "RemittanceInformation": {
            "Reference": "FRESCO-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
    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",
          "EndToEndIdentification": "FRESCO.21302.GFX.37",
          "InstructedAmount": {
            "Amount": "20.00",
            "Currency": "GBP"
          },
          "DebtorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "11280001234567",
            "Name": "Andrea Smith"
          },
          "CreditorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "08080021325698",
            "Name": "Bob Clements"
          },
          "RemittanceInformation": {
            "Reference": "FRESCO-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": "7290",
        "Status": "AwaitingAuthorisation",
        "CreationDateTime": "2017-06-05T15:15:13+00:00",
        "StatusUpdateDateTime": "2017-06-05T15:15:13+00:00",
        "Initiation": {
          "InstructionIdentification": "ANSM023",
          "EndToEndIdentification": "FRESCO.21302.GFX.37",
          "InstructedAmount": {
            "Amount": "20.00",
            "Currency": "GBP"
          },
          "DebtorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "11280001234567",
            "Name": "Andrea Smith"
          },
          "CreditorAccount": {
            "SchemeName": "UK.OBIE.SortCodeAccountNumber",
            "Identification": "08080021325698",
            "Name": "Bob Clements"
          },
          "RemittanceInformation": {
            "Reference": "FRESCO-037",
            "Unstructured": "Internal ops code 5120103"
          }
        }
      },
      "Risk": {
        "PaymentContextCode": "PartyToParty"
      },
      "Links": {
        "Self": "https://api.alphabankobank.com/open-banking/v3.1/pisp/domestic-payment-consents/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:8243obank.com/open-banking/v3.1/pisp/domestic-payment-consents4a40cde1consents/4a40cde1-e596-4612-93dc-85e2aa083dbb"
        },
        "Meta": {}
    }

...

Expand
titleClick here to see how it is done

POST /domestic-payments

The PISP must ensure that the Initiation and Risk sections of the domestic-payment match the corresponding Initiation and Risk sections of the domestic-payment-consent resource. If the two do not match, the ASPSP must not process. Any operations on the domestic-payment resource do not result in a status change for the domestic-payment resource.

The response contains  DomesticPaymentId along with the payment submission details. 

Localtab Group
Localtab
titleRequest
Code Block
POST /domestic-payments HTTP/1.1
Authorization: Bearer <USER_ACCESS_TOKEN>
x-idempotency-key: FRESNO.1317.GFX.22
x-jws-signature: TGlmZSdzIGEgam91cm5leSBub3QgYSBkZXN0aW5hdGlvbiA=..T2ggZ29vZCBldmVuaW5nIG1yIHR5bGVyIGdvaW5nIGRvd24gPw==
x-fapi-financial-id: OB/2017/001
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": {
    "ConsentId": "58923",
    "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",
      "CountySubDivision": [
        "Wessex"
      ],
      "Country": "UK"
    }
  }
}
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": {
    "DomesticPaymentId": "58923-001",
    "ConsentId": "58923",
    "Status": "AcceptedSettlementInProcess",
    "CreationDateTime": "2017-06-05T15:15:22+00:00",
    "StatusUpdateDateTime": "2017-06-05T15:15:13+00:00",
    "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"
      }
    }
  },
  "Links": {
    "Self": "https://apiobank.alphabank.com/open-banking/v3.1/pisp/domestic-payments/58923-001"
  },
  "Meta": {}
}

...

Expand
titleConfirmation of funds on a domestic-payment-consent resource

GET /domestic-payment-consents/{ConsentId}/funds-confirmation

The API endpoint allows the PISP to ask an ASPSP to confirm funds on a domestic-payment-consent resource.

An ASPSP can only respond to a funds confirmation request if the domestic-payment-consent resource has an Authorised status. The confirmation of funds requests do not affect the status of the domestic-payment-consent resource.

Localtab Group
Localtab
titleRequest
Code Block
GET /domestic-payment-consents/<ConsentId>/funds-confirmation HTTP/1.1Authorization: Bearer <USER_ACCESS_TOKEN>
x-fapi-financial-id: OB/2017/001
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
Accept: application/json
Localtab
titleResponse
Code Block
HTTP/1.1 200 OKx-jws-signature: V2hhdCB3ZSBnb3QgaGVyZQ0K..aXMgZmFpbHVyZSB0byBjb21tdW5pY2F0ZQ0K
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json
 
{
    "Data": {
        "FundsAvailableResult": {
            "FundsAvailableDateTime": "2017-06-05T15:15:23+00:00",
            "FundsAvailable": true
        }
    },
    "Links": {
        "Self": "https://apiobank.alphabank.com/open-banking/v3.1/pisp/domestic-payment-consents/58923/funds-confirmation"
    },
    "Meta": {}
}
Expand
titleRetrieval of a domestic-payment resource

GET /domestic-payments/{DomesticPaymentId}

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

Localtab Group
Localtab
titleRequest
Code Block
GET /domestic-payments/<DomesticPaymentId> HTTP/1.1
Authorization: Bearer <USER_ACCESS_TOKEN>
x-fapi-financial-id: OB/2017/001
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
Accept: application/json
Localtab
titleResponse
Code Block
HTTP/1.1 200 OK
x-jws-signature: V2hhdCB3ZSBnb3QgaGVyZQ0K..aXMgZmFpbHVyZSB0byBjb21tdW5pY2F0ZQ0K
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json
 
{
  "Data": {
    "DomesticPaymentId": "58923-001",
    "ConsentId": "58923",
    "Status": "AcceptedSettlementInProcess",
    "CreationDateTime": "2017-06-05T15:15:22+00:00",
    "StatusUpdateDateTime": "2017-06-05T15:15:22+00:00",
    "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"
      }
    }
  },
  "Links": {
    "Self": "https://api.alphabankobank.com/open-banking/v3.1/pisp/domestic-payments/58923-001"
  },
  "Meta": {}
}