Transactions
This object represents a customer's transaction (completed, pending and failed). These can be undertaken within our system or yours.
An example transaction object
{"id": "b5e1bd24-7379-4d27-b4d8-07120fefc25c","amount": 1000,"currency": "GBX","booking": {"id": "9a33a74f-1e3e-595d-b89f-9da87d289e05","email": "tom@felloh.org","customer_name": "Tom Jones","booking_reference": "FEL-123456","departure_date": null,"return_date": null,"created_at": "2021-11-17T15:10:37.589Z"},"organisation": {"id": "X000","name": "Felloh"},"status": "COMPLETE","method": "PARTNER","type": "CARD","provider_reference": "vmtest-12313211413-ab","completed_at": "2021-11-17T15:11:37.581Z","created_at": "2021-11-17T15:11:37.581Z"}
An example compact transaction object
{"id": "b5e1bd24-7379-4d27-b4d8-07120fefc25c","amount": 1000,"currency": "GBX","status": "COMPLETE","method": "ONLINE","type": "CARD","completed_at": "2021-11-17T15:11:37.581Z","created_at": "2021-11-17T15:11:37.581Z"}
idstring
Unique identifier for the object.
amountnumber
The amount of the transaction
currencystring
The currency of the transaction | see currency documentation
bookingobject
The booking object that the transaction is linked to.
organisationobject
The organisation object that the transaction is linked to.
statusstring
The status of the payment
statusstring
The method that was used to take payment
statusstring
The type of payment method that was used
provider_referencestring
The payment providers reference for the transaction
completed_atdatetime
The datetime at which the transaction object was completed (payment taken).
created_atdatetime
The datetime at which the transaction object was created within our systems
Create one
PUT/partner/transactions/
import axios from 'axios';const response = await axios({method: 'put',url: `https://api.felloh.com/partner/transactions`,data : JSON.stringify({amount: 20000,currency: 'GBX',booking_id: '226009ab-ffe9-4c80-922b-982e8e7849f8',organisation: 'X1234',status: 'COMPLETE',provider_reference: 'vmtest-12313211413-ab',customer_name: 'Tom Brady',completed_at: new Date().toISOString(),}),headers: {'Content-Type': 'application/json',Authorization: `Bearer <YOUR TOKEN HERE>`,},},);
RESPONSE
{"data": {"id": "226009ab-ffe9-4c80-922b-982e8e7849f8",},"errors": {},"meta": {"code": 200,"reason": "OK","message": "The request was successful","request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"}}
This endpoint allows you to create a transaction for one of your organisations
HTTP Method
PUT
HTTP Endpoint
PRODhttps://api.felloh.com/partner/transactions
SANDBOXhttps://sandbox.felloh.com/partner/transactions
Payload
Parameter | Required | Type | Description |
---|---|---|---|
amount | true | integer | The value that the transaction was for |
currency | false | string | The currency that transactions was undertaken in, defaults to GBX, see currency documentation for more information. |
booking_id | false | string | The booking ID that the transaction is linked to. |
organisation | true | string | The organisation ID that you want to create the transaction for. |
status | true | string | A full list of transaction statuses can be found by using the enums endpoint |
provider_reference | true | string | The payment providers reference for the transaction |
customer_name | true | string | The customers full name. |
completed_at | true | datetime | The datetime at which the transaction object was completed (payment taken). |
Response
Parameter | Type | Description |
---|---|---|
id | UUID | The ID of the payment link that you have created |