Cancel a payment request initiation

Use case 

This method allows the PISP to cancel a payment initiation request previously sent to the ASPSP for a given PSU through a POST / paymentRequests request when the payment has not been executed yet.

Only SCT CORE differed operations in euros can be cancelled.

On the other way, and only for Banques Populaires, Banque de Savoie and Banque Palatine, a SCT operation initiated using PSD2 PISP API (whatever the version) can be cancelled using this request (in other words, this SCT operation can be cancelled thru another channel such as direct access "Cyber" or mobile app "Cyber mobile"). 

➤ Prerequisites

In order to be able to use this request, the TPP needs to fulfill eligibility criterias as "PISP" role (see "Eligibility" section), and muts get OAuth access token (see use case  "Overview" > "Retrieve a Token").

The PISP has already sent a request which has been temporarly stored, the ASPSP has given back a link to this saved request.

➤ Request 

The entry point depends on the bank code parameter (<bkcode>) used for the requesting the access token.

The list of current available bank institutions in sandbox is detailed below (see overall <bkcode> in "Limitations" section) :

Bank CodeBank Name Bank Short Name 
13807 B.P Grand Ouest BPGO
17515 CE Ile de France  CEIDF

For example, the entry point in production live to cancel a SCT PIPS operation for a BPGO PSU is :

PUT https://www.13807.live.api.89c3.com/stet/psd2/v1/payment-requests/{paymentRequestResourceId}

 

➤ Mandatory or optional parameters in the request body 

The mandated parameter is "paymentRequestResourceId" : identification of the PISP initiation to cancel.

Please refer to the STET specifications for the other format and optional parameters. Before sending the cancel request, the TPP can check previously the status of the PISP operation using GET /stet/psd2/v1/payment-requests/{paymentRequestResourceId}. A PISP operation can be cancelled if the following data have the values as described below :  

Pour savoir si un virement est éligible les informations suivantes doivent être valorisées dans la requête comme suit :

  • paymentInformationStatus : "ACSP"
  • transactionStatus (in "creditTransferTransaction" object) : "PDNG"
  • serviceLevel : "SEPA" 
  • currency : "EUR" 
  • numberOfTransactions : "1"
  • frequency : shall not be filled 
  • localInstrument : shall not be filled 
  • requestedExecutionDate : should be at least the next day (D+1)

 

In order to be taken into accont, the cancel request sent to the ASPSP shall include the following data and values as described below (see API PSD2 STET_V1.4.0.47 Part 3 Interaction Examples p.27) :

  • transactionStatus (in "creditTransferTransaction" object) : "RJCT" 
  • statusReasonInformation (in "creditTransferTransaction" object) : "DS02"
  • All _links shall not be included 
  • "paymentRequest" parent label shall not be included as well as the final brace "}".

The other data of the request shall be the same as the ones retrieved using the GET method.

➤ Result 

If all data sent are correctly formatted, a HTTP 200 response will be returned, and will include PISP operation ressourceId, SCA mode (redirect), consent URL (urlconsent_approval_URL) and nounce.

Please note that the data "paymentRequestRessourceId" is included as a parameter in the URL consentement "consentApproval" sent back during the PISP initial operation (same for the nounce).

 Error codes

Error

HTTP Code
Label
Reason
Generic, wrong format (strcuture)
400 Bad request error code : FF01
message : RJCT
Wrong format (BIC) 400 Bad request error code : FF01
message : RJCT
error : le champ creditorAgent.bicFi bicFi-Code allocated to a financial institution by the ISO 9362 Registration Authority as described in ISO 9362
Wrong format (Service Level) 400 Bad request  error code : FF01
message : RJCT
error : value not one of declared Enum instance names: [SEPA, NURG]
Wrong format (chargeBearer other than SLEV) 400 Bad request error code: FF01
message: RJCT
error: value not one of declared Enum instance names: [SLEV]
Wrong format (schemeName) 400 Bad request error code: FF01
message : RJCT
error : le champ creditor.privateId.schemeName schemeName-Possible values BANK,COID,SREN,DSRET,NIDN,OAUT,CPAN
Wrong format (purpose) 400 Bad request error code: FF01
message: RJCT
error: value not one of declared Enum instance names: [TRPT, CASH, CPKC, ACCT, COMC]
Wrong format (categoryPurpose) 400 Bad request error code: FF01
message: RJCT
error: value not one of declared Enum instance names: [CASH, DVPM]
Wrong access token, TLS authentification problem 403 Forbidden  

Request resource unknown

404 Not Found  

Bad request or not allowed

405 Method not allowed  

Generic

500 Internal server error  

 

➤ Example

Cancel Request :

PUT /stet/psd2/v1/payment-requests/00000032fa-159127166900013807464584 

Body of the request 

