Flexigift records each customer purchase as a ‘transaction’. The Transactions resource contains information about these purchases.
{base_url}/transactions
Name | Type | Mandatory? | Constraints | Notes |
---|---|---|---|---|
id | int | yes | - | Unique internal ID generated by the system. |
transaction_id | string | yes | - | Unique ID. |
user_id | string | yes | - | The user who made the purchase. |
amazon_id | string | yes | - | The user’s Amazon account ID. |
product_id | string | yes | - | Product catalog number provided by the manufacturer. |
card_id | string | yes | - | Unique ID of the payment card used for the purchase. |
amount | float | yes | - | - |
status | string | yes | Must be one of: {COMPLETED, REJECTED} | - |
balance_check | boolean | yes | Must be one of: {TRUE, FALSE} | Did the card have enough money to pay for the purchase? |
message | string | no | - | - |
Example:
{
"id": 1,
"transaction_id": "txn001",
"user_id": "user001",
"amazon_id": "amz12345",
"product_id": "hanes-underwear-001",
"card_id": "hanes-gc-001",
"amount": 15.99,
"status": "Completed",
"balance_check": true,
"message": "Balance confirmed before transaction."
}
The Transactions resource offers the following REST interfaces: