Make a SWIFT payment
This API lets you to make a SWIFT payment, an international transfer using SWIFT payment scheme. There maybe further restrictions in the preapproved amount, and/or approvals needed for a payment transaction to fully get settled.
/CreatePaymentSWIFT
import requests
import json
url = “https://stageapi.cfsemoney.com/v1/CreatePaymentSWIFT”
payload = json.dumps({
{
“fromAccountIBAN”: “GB35CLRB042715xxxx9610”,
“toAccountIBAN”: “GB69CLRB042715xxxx9540”,
“currency”: “USD”,
“type”: “Business”,
“paymentMethod”: “SWIFT”,
“paymentReference”: “API Ref 1”,
“notes”: “”,
“beneficiaryName”: “CFS-Zipp Limited”,
“beneficiaryAddr1”: “790, Uxbridge Road”,
“beneficiaryAddr2”: “”,
“beneficiaryCity”: “Hayes”,
“beneficiaryState”: “Middlesex”,
“beneficiaryCountry”: “United Kingdom”,
“beneficiaryPostCode”: “UB4 0RS”,
“beneficiaryBankName”: “Clear Bank”,
“beneficiaryBankAddr1”: “”,
“beneficiaryBankAddr2”: “”,
“beneficiaryBankCity”: “”,
“beneficiaryBankState”: “”,
“beneficiaryBankCountry”: “United Kingdom”,
“beneficiaryBankPostCode”: “”,
“beneficiaryBankCodeType”: “BIC”,
“beneficiaryBankCode”: “CLRBGBXXXXX”,
“interBankDetailsBankName”: “”,
“interBankDetailsAddr1”: “”,
“interBankDetailsAddr2”: “”,
“interBankDetailsCity”: “”,
“interBankDetailsState”: “”,
“interBankDetailsCountry”: “”,
“interBankDetailsPostCode”: “”,
“interBankDetailsBankCode”: “”,
“interBankDetailsBankCodeType”: “”,
“amount”: 15.5
}
})
headers = {
‘x-api-key’: ‘YOUR-API-KEY‘,
‘Authorization’: ‘Bearer <<bearer-token>>‘,
‘Content-Type’: ‘application/json’
}
response = requests.request(“POST”, url, headers=headers, data=payload)
print(response.text)
curl –location –request POST ‘https://stageapi.cfsemoney.com/v1/CreatePaymentSWIFT’ \
–header ‘x-api-key’: ‘YOUR-API-KEY‘ \
–header ‘Authorization: Bearer <<bearer-token>>‘ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
{
“fromAccountIBAN”: “GB35CLRB042715xxxx9610”,
“toAccountIBAN”: “GB69CLRB042715xxxx9540”,
“currency”: “USD”,
“type”: “Business”,
“paymentMethod”: “SWIFT”,
“paymentReference”: “API Ref 1”,
“notes”: “”,
“beneficiaryName”: “CFS-Zipp Limited”,
“beneficiaryAddr1”: “790, Uxbridge Road”,
“beneficiaryAddr2”: “”,
“beneficiaryCity”: “Hayes”,
“beneficiaryState”: “Middlesex”,
“beneficiaryCountry”: “United Kingdom”,
“beneficiaryPostCode”: “UB4 0RS”,
“beneficiaryBankName”: “Clear Bank”,
“beneficiaryBankAddr1”: “”,
“beneficiaryBankAddr2”: “”,
“beneficiaryBankCity”: “”,
“beneficiaryBankState”: “”,
“beneficiaryBankCountry”: “United Kingdom”,
“beneficiaryBankPostCode”: “”,
“beneficiaryBankCodeType”: “BIC”,
“beneficiaryBankCode”: “CLRBGBXXXXX”,
“interBankDetailsBankName”: “”,
“interBankDetailsAddr1”: “”,
“interBankDetailsAddr2”: “”,
“interBankDetailsCity”: “”,
“interBankDetailsState”: “”,
“interBankDetailsCountry”: “”,
“interBankDetailsPostCode”: “”,
“interBankDetailsBankCode”: “”,
“interBankDetailsBankCodeType”: “”,
“amount”: 15.
}
}’
{
“paymentMethod”: {“type”: “string”,”minLength”: 2,”maxLength”:50,”enum”: [“SWIFT”]},
“fromAccountIBAN”: {“type”: “string”,”minLength”: 2,”maxLength”:50},
“toAccountIBAN”: {“type”: “string”,”minLength”: 2,”maxLength”:50},
“currency”: {“type”: “string”,”minLength”: 3,”maxLength”:3},
“type”: {“type”: “string”,”minLength”: 1,”maxLength”:15},
“paymentReference”: {“type”: “string”,”minLength”: 1,”maxLength”:140},
“amount”: {“type”: “number”},
“beneficiaryName”: {“type”: “string”,”minLength”: 2,”maxLength”:140},
“beneficiaryAddr1”: {“type”: “string”,”minLength”: 2,”maxLength”:70},
“beneficiaryCity”: {“type”: “string”,”minLength”: 2,”maxLength”:35},
“beneficiaryState”: {“type”: “string”,”minLength”: 2,”maxLength”:35},
“beneficiaryCountry”: {“type”: “string”,”minLength”: 2,”maxLength”:100},
“beneficiaryPostCode”: {“type”: “string”,”minLength”: 2,”maxLength”:25},
“beneficiaryBankName”: {“type”: “string”,”minLength”: 2,”maxLength”:140},
“beneficiaryBankCodeType”: {“type”: “string”,”minLength”: 2,”maxLength”:25,”enum”:[“BIC”,”ABA”]},
“beneficiaryBankCode”: {“type”: “string”,”minLength”: 2,”maxLength”:25}
},”required”:
[“paymentMethod”,
“fromAccountIBAN”,”toAccountIBAN”,”currency”,”type”,”paymentReference”,”amount”,”beneficiaryName”,”beneficiaryAddr1″,
“beneficiaryCity”,”beneficiaryState”,”beneficiaryCountry”,”beneficiaryPostCode”,”beneficiaryBankName”,”beneficiaryBankCodeType”,
“beneficiaryBankCode”] }
{
“statusCode”: 200,
“body”: “{\”transaction_id\”: \”6a5ca644-3364-4b1c-b90c- 73cf9bc2e065\”, \”message\”: \”transaction created successfully.\”, \”status\”: true}”
}
{
“statusCode”: 400,
“body”: “{\”message\”: \”xxx”}”
}