{
    "resourceId": "00000032fa-159127166900013807464584",
    "paymentInformationId": "azertyui",
    "creationDateTime": "2020-06-04T13:54:29.148+02:00",
    "numberOfTransactions": 1,
    "initiatingParty": {
        "name": "Pisp Name",
        "postalAddress": {
            "country": "FR",
            "addressLine": [
                "512 rue Reaumur",
                "75512 PARIS"
            ]
        },
        "organisationId": {
            "identification": "12FR5",
            "schemeName": "COID",
            "issuer": "ACPR"
        },
        "privateId": null
    },
    "paymentTypeInformation": {
        "instructionPriority": null,
        "serviceLevel": "SEPA",
        "localInstrument": null,
        "categoryPurpose": "DVPM"
    },
    "debtor": {
        "name": "Customer Name",
        "postalAddress": {
            "country": "FR",
            "addressLine": [
                "512 rue Leclerc",
                "94512 Charenton-le-Pont"
            ]
        },
        "organisationId": null,
        "privateId": {
            "identification": "D8183250I0",
            "schemeName": "BANK",
            "issuer": "BICXYYTT512"
        }
    },
    "debtorAccount": {
        "iban": "FR7613685749843054784158595",
        "other": null
    },
    "debtorAgent": {
        "bicFi": "CCBPFRPP512",
        "clearingSystemMemberId": {
            "clearingSystemId": "clearingSystemId",
            "memberId": "memberId"
        },
        "name": "Cpy Name",
        "postalAddress": {
            "country": "FR",
            "addressLine": [
                "512 rue De Gaulle",
                "85000 LRSY"
            ]
        }
    },
    "beneficiary": {
        "id": null,
        "isTrusted": null,
        "creditorAgent": {
            "bicFi": "CCBPFRPP512",
            "clearingSystemMemberId": {
                "clearingSystemId": "clearingSystemId",
                "memberId": "memberId!"
            },
            "name": "Creditor Name",
            "postalAddress": {
                "country": "FR",
                "addressLine": [
                    "512 rue de la primaube",
                    "12512 RODEZ"
                ]
            }
        },
        "creditor": {
            "name": "Amazon SA",
            "postalAddress": {
                "country": "FR",
                "addressLine": [
                    "512 avenue Maupassant",
                    "75512 PARIS"
                ]
            },
            "organisationId": {
                "identification": "852126790",
                "schemeName": "BANK",
                "issuer": "FR"
            },
            "privateId": null
        },
        "creditorAccount": {
            "iban": "FR7613825002000400000041717",
            "other": null
        }
    },
    "ultimateCreditor": null,
    "purpose": "COMC",
    "chargeBearer": "SLEV",
    "paymentInformationStatus": "ACSP",
    "statusReasonInformation": null,
    "fundsAvailability": null,
    "booking": null,
    "requestedExecutionDate": "2020-06-04T13:54:29.148+02:00",
    "creditTransferTransaction": [
        {
            "paymentId": {
                "resourceId": "00000032fa-159127166900113807942902",
                "instructionId": "instructionId 1591271669",
                "endToEndId": "endToEndId 1591271669"
            },
            "requestedExecutionDate": null,
            "endDate": null,
            "executionRule": null,
            "frequency": null,
            "instructedAmount": {
                "currency": "EUR",
                "amount": "2.12"
            },
            "beneficiary": null,
            "ultimateCreditor": null,
            "regulatoryReportingCodes": [],
            "remittanceInformation": [
                "remittanceInformation01"
            ],
            "transactionStatus": "RJCT",
            "statusReasonInformation": "DS02"
        }
    ],
    "supplementaryData": {
        "acceptedAuthenticationApproach": [
            "REDIRECT"
        ],
        "appliedAuthenticationApproach": "REDIRECT",
        "scaHint": "scaExemption",
        "successfulReportUrl": "https://www.successful.fr",
        "unsuccessfulReportUrl": "https://www.unsuccessful.fr"
    }
}

Result :

Status code : 200

Response body  :

{
    "appliedAuthenticationApproach": "REDIRECT",
    "_links": {
        "consentApproval": {
            "href": "https://www.13807.live.api.89c3.com/89C3api/accreditation/v1/cancellation?paymentRequestRessourceId=00000032fa-159127166900013807464584&nonce=RFxE0ywQmzW0Z68xJloN&creditorName=QW1hem9uIFNB&creditorAccount=RlI3NjEzODI1MDAyMDAwNDAwMDAwMDQxNzE3&amount=Mi4xMg%3D%3D¤cy=RVVS&successfulReportUrl=aHR0cHM6Ly93d3cuYXBpLjg5YzMuY29tLmZy&unsuccessfulReportUrl=aHR0cHM6Ly93d3cuYXBpLjg5YzMuY29tLmZyL25vdXMtY29udGFjdGVy&debtorAccount=RlI3NjEzODA3MDA4MDQzMDAxOTY1NDA1MTU4&privateId=RDgxODMyNTBJMA%3D%3D&requestedExecutionDate=MjAyMC0wNi0yNFQwOTowMTozMy44NTQrMDI6MDA%3D&method=UFVU",
            "templated": true
        }
    }
}