Transaction On File
This feature is only available for merchants who have a specific agreement with Swedbank Pay.
In rare use cases, it can be necessary for merchants who operate with payment tokens (recurring, one-click, etc) to be able to submit subsequent transactions via file transfer rather than using the regular operations in our API. Reasons for this could be that the subsequent transactions are triggered from an older system which doesn’t support real-time API communication. For those use cases, Swedbank Pay offers a service called Transaction on File. This way of completing transactions is slightly outdated, so we strongly recommend that you consider our regular API operations instead, and only use transaction on file when it is the only option.
Do you want to know more about this service? Please contact our integration support.
How It Looks
You will redirect the payer to Swedbank Pay hosted pages to collect their card information.
API Requests
The API requests are displayed in the flow below. The generated token will be
returned in the parameter transactionOnFileToken
. For more information
regarding the flow, see Verify.
Transaction On File Request
Request
1
2
3
4
POST /psp/paymentorders HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json
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
{
"payment": {
"generateTransactionOnFileToken": true,
"operation": "Verify",
"currency": "NOK",
"description": "Create TransactionOnFileToken",
"userAgent": "Mozilla/5.0...",
"language": "nb-NO",
"urls": {
"hostUrls": ["https://example.com", "https://example.net"],
"completeUrl": "https://example.com/payment-completed",
"cancelUrl": "https://example.com/payment-cancelled",
"logoUrl": "https://example.com/payment-logo.png",
"termsOfServiceUrl": "https://example.com/payment-terms.html"
},
"payeeInfo": {
"payeeId": "5cabf558-5283-482f-b252-4d58e06f6f3b",
"payeeReference": "CD1234",
"payeeName": "Merchant1",
"productCategory": "A123",
"orderReference": "or-12456",
"subsite": "MySubsite",
},
"payer": {
"payerReference": "AB1234",
}
}
}
Transaction On File Response
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
HTTP/1.1 200 OK
Content-Type: application/json
{
"payment": {
"id": "/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1",
"number": 1234567890,
"created": "2016-09-14T13:21:29.3182115Z",
"updated": "2016-09-14T13:21:57.6627579Z",
"operation": "Verify",
"state": "Ready",
"currency": "NOK",
"amount": 0,
"description": "Test Verification",
"initiatingSystemUserAgent": "swedbankpay-sdk-dotnet/3.0.1",
"userAgent": "Mozilla/5.0",
"language": "nb-NO",
"transactions": { "id": "/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/transactions" },
"verifications": { "id": "/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/verifications" },
"urls" : { "id": "/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/urls" },
"payeeInfo" : { "id": "/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/payeeInfo" },
"payers": { "id": "/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/payers" },
"settings": { "id": "/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/settings" }
},
"operations": [
{
"href": "https://api.externalintegration.payex.com/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1",
"rel": "update-payment-abort",
"method": "PATCH",
"contentType": "application/json"
},
{
"href": "https://ecom.externalintegration.payex.com/paymentorders/verification/5a17c24e-d459-4567-bbad-aa0f17a76119",
"rel": "redirect-verification",
"method": "GET",
"contentType": "application/json"
},
{
"method": "GET",
"href": "https://ecom.externalintegration.payex.com/paymentorders/core/scripts/client/px.creditcard.client.js?token=5a17c24e-d459-4567-bbad-aa0f17a76119",
"rel": "view-verification",
"contentType": "application/javascript"
}
]
}