Introduction
A transaction represents a sms payment as a result of a premium rate text message.
Properties
Name |
Type |
Example |
Description |
---|---|---|---|
transactionGuid |
STRING |
a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx |
Unique GUID |
createdTs |
TIMESTAMP |
2019-12-31 15:59:59 +0100 |
Timestamp at which the transaction was created |
failedTs |
TIMESTAMP |
2019-12-31 15:59:59 +0100 |
Timestamp at which the transaction failed |
msisdn |
STRING |
4512345678 |
Phone with Country Code (wiki on Country Code) with 1-3 digits reserved for country code without prefixes, such as 00 (wiki on MSISDN). |
state |
ENUM |
Pending | Charged | Failed | Error | Refunded |
The state of the transaction |
subscriptionGuid |
STRING |
a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx |
Unique GUID of a related subscription, if recurring payment |
amount |
DOUBLE |
100.0 |
The amount of the transaction |
amountVat |
DOUBLE |
0.0 |
Amount VAT |
paymentType |
ENUM |
Single | Recurring | OneOff |
The type of the transaction |
mtMessageGuid |
STRING |
a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx |
Unique GUID of the premium rate text message that resulted in the transaction |
errorCode |
STRING |
4T_5002 |
Error code |
errorDescription |
STRING |
Payment was not allowed by the telecommunications service provider |
Description of the error |
text |
STRING |
Tak for din støtte … |
The payment text that was send to the donor |
channel |
STRING |
1217 |
The shortcode the transaction was conducted via |
keyword |
STRING |
støt |
|
contentType |
STRING |
"PhysicalProduct", |
The content type defines the fees applied to a transaction |
invoiceText |
STRING |
|
Invoice text for customer |
revenueText |
STRING |
|
Revenue text for organization |
Endpoints
GET /transaction/failed?pageNumber={pageNumber}&pageSize={pageSize}
Get a list of failed transactions. Pagination is required.
Response
HTTP |
Description |
---|---|
200 |
OK |
HTTP 200 Example
{
"pageNumber": 1,
"pageSize": 15,
"list": [
{
"transactionGuid": "cbf249a7-xxxx-xxxx-xxxx-c9af14aba2bf",
"createdTs": "2021-09-09 14:51:06 +0200",
"failedTs": "2021-09-09 14:51:09 +0200",
"merchantId": "your-ngo",
"msisdn": "45xxxxxxxxx",
"subscriptionGuid": "bba561b2-xxxx-xxxx-xxxx-f5a849a6f49d",
"amount": 100.0,
"amountVat": 0.0,
"paymentType": "Recurring",
"mtMessageGuid": "33a547f0-xxxx-xxxx-xxxx-c542290f3911",
"errorCode": "4T_5002",
"errorDescription": "Payment was not allowed by the telecommunications service provider",
"text": "Tusind tak for din månedlige støtte på 100 kroner til vores arbejde.\r\n(Afmeld dit medlemskab: Send STØTMINNGO STOP)",
"channel": "1217",
"keyword": "STØTMINNGO",
"contentType": "HumanitarianDonation",
"invoiceText": "Medlemskab",
"revenueText": "Medlemskab"
},
{
"transactionGuid": "5861c767-9b4c-4508-ba97-b0e63d5819aa",
"createdTs": "2021-09-08 14:50:57 +0200",
"failedTs": "2021-09-08 14:51:01 +0200",
"merchantId": "your-ngo",
"msisdn": "45xxxxxxxxx",
"subscriptionGuid": "af8b0833-9fdf-47ce-afc4-94115eaa29d4",
"amount": 85.0,
"amountVat": 0.0,
"paymentType": "Single",
"mtMessageGuid": "d3b03d0f-51b5-44a8-9928-7a93a2920c68",
"errorCode": "4T_50024",
"errorDescription": "Specified amount failed due to error at acquirer",
"text": "Tusind tak for din donation på 85 kroner til vores arbejde.",
"channel": "1217",
"keyword": "STØTMINANDENNGO",
"contentType": "HumanitarianDonation",
"invoiceText": "Donation",
"revenueText": "Donation"
}
]
}
Error codes
SMS transactions may fail due to a wide range of factors, which most often stem from the telecommunications providers.
Here is a list of the most common error codes that may be reported:
ErrorCode |
ErrorDescription |
---|---|
4T_500 |
Internal Server Error (at the telecommunications providers side) |
4T_5001 |
Unknown account |
4T_5002 |
Payment was not allowed by the telecommunications service provider |
4T_50024 |
Specified amount failed due to error at acquirer |
4T_50027 |
Specified amount exceeds the monthly PSD2 limit for this account |
4T_500200 |
Internal Server Error (at the telecommunications providers side) |
Note that not all failed transactions may have an errorCode or errorDescription registered.