This documentation is deprecated and only available for supporting old/legacy integrations using for example hashes.
New documentation can be found here: Home
Payment response
New Payment Response
The response data sent webstore by redirecting buyer's browser to the ok return address in cases where buyer has successfully confirmed the payment. The webstore may deliver the order immediately if wanted.
If the buyer interrupts the payment process, the buyer's browser will be redirected to the cancel return address.
If there was an error in the process, the buyer's browser will be redirected to the error return address.
These return scenarios have been briefly described already in section Payment.
NOTE: For interrupted/cancelled or erroneus payments, only querystring parameter pmt_id is appended to the response URL, and no other parameters.
Usually the pmt_sellercosts value in the response is exactly the same as the in the original new payment request. However, some payment methods make it possibly for the webstore to determine an additional invoicing fee or extra handling cost (a fixed money amount). In cases where the buyer chooses such payment method, the invoicing fee is added as a new order row to the order by Svea Payments. Also the pmt_sellercosts value is increased by the same fee amount. In these cases the response contains a pmt_sellercosts value that is greater than the original value in the request. The difference could be exactly the invoicing fee and nothing else.
Response validation
Fields that are generated by Svea Payments and submitted as part of the response, should be formally validated, as defined in the interface specification.
Hash must be calculated from the data in response and that hash must be compared with the pmt_hash field of the response. Calculated value may not differ from the one in response. The hash algorithm used for the response hash is THE SAME as was used for the corresponding payment request.
If the checks above are successful, the response can be handled as a valid one.
Skip to contents in this page
Field | Input name | Value | Format | C/O | Description |
---|---|---|---|---|---|
Action code | pmt_action | NEW_PAYMENT_EXTENDED | AN50 | C | NEW_PAYMENT_EXTENDED |
Message version | pmt_version | 0004 | AN4 | C | Version of interface content. Same as in the input message. |
Payment ID Â | pmt_id | Â | AN20 | C | Unique Identifying number given to the transaction by the webstore. Same as in the input message. |
Reference number | pmt_reference | Â | N20 | C | Reference number given by the webstore and used when the order is settled to the seller. The reference number is in its technical format, i.e. with leading zeros, without spaces and with total length of 20 digits. The response hash is calculated with the reference number in this format. Same as in the input message. |
Sum of products and services of the order | pmt_amount | Â | AN17 | C | The total gross sum of row types 1, 4, 5 and 6. |
Payment currency | pmt_currency | EUR | AN3 | C Â | Currency of the payment. Always EUR. |
Sum of handling and delivery costs of the order | pmt_sellercosts | Â | N17 | C | The total gross sum of row types 2 and 3. |
Payment method | pmt_paymentmethod | Â | AN4 | C | Indicates what payment method the buyer chose. For available codes, see section Payment Method Codes. Important! Please do not use the values of the table above in production. Instead, retrieve official payment method codes and names using GetPaymentMethods.pmt API (see chapter Retrieve Available Payment Methods). |
Escrow is being used | pmt_escrow | Y/N | AN1 | C | Tells whether escrow option is used with this payment. Values: Y/N |
Hash | pmt_hash | Â | AN128 | C | Hash calculated from predefined message fields and the webstore's secret key. The following fields are used to calculate the hash:
For more details, see section Hash Calculation. |
Â
Â