Skip to main content

Intents

Overview

intents are FlipGive's object to represent an intention to buy online or a "shopping trip". It also becomes a summary of financial transactions starting with the original sale and any partial or complete refunds associated with the trip. The Intent's token it's also the unique identifier we send to the merchant, and the one that will be used to track any sales related to it.

Actions

Index

Request

Path | /rewards/intents Verb | GET Required Parameters: No required parameters at this time.

Optional Paramters:

  • page:
    • limit: Integer, defaults to 100, maximum of 5000. Example: /rewards/intents?currency=USD&page[limit]=50
    • offset: Integer, defaults to 0. Example: /rewards/intents?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 intents for that particular link.
    • supported: Boolean, no default. Setting it to true will return intents that have resulted in a financial transaction, regardless of the current status, thus, this might return a refunded transaction as well as a supported one. See status for more details.
    • intent_type: String, one of the types described in the Intent Type table bellow. To pass more that one value braket notation as follows: &intent_type[]=Buy&intent_type[]=Shop
    • created_at_gt: Integer, Intents created after the specified date, in senconds after the Linux Epoch.
    • supported_at_gt: Integer, Intents supported after the specified date, in senconds after the Linux Epoch.
    • created_at_lt: Integer, Intents created before the specified date, in senconds after the Linux Epoch.
    • supported_at_lt: Integer, Intents supported before the specified date, in senconds after the Linux Epoch.
  • order:
    • supported_at: String, one of ["DESC", "ASC"], will order intents by their supported at date in the requested order.
    • created_at: String, one of ["DESC", "ASC"], defaults to DESC, will order intents 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:

intents:

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
numerical_idIntegerThe ID on the database for the intent.
tokenStringA uniq string for the intent, send to the merchant fro tracking purposes. This is also used as an ID for the object in this API.
intent_typeStringOne of [Buy, Shop, Reload, Donation, Transfer, EarlyWithdrawalFee], the intent types are described bellow in the intents 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 intent, as kept on FlipGive's database.
currencyStringThe currency of the intent. One of USD, CAD.
statusStringThe currency of the intent. One of supported, cancelled, pending.
total_amount_centsIntegerTotal ammount spent, in cents.
campaign_share_centsIntegerTotal ammount awarded to the campaign, in cents.
partner_share_centsIntegerTotal ammount awarded to the partner, in cents.
flipgive_share_centsIntegerTotal ammount awarded to the FlipGive, in cents.
merchant_share_centsIntegerTotal ammount kept by the merchant, in cents.
supported_atTimeStampDate and Time when the intent was the supported.
created_atTimeStampDate and Time when the intent was created.
updated_atTimeStampDate and Time when the intent wasupdated.
utm_dataObjectContains the UTM parameters passed when the intent was created, if any.

Intent types:

intent_typeDescription
BuyAn intent where the payment is processed by Flipgive, typicaly a Giftcard.
ShopAn intent for online shopping trip.
ReloadAn intent for a reload on a Reloadable/Autoreloadable Giftcard.
DonationAn intent for a donation, payment processed by FlipGive.
TransferAn intent for a transfer of money from a personal account to a campaign.
EarlyWithdrawalFeeAn intent for a fee for withdrawing before the minimun withdraw amount has been reached.

Intent statuses:

intent_typeDescription
cancelledWhen a cancelled request was sent by the merchant.
refundedWhen refunds have been issued for the total amount of the original transaction.
partially_refundedWhen refunds have been issued for LESS than the total amount of the original transaction.
supportedWhen the intent has resulted in a financial transaction.
pendingWhen no financial transaction ha been recieved from the merchant.
checkout_standbyA payment processed by FlipGive has been initiated and is awayting completion.
checkout_cancelledA payment processed by FlipGive was initiated but was later cancelled or timed out.
checkout_capturingA payment processed by FlipGive is in the process of capturing funds.
checkout_retryingA payment processed by FlipGive is being retried after having obtained the payment details.
checkout_successfulA payment processed by FlipGive is being retried.
checkout_failedA payment processed by FlipGive has failed after having obtained the payment details, can ocurred when card is declined, lack of funds, etc.
checkout_processingA payment processed by FlipGive is in process.
N/AUnnable to resolve a status. Please contact FlipGive support.