Transactions
Overview
transactions are FlipGive's atomic object to represent a monetary exchange, be it a sale, refund, or a credit. All transactions roll up to a corresponding intent - as one intent AKA shopping trip may spawn off multiple transactions. For example, one shopping intent can have an initial purchase transaction and a partial/complete refund transaction.
Actions
Index
Request
Path | /rewards/transactions
Verb | GET
Required Parameters:
No required parameters at this time.
Optional Paramters:
- page:
- limit: Integer, defaults to
100
, maximum of5000
. Example:/rewards/transactions?currency=USD&page[limit]=50
- offset: Integer, defaults to
0
. Example:/rewards/transactions?currency=USD&page[limit]=50&page[offset]=50
- limit: Integer, defaults to
- filters:
- link_id: Integer, the ID corresponding to one returned by the links api. It would return all transactions for that particular link.
- paid: Boolean, no default. Setting it to
true
will return transactions that have been fully processed. - transaction_type: String, one of the types described in the Intent Type table bellow. To pass more that one value braket notation as follows:
&transaction_type[]=Buy&transaction_type[]=Shop
- created_at_gt: Integer, Transactions created after the specified date, in senconds after the Linux Epoch.
- paid_at_gt: Integer, Transactions supported after the specified date, in senconds after the Linux Epoch.
- created_at_lt: Integer, Transactions created before the specified date, in senconds after the Linux Epoch.
- paid_at_lt: Integer, Transactions supported before the specified date, in senconds after the Linux Epoch.
- order:
- paid_at: String, one of
["DESC", "ASC"]
, will order transactions by their supported at date in the requested order. - created_at: String, one of
["DESC", "ASC"]
, defaults toDESC
, will order transactions by their creation date in the requested order.
- paid_at: String, one of
Response
The API's response will follow the jsonapi standard. The attributes inside the data object will be as follows:
transactions:
self: contains the url and params of the current request. next: contains the ur and params for the next page of results, if any.
Attributes:
Attributes | Type | Description |
---|---|---|
id | Integer | The ID on the database for the transaction. |
intent_id | Integer | The ID on the database for the intent. |
intent_token | String | A string for the intent token associated with the transaction. |
transaction_type | String | One of [Buy, Shop, Reload, Donation, Transfer, EarlyWithdrawalFee] , the transaction types are described bellow in the transactions types table. |
flipgive_buyer_id | Integer | The ID for the buyer on FlipGive's database. |
flipgive_campaign_id | Integer | The ID for the campaign on FlipGive's database. |
partner_buyer_id | String | The ID of the buyer, as passed through by our partner on the identified token. |
partner_campaign_id | String | The ID of the campaign, as passed through by our partner on the identified token. |
merchant_id | Integer | The ID for the merchant on FlipGive's database. |
merchant_name | String | The Name for the merchant. |
merchant_department | String | The Department for the link/brand/merchant. |
brand_id | Integer | The ID for the brand on FlipGive's database. |
link_id | Integer | The ID for the link that initiated the transaction, as kept on FlipGive's database. |
currency | String | The currency of the transaction. One of USD, CAD . |
total_revenue_cents | Integer | Ammount spent, in cents. This will be negative for returns. |
campaign_share_cents | Integer | Ammount awarded to the campaign, in cents. |
partner_share_cents | Integer | Ammount awarded to the partner, in cents. |
flipgive_share_cents | Integer | Ammount awarded to the FlipGive, in cents. |
merchant_share_cents | Integer | Ammount kept by the merchant, in cents. |
offset_share_cents | Integer | Ammount to offset any extra cashback in excess of the transation total. |
paid_at | TimeStamp | Date and Time when the transaction was paid, or fully processed. |
payout_at | TimeStamp | Date and Time when the campaign share has been paid to the campaign. |
created_at | TimeStamp | Date and Time when the transaction was created. |
updated_at | TimeStamp | Date and Time when the transaction was updated. |
finalized_at | TimeStamp | Date and Time when the transaction was finalized. |
Transactions types:
transaction_type | Description |
---|---|
Buy | An transaction where the payment is processed by Flipgive, typicaly a Giftcard. |
Sale | An transaction for an online shopping trip. |
Reload | An transaction for a reload on a Reloadable/Autoreloadable Giftcard. |
Donation | An transaction for a donation, payment processed by FlipGive. |
Transfer | An transaction for a transfer of money from a personal account to a campaign. |
FlipgiveCredit | An transaction for a Credit issued by FlipGive. |
FlipgiveAdjustment | An transaction used for adjustments, when a refund amount exceeds the original sale. |
MissingTransactionCredit | An transaction for a Credit issued by FlipGive for a a completed missint transaction report. |
EarlyWithdrawalFee | An transaction for a fee for withdrawing before the minimun withdraw amount has been reached. |