Gift Cards – Operations

Gift card resource

For security and headers see Security.

Get New Gift Card

Request

1
2
3
4
5
6
7
8
9
10
11
POST /api/payments/gift-card/get-new-gift-card HTTP/1.1
Authorization: Bearer <AccessToken>
Hmac: HMAC authentication filter
Content-Type: application/json

{
    "amount": 10000,
    "email": "example@exampleprovider.com",
    "msisdn": 99999999,
    "productId": 7854
}
Required Field Type Description
check amount integer Total amount of Payment (in cents), ie. 100Kr -> 10000. If amount is 0 no deposit is made.
  email string customers email.
  msisdn string customers mobile number.
  productId string A human readable and descriptive text of the error.

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
HTTP/1.1 200 OK
Content-Type: application/json

{
    "_links": [
        {
            "deprecation": "string",
            "href": "string",
            "hreflang": "string",
            "media": "string",
            "rel": "string",
            "templated": true,
            "title": "string",
            "type": "string"
        }
    ],
    "accountSummaryGiftCard": {
        "accountKey": 7013360000000001000,
        "balance": 10000,
        "cvc": 123,
        "expiryDate": "2020-01-15"
    },
    "paymentId": 4526987
}

Pre Deposit

Request

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
POST /api/payments/gift-card/pre-deposit HTTP/1.1
Authorization: Bearer <AccessToken>
Hmac: HMAC authentication filter
Content-Type: application/json

{
    "amount": 10000,
    "currency": "NOK",
    "description": "string",
    "orderRef": "UUID",
    "simpleAccountIdentifier": {
        "accountKey": 7013360000000001000,
        "cvc": 123,
        "expiryDate": "12/20"
    },
    "transactionRef": "UUID"
}
Required Field Type Description
check amount integer Total amount of Payment (in cents), ie. 100Kr -> 10000. If amount is 0 no deposit is made.
check currency string Currency for Payment.
  description string Payment description.
check orderRef string Merchant ref, Unique from merchant per session.
  transactionRef string Unique ID for each transaction.
check SimpleAccountIdentifier Object  
check accountKey string Primary Account Number (PAN) for card/account. This is mandatory if ‘track2’ is not present.
  cvc string Card Verification Code.
  expiryDate string Expiry date on card (only applicable for PaymentInstrumentType ‘creditcard’) where expiry date is printed on card. Format MM/YY.

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
    "_links": [
        {
            "deprecation": "string",
            "href": "string",
            "hreflang": "string",
            "media": "string",
            "rel": "string",
            "templated": true,
            "title": "string",
            "type": "string"
        }
    ],
    "balance": 10000,
    "paymentId": 4526987
}