Skip to main content

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 of 5000. Example: /rewards/transactions?currency=USD&page[limit]=50
    • offset: Integer, defaults to 0. Example: /rewards/transactions?currency=USD&page[limit]=50&page[offset]=50
  • 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 to DESC, will order transactions by their creation date in the requested order.

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:

AttributesTypeDescription
idIntegerThe ID on the database for the transaction.
intent_idIntegerThe ID on the database for the intent.
intent_tokenStringA string for the intent token associated with the transaction.
transaction_typeStringOne of [Buy, Shop, Reload, Donation, Transfer, EarlyWithdrawalFee], the transaction types are described bellow in the transactions types table.
flipgive_buyer_idIntegerThe ID for the buyer on FlipGive's database.
flipgive_campaign_idIntegerThe ID for the campaign on FlipGive's database.
partner_buyer_idStringThe ID of the buyer, as passed through by our partner on the identified token.
partner_campaign_idStringThe ID of the campaign, as passed through by our partner on the identified token.
merchant_idIntegerThe ID for the merchant on FlipGive's database.
merchant_nameStringThe Name for the merchant.
merchant_departmentStringThe Department for the link/brand/merchant.
brand_idIntegerThe ID for the brand on FlipGive's database.
link_idIntegerThe ID for the link that initiated the transaction, as kept on FlipGive's database.
currencyStringThe currency of the transaction. One of USD, CAD.
total_revenue_centsIntegerAmmount spent, in cents. This will be negative for returns.
campaign_share_centsIntegerAmmount awarded to the campaign, in cents.
partner_share_centsIntegerAmmount awarded to the partner, in cents.
flipgive_share_centsIntegerAmmount awarded to the FlipGive, in cents.
merchant_share_centsIntegerAmmount kept by the merchant, in cents.
offset_share_centsIntegerAmmount to offset any extra cashback in excess of the transation total.
paid_atTimeStampDate and Time when the transaction was paid, or fully processed.
payout_atTimeStampDate and Time when the campaign share has been paid to the campaign.
created_atTimeStampDate and Time when the transaction was created.
updated_atTimeStampDate and Time when the transaction was updated.
finalized_atTimeStampDate and Time when the transaction was finalized.

Transactions types:

transaction_typeDescription
BuyAn transaction where the payment is processed by Flipgive, typicaly a Giftcard.
SaleAn transaction for an online shopping trip.
ReloadAn transaction for a reload on a Reloadable/Autoreloadable Giftcard.
DonationAn transaction for a donation, payment processed by FlipGive.
TransferAn transaction for a transfer of money from a personal account to a campaign.
FlipgiveCreditAn transaction for a Credit issued by FlipGive.
FlipgiveAdjustmentAn transaction used for adjustments, when a refund amount exceeds the original sale.
MissingTransactionCreditAn transaction for a Credit issued by FlipGive for a a completed missint transaction report.
EarlyWithdrawalFeeAn transaction for a fee for withdrawing before the minimun withdraw amount has been reached.