Payments Only

Cross Channel Payments

schedule 5 min read

A printable, scannable reference code for payment tracking.

Edit "Cross Channel Payments" on GitHub

Cross Channel Payments

Swedbank Pay’s Checkout v3 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

QUERY Request

Request

1
2
3
4
5
6
7
8
QUERY /psp/paymentorders HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json

{
  "referenceCode": 1717224235360011
}

GET And QUERY Response

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
HTTP/1.1 200 OK
Content-Type: application/json

{
  "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 instrument used in the cancelled payment.
└─➔ number string The transaction number, useful when there’s a 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 (including -) 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. The amount displayed is the final amount the payer paid for their order, including any instrument specific discounts or fees.
└─➔ referenceCode string A 16 digit reference code which can be used for tracking payments.
└➔ details integer Details connected to the payment.