Giftcard Transactions
Only physical giftcards can be incremented after their initial incrementation. Digital giftcards can only be incremented once. Giftcards cannot have negative balances, meaning that giftcards can never be decremented with an amount larger than the current amount stored on the giftcard.
Get Giftcard Transaction
Retrieve details of a specific Giftcard Transaction. By providing the transaction's UUID, you can access comprehensive information about individual transactions, allowing you to see and keep track of Giftcard Transactions, making it easier to manage Giftcards.
https://api.piggy.eu/api//giftcard-transactions/{{giftcard_transaction_uuid}}Bearer {{ api_key }}application/jsongiftcard_transaction_uuidstringREQUIRED1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"data": {
"id": 2268,
"uuid": "9e6426ef-1916-4f3c-a94f-4cf6af4f945b",
"amount_in_cents": 5,
"type": "STANDARD",
"settled": false,
"card": {
"id": 41592,
"uuid": "f12e8cd7-47de-4f6d-bdf3-e282ace87eb0"
},
"shop": {
"id": 15,
"uuid": "123123",
"name": "Krusty Krab"
},
"settlements": [],
"created_at": "2023-10-09T10:02:43+00:00"
},
"meta": []
}Code
Message
5010Create Giftcard Transaction
This API call facilitates the creation of a transaction for a specific Giftcard. It handles both increment and decrement transactions. A negative amount will trigger a decrementation, adjusting the Giftcard's balance accordingly.
https://api.piggy.eu/api//giftcard-transactionsBearer {{ api_key }}application/jsonBody
giftcard_uuidstringREQUIREDamount_in_centsnumberREQUIREDcustom_attributesarrayOPTIONAL1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"data": {
"id": 2271,
"uuid": "355892c5-6bf7-4167-bae2-3bf2bf44c3dc",
"amount_in_cents": -1000,
"type": "STANDARD",
"settled": false,
"card": {
"id": 41650,
"uuid": "45d7ce10-16cc-4bb7-b37f-e8c4bc553fdf"
},
"shop": {
"id": 15,
"uuid": "123123",
"name": "Krusty Krab"
},
"settlements": [],
"created_at": "2023-11-12T16:10:15+00:00"
},
"meta": []
}Code
Message
50065008500350021000Reverse Giftcard Transaction
At times, an initial Giftcard Transaction needs to be reversed, because of a refund for instance. This will create a new Giftcard Transaction with the same data as initially used, but for the negative amount issued.
https://api.piggy.eu/api//giftcard-transactions/{{giftcard_transaction_uuid}}/reverseBearer {{ api_key }}application/jsongiftcard_transaction_uuidstringREQUIRED1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"data": {
"id": 2271,
"uuid": "355892c5-6bf7-4167-bae2-3bf2bf44c3dc",
"amount_in_cents": -1000,
"type": "STANDARD",
"settled": false,
"card": {
"id": 41650,
"uuid": "45d7ce10-16cc-4bb7-b37f-e8c4bc553fdf"
},
"shop": {
"id": 15,
"uuid": "123123",
"name": "Krusty Krab"
},
"settlements": [],
"created_at": "2023-11-12T16:10:15+00:00"
},
"meta": []
}Code
Message
50105006500850035002550251000