Enterprise

Integrated Commerce

A printable, scannable reference code for payment tracking.

Edit "Integrated Commerce" on GitHub

Swedbank Pay’s Digital Payments API is built in a way that depends on that you, as a merchant, is able to store the paymentOrderId. The paymentOrderId is a URL which points to the specific instance of a payment order resource, but in some cases it will be hard to use it as a payment reference.

To help you keep track of the transaction easier, we provide a unique identification called referenceCode in all v3 implementations. The code can then be printed and, for instance, used as a scannable barcode for future tracking.

The referenceCode isn’t available by default, but needs to be activated by us to appear in your payment order responses.

Reference Code Query

When enabled, the referenceCode will appear as a 16 digit code in the expanded paid field when the payment is fully paid.

In addition to the regular GET method, you may obtain information about the payment by doing a QUERY with the referenceCode in the JSON body as shown in the below example.

Both GET and QUERY responses will look like the abbreviated paid example below. The parts omitted from this example will look like the response from a regular GET request.

GET Request

Request

1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/paid HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.x/2.0      // Version optional for 3.0 and 2.0

QUERY Request

Request

1
2
3
4
QUERY /psp/paymentorders HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.x/2.0      // Version optional for 3.0 and 2.0
1
2
3
{
  "referenceCode": 1717224235360011
}

GET And QUERY Response

Response

1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x/2.0
api-supported-versions: 3.x/2.0
1
2
3
4
5
6
7
8
9
10
11
12
{
  "paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
  "paid": {
    "id": "/psp/paymentorders/1f8d409e-8d8c-4ba1-a3ab-08da8caf7918/paid",
    "instrument": "Creditcard",
    "number": 80100001190,
    "payeeReference": "1662360210",
    "amount": 1500,
    "referenceCode": "1717224235360011"
    "details": {}
  }
}
Field Type Description
paymentOrder object The payment order object.
paid object The paid object.
id string The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
instrument string Payment method used in the cancelled payment.
number integer The transaction number, useful when there’s need to reference the transaction in human communication. Not usable for programmatic identification of the transaction, where id should be used instead.
payeeReference string A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles the settlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30). If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12). All characters must be digits.
amount integer The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK.
referenceCode string A 16 digit reference code which can be used for tracking payments.
details integer Details connected to the payment.