Gift Cards – Other Features

Purchase

Request

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
POST /api/payments/payment-account/{paymentAccountId}/payment/purchase HTTP/1.1
Authorization: Bearer <AccessToken>
Hmac: HMAC authentication filter
Content-Type: application/json

{
    "accountIdentifier": {
        "accountId": 123456789,
        "accountKey": 7013360000000001000,
        "cvc": 123,
        "encryptedPin": "000",
        "expiryDate": "12/20",
        "securityCode": 123,
        "track2": "7013360000000000000=2012125123"
    },
    "additionalData": "string",
    "amount": 10000,
    "currency": "NOK",
    "description": "string",
    "merchant": {
        "merchantName": "Test Merchant 101",
        "terminalId": 12345
    },
    "paymentOrderRef": "UUID",
    "paymentTransactionRef": "UUID",
    "products": [
        {
            "amount": 1337,
            "description": "1x banana",
            "productId": "001",
            "quantity": 13.37,
            "unitOfMeasure": "L",
            "vatAmount": 337,
            "vatRate": 25
        }
    ],
    "repeat": true,
    "stan": 123456
}
Required Field Type Description
check accountIdentifier Object  
  accountId string Swedbank Pay internal id for card/account.
check accountKey string Primary Account Number (PAN) for card/account. This is mandatory if ‘track2’ is not present.
  cvc string Card Verification Code.
  encryptedPin string If ‘000’ is set on authorization request, encrypted PIN block will be returned here.
  expiryDate string Expiry date on card (only applicable for PaymentInstrumentType ‘creditcard’) where expiry date is printed on card. Format MM/YY
  securityCode string Card Security Code.
  track2 string Track 2 excluding start and end sentinel.
  additionalData string Optional additional data stored on transaction.
check amount integer Total amount of Payment (in cents), ie. 100Kr -> 10000.
check currency string Currency for Payment.
  description string Payment description.
check merchant object  
check merchantName string Name of merchant where payment was performed
  terminalId string Used to identify terminal.
check paymentOrderRef string Unique ID to bind 2-phase transactions.
check paymentTransactionRef string Unique ID for each payment.
  products list  
check amount integer Monetary value of purchased product (in cents).
  description string Optional product description.
check productId string Used to identify a product.
check quantity number Number of product units sold (both integer and decimal numbers supported).
check unitOfMeasure string Type of measurement, L=Litre, U=Unit, G=Grams This may refer to the number of packs, number of bottles etc., O=present, this denotes that there is no measurement. Enum:[ L, U, G, O ].
  vatAmount integer Monetary value of vat-amount for purchased product (in cents).
  vatRate number Vat-rate for purchased product (both integer and decimal numbers supported).
  repeat boolean Notifies this is a repeat message.
  stan string Systems trace audit number.

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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
    "_links": [
        {
            "deprecation": "string",
            "href": "string",
            "hreflang": "string",
            "media": "string",
            "rel": "string",
            "templated": true,
            "title": "string",
            "type": "string"
        }
    ],
    "accountIdentifier": {
        "accountId": 123456789,
        "accountKey": 7013360000000001000,
        "cvc": 123,
        "encryptedPin": "000",
        "expiryDate": "12/20",
        "securityCode": 123,
        "track2": "7013360000000000000=2012125123"
    },
    "allowedProductIds": [
        "string"
    ],
    "amount": 0,
    "created": "2020-05-11T08:20:13.829Z",
    "currency": "string",
    "description": "string",
    "issuer": {
        "acquirerId": "string",
        "acquirerName": "string",
        "issuerId": "string",
        "issuerName": "string",
        "settlementProvided": true
    },
    "merchant": {
        "merchantName": "Test Merchant 101",
        "terminalId": 12345
    },
    "operation": "string",
    "paymentId": "string",
    "paymentOrderRef": "string",
    "paymentTransactionRef": "string",
    "remainingCancelAmount": 0,
    "remainingCaptureAmount": 0,
    "remainingReversalAmount": 0,
    "state": "OK",
    "transmissionTime": "2020-05-11T08:20:13.829Z",
    "updated": "2020-05-11T08:20:13.829Z"
}
Field Type Description
state enum OK, FAILED, REVERSED or DUPLICATE. The state of the transaction.

