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.


Create Giftcard Transaction

Creates a transaction for a certain giftcard. Please note: this call is used for both incrementation and decrementation transactions. A negative amount, denoted by a minus sign, will trigger a decrementation transaction.

POSTCreate Giftcard Transaction

https://api.piggy.nl/api//giftcard-transactions

HEADERS

AuthorizationBearer {{ api_key }}

BODY

giftcard_idnumber
REQUIREDThe giftcard ID.
amountnumber
REQUIREDThe amount in cents with which the giftcard is to be incremented or decremented. Positive for incrementation, negative amount for a decrementation.

Code

Message

7002
Account inactive.
5001
Giftcard not found.
7010
That giftcard is not valid.
5007
Deze giftcard is niet gekoppeld aan een programma. | Giftcard not linked to Giftcard Program.
7015
Shop does not have access to Giftcard Program.
5006
Deze giftcard kan niet opgewaardeerd worden. | This giftcard cannot be incremented.
5008
Maximale limiet op kaart bereikt. | Max amount will be exceeded.
5003
Het bedrag op de kaart is niet toereikend. | Insufficient amount on giftcard.
5002
Het bedrag op de kaart is verlopen. | This giftcard has expired.
1 2 3 4 5 6 7 { "data": { "id": 1686, "amount_in_cents": -1000, "created_at": "2021-03-07T12:14:16+00:00" }, }

Correct Giftcard Transaction

Creates a correction transaction for a certain giftcard transaction. It does not undo a giftcard transaction, but rather creates a new one with the opposite amount. Can be used in case of a cancelled payment or refund. Please note: you can only create a correction transaction for the last transaction of a giftcard. If transactions have occurred after the target transaction, a correction transaction cannot be created. This also means a correction transaction can be created for a transaction only once.

POSTCorrect Giftcard Transaction

https://api.piggy.nl/api//giftcard-transactions/correct/{{giftcard_transaction_id}}

HEADERS

AuthorizationBearer {{ api_key }}

PARAMETERS

giftcard_transaction_idnumber
REQUIREDThe giftcard transaction that is to be corrected.

Code

Message

7002
Account inactive.
5001
Giftcard not found.
7010
That giftcard is not valid.
5007
Deze giftcard is niet gekoppeld aan een programma. | Giftcard not linked to Giftcard Program.
7015
Shop does not have access to Giftcard Program.
5006
Deze giftcard kan niet opgewaardeerd worden. | This giftcard cannot be incremented.
5008
Maximale limiet op kaart bereikt. | Max amount will be exceeded.
5003
Het bedrag op de kaart is niet toereikend. | Insufficient amount on giftcard.
5002
Het bedrag op de kaart is verlopen. | This giftcard has expired.
55025
This is not the giftcards last transaction.
1 2 3 4 5 6 7 { "data": { "id": 1686, "amount_in_cents": -1000, "created_at": "2021-03-07T12:14:16+00:00" }, }

Related