DELETE /v1/payments/cross-border-credit-transfers/{paymentId}

 

Path parameters

Attribute

Type

Description

paymentId

String

ID of the corresponding payment initiation object as returned by a Payment Initiation Request

 

Query Parameters

No query parameters.

 

Request headers

Attribute

Type

Condition

Description

X-Request-ID

UUID

Mandatory

ID of the request, unique to the call, as determined by the initiating party (TPP)

Authorization

String

Mandatory

The oAuth2 Bearer token obtained from the performed SCA performed prior to this request.

API-Key

String

Mandatory

Consumer key available on the developers portal.

Consent-ID

UUID

Mandatory

The consent ID of the related PIS consent.

 

Request body

No request body

 

Response Code

If the DELETE is sufficient for cancelling the payment, an HTTP response code 200 will be returned.

If the DELETE is not sufficient for cancelling the payment, since an authorisation of the cancellation by the PSU is needed, an HTTP response code 202 will be returned.

 

Response headers

Attribute

Type

Condition

Description

X-Request-ID

UUID

Mandatory

ID of the request, unique to the call, as determined by the initiating party (TPP)

 

Response body

No response body

 

Example

 

Request

curl -X DELETE \
https://mp-psd2-api.mypos.com/v1/payments/e454aa67-2829-49da-a4e3-9fbcdd6e7545 \
-H 'API-Key: aGDmxHAmpMWUL1txqCsjEcOS' \
-H 'Authorization: Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X' \
-H 'X-Request-ID: a552babc-7081-44e7-9361-61eb17e0bfd9' \
-H 'Consent-ID: 3c7816ee-3d51-4bf5-8ced-ece2af35d431'
import requests

url = "https://mp-psd2-api.mypos.com/v1/payments/e454aa67-2829-49da-a4e3-9fbcdd6e7545"

headers = {
    'API-Key': "aGDmxHAmpMWUL1txqCsjEcOS",
    'X-Request-ID': "a552babc-7081-44e7-9361-61eb17e0bfd9",
    'Authorization': "Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X"
}

response = requests.request("DELETE", url, headers=headers)

print(response.text)
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://mp-psd2-api.mypos.com/v1/payments/e454aa67-2829-49da-a4e3-9fbcdd6e7545',
  headers: {
    'Authorization': 'Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X',
    'X-Request-ID': 'a552babc-7081-44e7-9361-61eb17e0bfd9',
    'API-Key': 'aGDmxHAmpMWUL1txqCsjEcOS'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
<?php

$request = new HttpRequest();
$request->setUrl('https://mp-psd2-api.mypos.com/v1/payments/e454aa67-2829-49da-a4e3-9fbcdd6e7545');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'Authorization' => 'Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X',
  'X-Request-ID' => 'a552babc-7081-44e7-9361-61eb17e0bfd9',
  'API-Key' => 'aGDmxHAmpMWUL1txqCsjEcOS'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

 

Response