Deposit

Request

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
POST /api/payments/payment-account/{paymentAccountId}/payment/deposit HTTP/1.1
Authorization: Bearer <AccessToken>
Hmac: HMAC authentication filter
Content-Type: application/json

{
    "accountIdentifier": {
        "accountId": 123456789,
        "accountKey": 7013360000000001000,
        "cvc": 123,
        "encryptedPin": "000",
        "expiryDate": "12/20",
        "securityCode": 123,
        "track2": "7013360000000000000=2012125123"
    },
    "additionalData": "string",
    "amount": 10000,
    "currency": "NOK",
    "description": "string",
    "merchant": {
        "merchantName": "Test Merchant 101",
        "terminalId": 12345
    },
    "paymentOrderRef": "UUID",
    "paymentTransactionRef": "UUID",
    "repeat": true,
    "stan": 123456
}
Required Field Type Description
check accountIdentifier Object  
  accountId string Swedbank Pay internal id for card/account.
check accountKey string Primary Account Number (PAN) for card/account. This is mandatory if ‘track2’ is not present.
  cvc string Card Verification Code.
  encryptedPin string If ‘000’ is set on authorization request, encrypted PIN block will be returned here.
  expiryDate string Expiry date on card (only applicable for PaymentInstrumentType ‘creditcard’) where expiry date is printed on card. Format MM/YY
  securityCode string Card Security Code.
  track2 string Track 2 excluding start and end sentinel.
  additionalData string Optional additional data stored on transaction.
check amount integer Total amount of Payment (in cents), ie. 100Kr -> 10000.
check currency string Currency for Payment.
  description string Payment description.
check merchant object  
check merchantName string Name of merchant where payment was performed
  terminalId string Used to identify terminal.
check paymentOrderRef string Unique ID to bind 2-phase transactions.
check paymentTransactionRef string Unique ID for each payment.
  repeat boolean Notifies this is a repeat message.
  stan string Systems trace audit number.

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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
    "_links": [
        {
            "deprecation": "string",
            "href": "string",
            "hreflang": "string",
            "media": "string",
            "rel": "string",
            "templated": true,
            "title": "string",
            "type": "string"
        }
    ],
    "accountIdentifier": {
        "accountId": 123456789,
        "accountKey": 7013360000000001000,
        "cvc": 123,
        "encryptedPin": "000",
        "expiryDate": "12/20",
        "securityCode": 123,
        "track2": "7013360000000000000=2012125123"
    },
    "allowedProductIds": [
        "string"
    ],
    "amount": 0,
    "created": "2020-05-11T09:58:33.431Z",
    "currency": "string",
    "description": "string",
    "issuer": {
        "acquirerId": "string",
        "acquirerName": "string",
        "issuerId": "string",
        "issuerName": "string",
        "settlementProvided": true
    },
    "merchant": {
        "merchantName": "Test Merchant 101",
        "terminalId": 12345
    },
    "operation": "string",
    "paymentId": "string",
    "paymentOrderRef": "string",
    "paymentTransactionRef": "string",
    "remainingCancelAmount": 0,
    "remainingCaptureAmount": 0,
    "remainingReversalAmount": 0,
    "state": "OK",
    "transmissionTime": "2020-05-11T09:58:33.431Z",
    "updated": "2020-05-11T09:58:33.431Z"
}
Field Type Description
state enum OK, FAILED, REVERSED or DUPLICATE. The state of the transaction.

Balance

Request

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

{
    "accountIdentifier": {
        "accountId": 123456789,
        "accountKey": 7013360000000001000,
        "cvc": 123,
        "encryptedPin": "000",
        "expiryDate": "12/20",
        "securityCode": 123,
        "track2": "7013360000000000000=2012125123"
    }
}
Required Field Type Description
check accountIdentifier Object  
  accountId string Swedbank Pay internal id for card/account.
