Refund Payment After Settlement

Request (S2S HTTP POST)

This interface must be used to initiate a refund to payer after the money for the order has already been settled from Svea Payments to the merchant.

The process has several steps:

  • Initiate a "refund after settlement" by using this interface.

  • Do an actual money transfer from merchant's bank account to Svea Payments bank account by using the payment details given in the response of this interface. Merchant must use their own tools to do this money transfer. The amount and reference number of the money transfer must match the ones acquired by using this interface first.

  • Svea Payments will refund the payer after receiving money from the merchant

Webstore delivers the request parameters in a <form> using POST method as hidden input fields (<input type=hidden>) to address https://www.maksuturva.fi/PaymentCancel.pmt (or https://test1.maksuturva.fi/PaymentCancel.pmt in test environment)

Input name

Value

Format

Description

Input name

Value

Format

Description

COMPULSORY PARAMETERS:
All of these must be present in the request.

pmtc_action

REFUND_AFTER_SETTLEMENT

AN23

Action name. Always REFUND_AFTER_SETTLEMENT.

pmtc_version

0005

AN4

Version of interface content or message

pmtc_sellerid

 

AN15

Technical seller id given to the webstore by Svea Payments.

pmtc_id

 

AN20

Unique Payment Identifier given to the payment transaction by the webstore.

pmtc_amount

 

N17

Same value as in send in Create Payment API (pmt_amount). The amount must be presented with two decimals. The decimal delimiter is comma, e.g. 94,80

pmtc_currency

 

AN3

The payment currency. Same value as in send in Create Payment API (pmt_currency).

pmtc_canceltype

REFUND_AFTER_SETTLEMENT

AN40

Cancellation type. Always REFUND_AFTER_SETTLEMENT

pmtc_cancelamount

e.g. 15,00

N17

Amount to be refunded. The amount must be presented with two decimals without thousands separator. The decimal delimiter is a comma. For example: 15,00

pmtc_resptype

XML

AN4

Response type. Always XML.

pmtc_keygeneration

nnn
e.g. 001

N3

Secret key generation or version related to the technical seller id.
Default or initial value is 001.

OPTIONAL PARAMETERS:
An optional parameter may be missing altogether, have an empty value or have a value of at least the minimum length.

pmtc_cancel_id

 

AN20

OPTIONAL, yet RECOMMENDED. Unique id for cancellation. It's recommended to use this field to give a unique idenfier for a refund. When given for one refund under the given order, there cannot be another refund for the same order with the same ID. This helps to prevent accidentally sending duplicate refunds.

pmtc_payeribanrefund

Finnish IBAN

AN36

OPTIONAL. Buyer's refund bank account number (Finnish IBAN).

This is rarely needed. The IBAN might be required in case on bank payments. That is, card payments, mobile payments, invoice payments and part payments never require nor support it.

pmtc_canceldescription

 

AN500

OPTIONAL. Cancel description for the refund that can be shown to the buyer.

pmtc_cancelreason

 

AN5

OPTIONAL. Cancel reason code. Reason for the refund that can be shown to the buyer.
Possible values are:

  • NOTDE - Order has not been delivered

  • WSIZE - Item has wrong size

  • INCOR - Item does not correspond to order

  • DEFEC - Item is broken or defective

  • OUTOF - Item is out of stock

  • OTHER - Other reason

pmtc_pay_with_reference

Finnish Reference Number

N20

OPTIONAL. The Finnish reference number the merchant will use when making the money transfer to Svea.

The reference number (4-20 digits) must comply with the guidelines (en, fi) for a formal reference number issued by the Federation of Finnish Financial Services (Finanssiala). The reference number must be at least 4 digits, the last of which is a check digit.

Currently, Credit Reference or RF Reference format (RFnn nnnn …) is not supported.

This parameter is supported only separately agreed on. Please contact our customer support if needed.

Response (XML)

The response contains the following fields:

 

Input Name

Value

Format

C/O

 

Input Name

Value

Format

C/O

 

pmtc_action

REFUND_AFTER_SETTLEMENT

AN6

C

Action called (REFUND_AFTER_SETTLEMENT).

pmtc_version

0005

AN4

C

Version of interface content or message.

pmtc_sellerid

 

AN15

C

Technical seller id given to the webstore by Svea Payments.

pmtc_id

 

AN20

C

Unique Payment Identifier given to the payment transaction by the webstore.

pmtc_returncode

 

AN2

C

Response code. Indicates success or failure. See below for the values and explanations of all the codes.

pmtc_returntext

 

AN100

C

Brief description of the failure reason. Empty in case of success.

PAYMENT DETAILS:

The merchants must do an actual money transfer from their bank account to Svea Payments bank account by using these payment details

pmtc_pay_with_reference

a Finnish reference number

N20

C

A Finnish reference number to be used when making the money transfer to Svea

pmtc_pay_with_recipientname

Svea Payments Oy

AN50

C

The recipient name to be used on the money transfer as the recipient: Svea Payments Oy

pmtc_pay_with_amount

e.g. 15,00

N17

C

The money transfer amount, e.g. 15,00. Usually the same as pmtc_cancelamount.

pmtc_pay_with_iban

The IBAN of the bank account to pay the money to.

AN36

C

The target bank account to be used when making the money transfer. This is Svea Payments' bank account.

ERROR DETAILS:

errors

 

N/A

O

Details of all the errors in the input message. An XML structure with root errors having multiple error elements below it. Each error element has attribute type with value general or field. In case of fields, there is also attribute name telling for example what input parameter the error is related to.

Response code values

 

Response code

Short Description

Description

Response code

Short Description

Description

00

OK

Cancel received successfully

20

Not found

Payment not found

90

Errors in input data

Errors in input data, specified in element <errors>

91

Duplicate detected

Payment cancellation failed, as this request was a duplicate based on the given unique identifier (pmtc_cancel_id)

99

Failed

Payment cancellation failed, reason specified in <pmtc_returntext>

Example Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <pmtc> <pmtc_action>REFUND_AFTER_SETTLEMENT</pmtc_action> <pmtc_version>0005</pmtc_version> <pmtc_sellerid>6234567890ABCDE</pmtc_sellerid> <pmtc_id>VXZ8KB43XDH617LAZYBU</pmtc_id> <pmtc_returncode>00</pmtc_returncode> <pmtc_returntext>Cancel received succesfully</pmtc_returntext> <pmtc_pay_with_reference>00000666660000010007</pmtc_pay_with_reference> <pmtc_pay_with_recipientname>Svea Payments Oy</pmtc_pay_with_recipientname> <pmtc_pay_with_amount>15,00</pmtc_pay_with_amount> <pmtc_pay_with_iban>FI7740123477777777</pmtc_pay_with_iban> </pmtc>

 

Svea Payments Oy
info.payments@svea.fi
+358 9 4241 7050 (weekdays 8:00 - 16:00)
Saavutettavuusseloste