Creating a Credit Transfer (API)
Problem
Unable to create a Credit Transfer via our API? Let’s check the main possible issues.
You will need to know:
The HTTP response code, e.g. 400
The “returnCode” in the response body, e.g. “ERROR_UNAUTHORIZED” or “8888”
[Optional] The “code” property if the response body contains a “details” object.
ReturnCode ERROR_UNAUTHORIZED (HTTP 401)
The “Authentication” header was missing, or its value (your token) was incorrect.
E.g.:
'Authorization: Bearer tk_sand_gTEne1etrJfxxTXCnSeF1hTVNzAK4g3KgB7rtP7S32'
ReturnCode ERROR_FORBIDDEN (HTTP 403)
The “x-jws-signature” header was missing, or its value (the JWS signature) was incorrect. See this link for more info: JWS Signature Guide
E.g.:
'x-jws-signature: eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJIUzI1NiJ9..HwKE2GELf3AuvHy_jW9xAkAU218U30J15IxNcujgIrA'
ReturnCode ERROR_NULL_CREDITTRANSFERWRITE (HTTP 400)
No payload was provided in the POST request.
ReturnCode ERROR_BAD_REQUEST (HTTP 400)
Some data in the payload was an incorrect type. Refer to the response field “returnDescription” to help you identify where the issue is.
E.g.:
Request (paymentAmount should be a decimal number)
{
"paymentCurrency": "GBP",
"paymentAmount": "nine"
}
Response
{
"source": "GALACT",
"returnCode": "ERROR_BAD_REQUEST",
"returnDescription": "Cannot deserialize value of type `java.math.BigDecimal` from String \"nine\": not a valid representation"
}
ReturnCode ERROR_INVALID_CREDITTRANSFERWRITE (HTTP 400)
Some data in the payload was missing or invalid. Refer to the response field “returnDescription” to help you identify where the issue is.
E.g.:
Request (missing field paymentAmount)
{
"paymentCurrency": "GBP"
}
Response
{
"source": "GALACT",
"returnCode": "ERROR_INVALID_CREDITTRANSFERWRITE",
"returnDescription": "paymentAmount : must be completed."
}
You can refer to https://ct.galatechnology.com/swagger to check the allowed formats/values for each field.
ReturnCode 8888, with Code 5016 or 7112 (HTTP 400)
Insufficient funds are available. Please add funds (equal to or greater than the amount of the Credit Transfer) to your Nuapay account before trying again.
E.g.:
Request (too large paymentAmount)
{
"paymentCurrency": "GBP",
"paymentAmount": 999999999.99
}
Response
{
"source": "NUAPAY",
"returnCode": "8888",
"returnDescription": "Input validation errors occurred. Please check details.",
"details": [
{
"code": "7152",
"description": "Payment amount exceeds max allowed scheme limit",
"field": "paymentAmount"
}
]
}
Any Other ReturnCode, with source NUAPAY (HTTP 400)
There could be a problem with Nuapay’s system. See this link for more info on the meanings of the returnCode: Nuapay Response Codes
Any Other ReturnCode, with source GALACT (HTTP 400 / 500)
Looks like you’ve run into an unknown error. Please create a ticket via the Service Desk.