check accountKey string Primary Account Number (PAN) for card/account. This is mandatory if ‘track2’ is not present.
  cvc string Card Verification Code.
  encryptedPin string If ‘000’ is set on authorization request, encrypted PIN block will be returned here.
  expiryDate string Expiry date on card (only applicable for PaymentInstrumentType ‘creditcard’) where expiry date is printed on card. Format MM/YY
  securityCode string Card Security Code.
  track2 string Track 2 excluding start and end sentinel.

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
25
26
27
28
29
30
{
    "_links": [
        {
            "deprecation": "string",
            "href": "string",
            "hreflang": "string",
            "media": "string",
            "rel": "string",
            "templated": true,
            "title": "string",
            "type": "string"
        }
    ],
    "paymentAccount": {
        "accountSummary": {
            "accountId": 123456789,
            "balance": 10000,
            "currency": "NOK",
            "expiryDate": "2020-01-15",
            "paymentInstrumentType": "giftcard"
        },
        "issuerSummary": {
            "acquirerId": "string",
            "acquirerName": "string",
            "issuerId": "string",
            "issuerName": "string",
            "settlementProvided": true
        }
    }
}

Authentication

Request

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
POST /api/payments/payment-account/{paymentAccountId}/payment/authorize HTTP/1.1
Authorization: Bearer <AccessToken>
Hmac: HMAC authentication filter
Content-Type: application/json

{
    "accountIdentifier": {
        "accountId": 123456789,
        "accountKey": 7013360000000001000,
        "cvc": 123,
        "encryptedPin": "000",
        "expiryDate": "12/20",
        "securityCode": 123,
        "track2": "7013360000000000000=2012125123"
    },
    "additionalData": "string",
    "amount": 10000,
    "currency": "NOK",
    "description": "string",
    "merchant": {
        "merchantName": "Test Merchant 101",
        "terminalId": 12345
    },
    "paymentOrderRef": "UUID",
    "paymentTransactionRef": "UUID",
    "repeat": true,
    "stan": 123456
}
Required Field Type Description
check accountIdentifier Object  
  accountId string Swedbank Pay internal id for card/account.
check accountKey string Primary Account Number (PAN) for card/account. This is mandatory if ‘track2’ is not present.
  cvc string Card Verification Code.
  encryptedPin string If ‘000’ is set on authorization request, encrypted PIN block will be returned here.
  expiryDate string Expiry date on card (only applicable for PaymentInstrumentType ‘creditcard’) where expiry date is printed on card. Format MM/YY
  securityCode string Card Security Code.
  track2 string Track 2 excluding start and end sentinel.
  additionalData string Optional additional data stored on transaction.
check amount integer Total amount of Payment (in cents), ie. 100Kr -> 10000.
check currency string Currency for Payment.
  description string Payment description.
check merchant object  
check merchantName string Name of merchant where payment was performed
  terminalId string Used to identify terminal.
check paymentOrderRef string Unique ID to bind 2-phase transactions.
check paymentTransactionRef string Unique ID for each payment.
  repeat boolean Notifies this is a repeat message.
  stan string Systems trace audit number.

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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
    "_links": [
        {
            "deprecation": "string",
            "href": "string",
            "hreflang": "string",
            "media": "string",
            "rel": "string",
            "templated": true,
            "title": "string",
            "type": "string"
        }
    ],
    "accountIdentifier": {
        "accountId": 123456789,
        "accountKey": 7013360000000001000,
        "cvc": 123,
        "encryptedPin": "000",
        "expiryDate": "12/20",
        "securityCode": 123,
        "track2": "7013360000000000000=2012125123"
    },
    "allowedProductIds": [
        "string"
    ],
    "amount": 0,
    "created": "2020-05-12T07:02:36.719Z",
    "currency": "string",
    "description": "string",
    "issuer": {
        "acquirerId": "string",
        "acquirerName": "string",
        "issuerId": "string",
        "issuerName": "string",
        "settlementProvided": true
    },
    "merchant": {
        "merchantName": "Test Merchant 101",
        "terminalId": 12345
    },
    "operation": "string",
    "paymentId": "string",
    "paymentOrderRef": "string",
    "paymentTransactionRef": "string",
    "remainingCancelAmount": 0,
    "remainingCaptureAmount": 0,
    "remainingReversalAmount": 0,
    "state": "OK",
    "transmissionTime": "2020-05-12T07:02:36.719Z",
    "updated": "2020-05-12T07:02:36.719Z"
}
Field Type Description
state enum OK, FAILED, REVERSED or DUPLICATE. The state of the transaction.