# Gift Card Transactions

Is the transaction that occurred as a response to a redemption by using a gift card code by the customer.

# The Gift Card Transaction Object

# Sample

{
  "id": "8cd1956b",
  "amount": -180.5,
  "old_balance": 180.5,
  "new_balance": 0,
  "gift_card": {
    "id": "8f89c458"
  },
  "order": {
    "id": "8f89c6a"
  },
  "created_at": "2019-02-11 07:28:29"
}

# Attributes

Field Type Rule Description
id string Unqiue id of the gift card transaction
amount double sortable The aomunt of the gift card transaction
old_balance double The gift card old balance
new_balance double The gift card new balance
gift_card object includable The Gift Card attached to the gift card transaction
order object includable The Order attached to the gift card transaction
created_at string sortable Time YYYY-MM-DD HH-MM-SS in UTC at which the gift card transaction was created.
updated_at string sortable Time YYYY-MM-DD HH-MM-SS in UTC at which the gift card transaction was updated.

# List Gift Card Transactions

GET /gift_card_transactions

# Scope

orders.gift_cards.read

# Filters

  • gift_card_id
  • order_id
  • id
  • created_on
  • updated_on
  • updated_after

# Response

{
  "data": [
    {
      "id": "8cd1956b",
      "amount": -180.5,
      "old_balance": 180.5,
      "new_balance": 0,
      "gift_card": {
        "id": "8f89c458"
      },
      "order": {
        "id": "8f89c6a"
      },
      "created_at": "2019-02-11 07:28:29"
    }
  ]
}

# Get Gift Card Transaction

GET /gift_card_transactions/{TransactionId}

# Scope

orders.gift_cards.read

# Response

{
  "data": {
    "id": "8cd1956b",
    "amount": -180.5,
    "old_balance": 180.5,
    "new_balance": 0,
    "gift_card": {
      "id": "8f89c458"
    },
    "order": {
      "id": "8f89c6a"
    },
    "created_at": "2019-02-11 07:28:29"
  }
}

# Create Gift Card Transaction

POST /gift_card_transactions

# Scope

orders.gift_cards.write

# Request

{
    "amount": -180,
    "gift_card_id": "8cd1956b",
    "order_id": "8cd1956b"
}

# Response

{
  "data": {
    "id": "8cd1956b",
    "amount": -180.5,
    "old_balance": 180.5,
    "new_balance": 0,
    "gift_card": {
      "id": "8f89c458"
    },
    "order": {
      "id": "8f89c6a"
    },
    "created_at": "2019-02-11 07:28:29"
  }
}
Last Updated: 13/9/2023, 9:22:40 AM