error_code
, balance
and expiration_date
can be simulated by passing in different
pin and gift card numbers. This can be used when testing your integration.
Credential | Description |
---|---|
API Key | This is not validated and can be set to any string |
pin
field is used to simulate error codes:
0
: Reserved for successful responses. Example: 01000
.1
: Validation error returned by the provider, error_code
populated as explained below. Example 10001
.2
: Server error, error_code
populated as explained below. Example: 20010
.3
: Client error, error_code
populated as explained below. Example: 30003
.pin
number will be used to determine the error_code
:
error_code | Description | PIN last digits |
---|---|---|
invalid_gift_card | Gift card details are invalid, e.g. number or pin. | 0000 |
expired_card | Gift card expired. | 0001 |
inactive_card | Gift card is inactive. | 0002 |
invalid_service_credentials | Service credentials are not valid. | 0003 |
invalid_amount | Amount is invalid. | 0004 |
incorrect_currency | Currency was rejected by service. | 0005 |
insufficient_funds | Amount exceeds available balance. | 0006 |
invalid_service_configuration | Service is incorrectly configured. | 0007 |
operation_canceled | Operation was canceled as part of the batch. | 0008 |
service_error | Internal server error or upstream processing error. | 0009 |
service_network_error | Service was unreachable or experienced a timeout. | 0010 |
unknown_error | Mapping to a more specific error code failed. | 0011 |
unknown_error
too.
0
: Reserved for successful responses. Example: 1000
.1
: Validation error returned by the provider. Example 1001
.2
: Server error. Example: 1002
.3
: Client error. Example: 1003
.pin
number as an integer.
The recommendation is that it starts with 0
, so it’ll always be considered a successful response.
For example, a PIN of 01234
will result in a gift card balance of 12.34
.
number
will be considered.
0
will result in an expiration date in the past. For example: 0000444455556666
will result an expiration date set in the past. Currently, this will be set to a month in the past, but this behavior may change.1
will result in an expiration date in future past. For example: 1000444455556666
will result an expiration date set in the future. Currently, this will be set to a month in the future, but this behavior may change.9000444455556666
will result in a gift card without an expiration date.