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 of5000
. Example:/rewards/intents?currency=USD&page[limit]=50
- offset: Integer, defaults to
0
. Example:/rewards/intents?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 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 toDESC
, will order intents by their creation date in the requested order.
- supported_at: String, one of
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:
Attributes | Type | Description |
---|---|---|
numerical_id | Integer | The ID on the database for the intent. |
token | String | A 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_type | String | One of [Buy, Shop, Reload, Donation, Transfer, EarlyWithdrawalFee] , the intent types are described bellow in the intents 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 intent, as kept on FlipGive's database. |
currency | String | The currency of the intent. One of USD, CAD . |
status | String | The currency of the intent. One of supported, cancelled, pending . |
total_amount_cents | Integer | Total ammount spent, in cents. |
campaign_share_cents | Integer | Total ammount awarded to the campaign, in cents. |
partner_share_cents | Integer | Total ammount awarded to the partner, in cents. |
flipgive_share_cents | Integer | Total ammount awarded to the FlipGive, in cents. |
merchant_share_cents | Integer | Total ammount kept by the merchant, in cents. |
supported_at | TimeStamp | Date and Time when the intent was the supported. |
created_at | TimeStamp | Date and Time when the intent was created. |
updated_at | TimeStamp | Date and Time when the intent wasupdated. |
utm_data | Object | Contains the UTM parameters passed when the intent was created, if any. |
Intent types:
intent_type | Description |
---|---|
Buy | An intent where the payment is processed by Flipgive, typicaly a Giftcard. |
Shop | An intent for online shopping trip. |
Reload | An intent for a reload on a Reloadable/Autoreloadable Giftcard. |
Donation | An intent for a donation, payment processed by FlipGive. |
Transfer | An intent for a transfer of money from a personal account to a campaign. |
EarlyWithdrawalFee | An intent for a fee for withdrawing before the minimun withdraw amount has been reached. |
Intent statuses:
intent_type | Description |
---|---|
cancelled | When a cancelled request was sent by the merchant. |
refunded | When refunds have been issued for the total amount of the original transaction. |
partially_refunded | When refunds have been issued for LESS than the total amount of the original transaction. |
supported | When the intent has resulted in a financial transaction. |
pending | When no financial transaction ha been recieved from the merchant. |
checkout_standby | A payment processed by FlipGive has been initiated and is awayting completion. |
checkout_cancelled | A payment processed by FlipGive was initiated but was later cancelled or timed out. |
checkout_capturing | A payment processed by FlipGive is in the process of capturing funds. |
checkout_retrying | A payment processed by FlipGive is being retried after having obtained the payment details. |
checkout_successful | A payment processed by FlipGive is being retried. |
checkout_failed | A payment processed by FlipGive has failed after having obtained the payment details, can ocurred when card is declined, lack of funds, etc. |
checkout_processing | A payment processed by FlipGive is in process. |
N/A | Unnable to resolve a status. Please contact FlipGive support. |