Chapter 5. Payment service

Table of Contents

5.1. Introduction
5.2. REST interface (BETA)
5.2.1. Introduction
5.2.2. Interface use
5.2.3. Payment creation
5.2.4. Error handling
5.2.5. Error codes
5.2.6. PHP
5.2.7. Perl
5.3. Form interface
5.3.1. Introduction
5.3.2. Interface versions
5.3.3. Change versions
5.3.4. Fields to be sent to payment gateway
5.3.5. Calculating the payment fingerprint (AUTHCODE)
5.4. Receiving the Payment Receipt
5.4.1. Introduction
5.4.2. Authcode calculation
5.5. Payment page bypass
5.5.1. Introduction
5.5.2. Implementation
5.5.3. Payment method values
5.6. Payment method selection page embedding
5.6.1. Introduction
5.6.2. Versions
5.6.3. Embedding when using the REST interface
5.6.4. Embedding when using the form interface
5.6.5. Parameters
5.6.6. Localisation
5.7. Payment state queries
5.7.1. State query in HTML
5.7.2. Calculating the hash
5.8. XML accounting API
5.8.1. Web Services
5.8.2. Complex data types
5.8.3. Error messages
5.8.4. Reporting service
5.8.5. Payment service
5.9. Merchant API v1
5.9.1. Service description
5.9.2. Authentication
5.9.3. Accessing the API
5.9.4. Create Refund
5.9.5. Notify URL call
5.9.6. Refund cancellation
5.9.7. Settlements
5.9.8. Settlement details
5.9.9. Payment details
5.9.10. Refund details

5.1. Introduction

Figure 5.1. Payment page

Payment page

Payment service integration is done by either implementing a payment button, or by embedding a selection of payment methods in a webshop to enable the immediate payment of an order. The information of completed payment is instantly relayed back to the webshop.

There are two integration types for implementing the Paytrail payment service.

With the REST interface the payment is created in advance by a XML or JSON request, and the interface responds with a payment token and a URL address. To complete the payment, the customer is redirected to the URL address. The REST interface can thus be used to send a payment link to the customer by e.g. email.

When using the FORM interface, the payment data is created as a form on the web applications page. The consumer sends this form to the payment service. The payment is then completed in the web browser as an immediate result of the customer's actions.

Payment page bypass option for FORM interface allows bypassing the Paytrail payment page and can be used to implement bank payment buttons directly in a webshop.

The payment method page embedding can be used together with either of these implementations to display the payment method selection directly in a webshop. Implementing the embedded payment method selection page is done by adding a short JavaScript call to the page.