POST /v1/payments/cross-border-credit-transfers

POST /v1/payments/sepa-credit-transfers

 

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.

PSU-IP-Address

String

Mandatory

The forwarded IP address header field consists of the corresponding http request IP address field between PSU and TPP

Consent-ID

UUID

Mandatory

The consent ID of the related AIS consent.

PSU-IP-Port

String

Optional

The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available

PSU-Device-ID

UUID

Optional

UUID (Universally Unique Identifier) for a device, which is used by the PSU if available. UUID identifies either a device or a device dependent application installation. In case of an installation identification this ID needs to be unaltered until removal from device

PSU-Geo-Location

String

Optional

The forwarded Geo Location of the corresponding http request between PSU and TPP if available

 

Request body

Attribute

Type

Condition

Description

instructedAmount

Amount

Mandatory

The amount and currency of the transfer

instructedCurrency

String

Mandatory

The currency of the payment amount. 3 character ISO 4217 code (eg. “EUR”, “GBP”, “USD”).

debtorAccount

String

Optional

The debtor’s account IBAN

creditorId

Int

Mandatory

The id of the beneficiary. Available beneficiaries can be listed via Get Payment Beneficiaries List.

paymentReason

String

Mandatory

The reason of the payemnt

 

Response Code

HTTP Response Code 201 (Created).

 

Response headers

Attribute

Type

Condition

Description

Location

String

Mandatory

Location of the crated resource (if created)

X-Request-ID

UUID

Mandatory

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

ASPSP-SCA-Approach

String

Mandatory

REDIRECT

 

Response body

Attribute

Type

Condition

Description

paymentStatus

Payment Status

Mandatory

The Payment Status.

paymentId

String

Mandatory

Resource identification of the generated payment initiation resource

_links

Links

Mandatory

A list of hyperlinks to be recognized by the TPP. Typical value will be “scaOAuth”

psuMessage

String

Optional

Text to be displayed to the PSU

tppMessages

Array of TPP

Message

Information

Optional

Messages to the TPP on operational issues

 

Example

 

Request

curl -X POST \
https://mp-psd2-api.mypos.com/v1/payments/sepa-credit-transfers \
-H 'API-Key: aGDmxHAmpMWUL1txqCsjEcOS' \
-H 'Authorization: Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X' \
-H 'TPP-Redirect-URI: https://test.com' \
-H 'X-Request-ID: a552babc-7081-44e7-9361-61eb17e0bfd9' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'debtorAccount=LU088060050979717340&creditorId=1&instructedAmount=20&instructedCurrency=EUR&paymentReason=Test%20payment'
import requests

url = "https://mp-psd2-api.mypos.com/v1/payments/sepa-credit-transfers"
payload = dict(
    debtorAccount='LU088060050979717340',
    creditorId=1,
    instructedAmount=20.00,
    instructedCurrency='EUR',
    paymentReason='Test payment'
)

headers = {
    'API-Key': "aGDmxHAmpMWUL1txqCsjEcOS",
    'X-Request-ID': "a552babc-7081-44e7-9361-61eb17e0bfd9",
    'TPP-Redirect-URI': 'https://test.com',
    'Authorization': "Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X",
    'Content-Type': "application/x-www-form-urlencoded"
}

response = requests.request("POST", url, data=payload, headers=headers)

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

var options = { method: 'POST',
  url: 'https://mp-psd2-api.mypos.com/v1/payments/sepa-credit-transfers',
  headers: {
    'Authorization': 'Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X',
    'X-Request-ID': 'a552babc-7081-44e7-9361-61eb17e0bfd9',
    'TPP-Redirect-URI': 'https://test.com',
    'API-Key': 'aGDmxHAmpMWUL1txqCsjEcOS',
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  form: { 
    debtorAccount: 'LU088060050979717340',
    creditorId: 1,
    instructedAmount: '20',
    instructedCurrency: 'EUR',
    paymentReason: 'Test payment'
  }
};

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/sepa-credit-transfers');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Authorization' => 'Bearer oqeeWzoYfqkf1RsfyaB3hyNiLvY7GNAV6Kta7sGa9X',
  'X-Request-ID' => 'a552babc-7081-44e7-9361-61eb17e0bfd9',
  'TPP-Redirect-URI' => 'https://test.com',
  'API-Key' => 'aGDmxHAmpMWUL1txqCsjEcOS'
));

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
  'debtorAccount' => 'LU088060050979717340',
  'creditorId' => '1',
  'instructedAmount' => '20',
  'instructedCurrency' => 'EUR',
  'paymentReason' => 'Test payment'
));

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

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

 

Response 
{
    "paymentId": "e454aa67-2829-49da-a4e3-9fbcdd6e7545",
    "paymentStatus": "RCVD",
    "_links": {
        "self": {
            "href": "/v1/payments/cross-border-credit-transfers/e454aa67-2829-49da-a4e3-9fbcdd6e7545"
        },
        "status": {
            "href": "/v1/payments/cross-border-credit-transfers/e454aa67-2829-49da-a4e3-9fbcdd6e7545/status"
        },
        "scaStatus": {
            "href": "v1/consents/3c7816ee-3d51-4bf5-8ced-ece2af35d431/status"
        },
        "scaOAuth": {
            "href": "https://www.mypos.com?open_bank_payment_id=e454aa67-2829-49da-a4e3-9fbcdd6e7545"
        }
    }
}