Make a GBP payment (FasterPayments)
This API lets you to make a GBP payment, a domestic transfer in UK, using FasterPayments scheme. There maybe further restrictions in the preapproved amount, and/or approvals needed for a payment transaction to fully get settled.
/CreatePaymentGBP
import requests
import json
url = “https://stageapi.cfsemoney.com/v1/CreatePaymentGBP”
payload = json.dumps({
“paymentMethod”: “FPS”,
“fromAccountNumber”: “20017311”,
“fromSortCode”: “040452”,
“recipientName”: “test2”,
“toAccountNumber”: “20017544”,
“toSortCode”: “040452”,
“type”: “Personal”,
“paymentReference”: “Pay Ref 1”,
“bankName”: “HB Bank”,
“amount”: 3.1
})
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/CreatePaymentGBP’ \
–header ‘x-api-key’: ‘YOUR-API-KEY‘ \
–header ‘Authorization: Bearer <<bearer-token>>‘ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
“paymentMethod”: “FPS”,
“fromAccountNumber”: “20017311”,
“fromSortCode”: “040452”,
“recipientName”: “test2”,
“toAccountNumber”: “20017544”,
“toSortCode”: “040452”,
“type”: “Personal”,
“paymentReference”: “Pay Ref 1”,
“bankName”: “HB Bank”,
“amount”: 3.1
}’
{
“$schema”: “
http://json-schema.org/draft-04/schema#”
,
“title”: “User”,
“type”: “object”,
“properties”: {
“paymentMethod”: {“type”: “string”,”minLength”: 3,”maxLength”:15,”enum”: [“FPS”,”CHAPS”]},
“fromAccountNumber”: {“type”: “string”,”minLength”: 8,”maxLength”:8},
“fromSortCode”: {“type”: “string”,”minLength”: 6,”maxLength”:6},
“recipientName”: {“type”: “string”,”minLength”: 1,”maxLength”:140},
“toAccountNumber”: {“type”: “string”,”minLength”: 8,”maxLength”:8},
“toSortCode”: {“type”: “string”,”minLength”: 6,”maxLength”:6},
“type”: {“type”: “string”,”enum”:[“Personal”,”Business”]},
“paymentReference”: {“type”: “string”,”minLength”: 1,”maxLength”:35},
“bankName”: {“type”: “string”,”minLength”: 1,”maxLength”:140},
“amount”: {“type”: “number”},
“beneficiaryCity”: {“type”: “string”, “minLength”: 1, “maxLength”: 140},
“beneficiaryState”: {“type”: “string”, “minLength”: 1, “maxLength”: 140}
},
“required”: [“fromAccountNumber”, “fromSortCode”, “recipientName”, “toAccountNumber”, “toSortCode”, “paymentReference”, “bankName”, “amount”],
“oneOf”: [
{
“properties”: {
“paymentMethod”: {“enum”: [“FPS”]},
“beneficiaryCity”: {“type”: “string”, “minLength”: 1, “maxLength”: 140},
“beneficiaryState”: {“type”: “string”, “minLength”: 1, “maxLength”: 140}
}
},
{
“properties”: {
“paymentMethod”: {“enum”: [“CHAPS”]},
“beneficiaryCity”: {“type”: “string”, “minLength”: 1, “maxLength”: 140},
“beneficiaryState”: {“type”: “string”, “minLength”: 1, “maxLength”: 140}
},
“required”: [“beneficiaryCity”, “beneficiaryState”]
}
]
}
{
“statusCode”: 200,
“body”: “{\”transaction_id\”: \”961d3f2d-fa41-4704-acda-78f768b8d756\”, \”message\”: \”transaction created successfully.\”, \”status\”: true}”
}
{
“statusCode”: 400,
“body”: “{\”message\”: \”xxx”}”
}
Make a GBP payment (CHAPS)
This API lets you to make a GBP payment, a domestic transfer in UK, using CHAPS scheme. There maybe further restrictions in the preapproved amount, and/or approvals needed for a payment transaction to fully get settled.
/CreatePaymentGBP
import requests
import json
url = “https://stageapi.cfsemoney.com/v1/CreatePaymentGBP”
payload = json.dumps({
“paymentMethod”: “CHAPS”,
“fromAccountNumber”: “20017311”,
“fromSortCode”: “040452”,
“recipientName”: “test2”,
“toAccountNumber”: “20017544”,
“toSortCode”: “040452”,
“type”: “Personal”,
“paymentReference”: “Pay Ref 1”,
“bankName”: “HB Bank”,
“amount”: 3.1,
“beneficiaryCity”:”London”,
“beneficiaryState”:”United Kingdom”
})
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/CreatePaymentGBP’\
–header ‘x-api-key’: ‘YOUR-API-KEY‘ \
–header ‘Authorization: Bearer
<<bearer-token>>‘ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
“paymentMethod”: “CHAPS”,
“fromAccountNumber”: “20017311”,
“fromSortCode”: “040452”,
“recipientName”: “test2”,
“toAccountNumber”: “20017544”,
“toSortCode”: “040452”,
“type”: “Personal”,
“paymentReference”: “Pay Ref 1”,
“bankName”: “HB Bank”,
“amount”: 3.1,
“beneficiaryCity”:”London”,
“beneficiaryState”:”England”
}’
{
“$schema”: “
http://json-schema.org/draft-04/schema#”
,
“title”: “User”,
“type”: “object”,
“properties”: {
“paymentMethod”: {“type”: “string”,”minLength”: 3,”maxLength”:15,”enum”: [“FPS”,”CHAPS”]},
“fromAccountNumber”: {“type”: “string”,”minLength”: 8,”maxLength”:8},
“fromSortCode”: {“type”: “string”,”minLength”: 6,”maxLength”:6},
“recipientName”: {“type”: “string”,”minLength”: 1,”maxLength”:140},
“toAccountNumber”: {“type”: “string”,”minLength”: 8,”maxLength”:8},
“toSortCode”: {“type”: “string”,”minLength”: 6,”maxLength”:6},
“type”: {“type”: “string”,”enum”:[“Personal”,”Business”]},
“paymentReference”: {“type”: “string”,”minLength”: 1,”maxLength”:35},
“bankName”: {“type”: “string”,”minLength”: 1,”maxLength”:140},
“amount”: {“type”: “number”},
“beneficiaryCity”: {“type”: “string”, “minLength”: 1, “maxLength”: 140},
“beneficiaryState”: {“type”: “string”, “minLength”: 1, “maxLength”: 140}
},
“required”: [“fromAccountNumber”, “fromSortCode”, “recipientName”, “toAccountNumber”, “toSortCode”, “paymentReference”, “bankName”, “amount”],
“oneOf”: [
{
“properties”: {
“paymentMethod”: {“enum”: [“FPS”]},
“beneficiaryCity”: {“type”: “string”, “minLength”: 1, “maxLength”: 140},
“beneficiaryState”: {“type”: “string”, “minLength”: 1, “maxLength”: 140}
}
},
{
“properties”: {
“paymentMethod”: {“enum”: [“CHAPS”]},
“beneficiaryCity”: {“type”: “string”, “minLength”: 1, “maxLength”: 140},
“beneficiaryState”: {“type”: “string”, “minLength”: 1, “maxLength”: 140}
},
“required”: [“beneficiaryCity”, “beneficiaryState”]
}
]
}
{
“statusCode”: 200,
“body”: “{\”transaction_id\”: \”961d3f2d-fa41-4704-acda-78f768b8d756\”, \”message\”: \”transaction created successfully.\”, \”status\”: true}”
}
{
“statusCode”: 400,
“body”: “{\”message\”: \”xxx”}”
}