Paypal V2

PayPal V2 introduces the PayPal Checkout, which features a RESTful API solution that includes standard checkout, PayPal Express, and the new PayPal Vault functionality. With these flexible and powerful payment solutions, we aim to enhance the e-commerce experience for both merchants and their customers. By enabling customers to quickly complete transactions using their PayPal accounts, this integration reduces cart abandonment and accelerates the payment process. PayPal V2 offers streamlined authentication and approval steps, ensuring a secure, efficient, and user-friendly checkout experience for your e-commerce platform. In addition to the standard checkout, you also have the option to utilize the JavaScript SDK to render PayPal buttons and respond to various PayPal events.

Standart vs Express

We provide the flexibility to implement payment options across multiple pages:

on the product page
Your customers can directly pay on your product page.

on the shopping cart page
Your customers can chose to pay on your shopping cart page

Regular on the checkout page

as a regular checkout on the payment solution page.

The PayPal Checkout V2 handles the regular checkout. For more information about the Product page and Shopping Cart page please use our PayPal Express V2 implementation guide. 

Rendering the PayPal Button

There are two options for rendering the PayPal button: merchants can choose between a dynamic PayPal button or the standard JavaScript SDK to create buttons and respond to key events (onApprove, onError, onCancel, onShippingChange).

The JavaScript Button Render provides a straightforward and efficient way to integrate the PayPal button into your website, enhancing both functionality and user experience. To ensure that the PayPal button functions correctly and delivers a seamless checkout process, you will need to prepare the following components:

Partner id LIVE: given by PAYONE
Endpoint: api.paypal.com ( or api-m.paypal.com )
Client id: generated in your PayPal developer account
Secret: generated in your PayPal developer account

Example: Render PayPal Button
<body>
    <script>

      paypal.Buttons({

        style: {

          layout: 'vertical', // vertical or horizontal

          color: 'gold', // gold, blue, black, silver, white

          shape: 'rect', // rect, pill

          label: 'checkout', // paypal, pay, subscribe, checkout, buynow

          height: 40 // 25 - 55, a value around 40 is recommended

        },

        createOrder: function(data, actions) {

          return fetch('create.php', {

            method: 'post'

          }).then(function(res) {

                    return res.text();

                }).then(function(orderID) {

                  console.log(orderID);

                    return orderID;

                });

        },

        onApprove: function(data, actions) {

          window.location = 'auswerten2.php?type=express';

        },

        onCancel: function(data, actions) {

          console.log("Customer cancelled the PayPal Checkout Flow");

        },

        onError: function() {

          console.log("An Error occurred as part of the PayPal JS SDK");

        },

        onShippingChange: function(data, actions) {

        // Verwenden der PHP Logik, um Versandoptionen zu ändern

        return fetch('handleShippingChange.php')

            .then(response => response.json())

            .then(patch => actions.order.patch(patch))

            .catch(error => console.error(error));

    }

      }).render('#paypal-button-container');

    </script>

   <div id="paypal-button-container"></div>
</div>

</body>

Enable shipping and payment updates

The display of payment and shipping might change depending on the shipping address retrieved from PayPal. Therefore you have the option to patch/update your order after the redirection from PayPal back to the merchant. 

Configure your Initiation script

PayPal allows the configuration of the initiation script via Query parameters to help define specific content or actions based on the data being passed. Each piece of data sent contains:

  • A key-value pair: Keys define the piece of information needed, and the value provides that information. The key is separated from the value by an equal sign (=).
  • A question mark (?): Preceding the key-value pair to annotate that a question for a piece of information is being asked.
  • Ampersands (&): Used if more than one set of values needs to be provided at a time.
  • Information that PayPal needs to handle your request.
     

In this example, the script includes the following query parameters:

  • client-id: Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • merchant-id: YYYYYYYYYYYYYY
  • currency: EUR
  • intent: authorize (for preauthorization)
  • locale: de_DE the country list is published here
  • commit: true
  • vault: false
  • disable-funding: card, sepa ( these are not implemented)
  • enable-funding: paylater

 <script src="https://www.paypal.com/sdk/js?client-id=Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&merchant-id=LXXXXXXXXXXXXX&currency=EUR&intent=authorize&locale=de_DE&commit=true&vault=false&disable-funding=card,sepa,bancontact&enable-funding=paylater"></script>

 

For debug purpose you can also add the parameter

debug:  true/false

API Requests

Before proceeding to specific API requests for PayPal V2 your should familiarise yourself with the general Payone Server API interface definition as described in Channel Server API - Platform - PAYONE docs.
In this section we will describe the request chain specific remarks for PayPal Checkout V2 integration.

POST Request - Pre-/ Authorization
Account Parameters
request
required
Fixed Value: preauthorization / authorization
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
clearingtype
required
Fixed Value: wlt
common Parameters
amount
required
Format NUMERIC(1..10)
Permitted values max. +/- 19 999 999 99

Specifies the total gross amount of a payment transaction.

Value is given in smallest currency unit, e.g. Cent of Euro; Pence of Pound sterling; Öre of Swedish krona.

The amount must be less than or equal to the amount of the corresponding booking.

currency
required
Fixed Value EUR
narrative_text
optional
Format CHAR(1..81)

Dynamic text element on account statements (3 lines with 27 characters each) and credit card statements.

PERSONAL DATA Parameters
customerid
optional
Format CHAR(1..20)
Permitted Symbols [0-9, a-z, A-Z, .,-,_,/]

Merchant's customer ID, defined by you / merchant to refer to the customer record.

"customerid" can be used to identify a customer record. 
If "customerid" is used then stored customer data are loaded automatically.
userid
optional
Format NUMERIC(6..12)

PAYONE User ID, defined by PAYONE

salutation
optional
Format CHAR(1..10)

The customer's salutation

title
optional
Format CHAR(1..20)
Samples

Dr / Prof. / Dr.-Ing.

Title of the customer

firstname
optional
Format CHAR(1..50)

First name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

lastname
required
Format CHAR(2..50)

Last name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

company
optional
Format CHAR(2..50)

Comany name of customer; optional if company is used, i.e.: you may use "company" or "lastname" or "firstname" plus "lastname"

street
optional
Format CHAR(1..50)

Street number and name (required: at least one character)

addressaddition
optional
Format CHAR(1..50)
Samples

7th floor / c/o Maier

Specifies an additional address line for the invoice address of the customer.

zip
optional
Format CHAR(2..50)
Permitted Symbols [0-9][A-Z][a-z][_.-/ ]

Postcode

city
optional
Format CHAR(2..50)

City of customer

country
required
Fixed Value DE
email
optional
Format CHAR(5..254)

Mandatory if "add_paydata[shopping_cart_type]=DIGITAL"

Permitted Symbols RFC 5322

Special Remark email validation:

Max. length for email is 254 characters. Validation is set up in the following way:

Username = Max. 63 characters

Domain Name = Max. 63 characters
Domain Suffixes = Max. 4 suffixes with max. 124 characters 
Example: username[63]@domain_name[63].suffix[60].suffix[60].suffix[4]

"@" and "." is counted as a character as well; in case of a total of three suffixes, this would allow a total of 254 characters.

email-address of customer

telephonenumber
optional
Format CHAR(1..30)

Phone number of customer

birthday
optional
Format DATE(8), YYYYMMDD
Samples

20190101 / 19991231

Date of birth of customer

language
optional
Format LIST
Permitted values ISO 639-1 (Language)2-letter-codes

Language indicator (ISO 639) to specify the language that should be presented to the customer (e.g. for error messages, frontend display).

If the language is not transferred, the browser language will be used. For a non-supported language English will be used.

vatid
optional
Format CHAR(1..50)

VAT identification number. Used for b2b transactions to indicate VAT number of customer.

gender
optional
Format LIST
Permitted values f / m / d

Gender of customer (female / male / diverse* )

* currently not in use

personalid
optional
Format CHAR(1..32)
Permitted Symbols [0-9][A-Z][a-z][+-./()]

Person specific numbers or characters, e.g. number of passport / ID card

ip
optional
Format CHAR(1..39)

Customer's IP-V4-address (123.123.123.123) or IP-V6-address

Delivery data Parameters
shipping_firstname
required
Format CHAR(1..50)

First name of delivery address

shipping_lastname
required
Format CHAR(1..50)

Surname of delivery address

shipping_company
optional
Format CHAR(2..50)

Company name of delivery address

shipping_street
optional
Format CHAR(2..50)

Street number and name of delivery address

shipping_zip
required
Format CHAR(2..50)

Postcode of delivery address

shipping_addressaddition
optional
Format CHAR(1..50)

Specifies an additional address line for the delivery address of the customer, e.g. "7th floor", "c/o Maier".

shipping_country
optional
Format LIST
Permitted values ISO 3166 2-letter-codes
Samples

DE / GB / US

Specifies country of address for the customer.

Some countries require additional information in parameter "state"

shipping_state
optional
Format LIST
Permitted values ISO 3166-2 States (regions) 2-letter-codes
Samples US Samples CA
AK BC
AB AR
AL BA
Wallet PARAMETERS
wallettype
required
Fixed Value: PAL
successurl
required
Format CHAR(2..255)

Scheme <scheme>://<host>/<path>
       <scheme>://<host>/<path>?<query>
       
scheme-pattern: [a-zA-Z]{1}[a-zA-Z0-9]{1,9}

URL for "payment successful"

errorurl
required
Format CHAR(2..255)

Scheme <scheme>://<host>/<path>
       <scheme>://<host>/<path>?<query>
       
scheme-pattern: [a-zA-Z]{1}[a-zA-Z0-9]{1,9}

URL for "faulty payment"

backurl
required
Format CHAR(2..255)

Scheme <scheme>://<host>/<path>
       <scheme>://<host>/<path>?<query>
       
scheme-pattern: [a-zA-Z]{1}[a-zA-Z0-9]{1,9}

URL for "Back" or "Cancel"

Article Parameters
Use a second Article ([n+1]) for shipping as there are no separate parameters for it
it[n]
optional
it[n] Comments
goods Goods
shipment Shipping Charges
handling Handling fee
voucher Voucher / discount

Required for physical goods in order to ensure PayPal seller protection

id[n]
optional
Format CHAR(1..32)
Array Array elements [n] starting with [1]; serially numbered; max [400]
Permitted Symbols [0-9][a-z][A-Z], .,-,_,/

Required for physical goods in order to ensure PayPal seller protection

International Article Number (EAN bzw. GTIN)

Product number, SKU, etc. of this item

pr[n]
optional
Format NUMERIC(10) max. 19 999 999 99
Array elements [n] starting with [1]; serially numbered; max [400]

Required for physical goods in order to ensure PayPal seller protection

Unit gross price of the item in smallest unit! e.g. cent. Value negative for refund like -1500 for refund of 15 EUR

no[n]
optional
Format NUMERIC(6)
Array elements [n] starting with [1]; serially numbered; max [400]

Required for physical goods in order to ensure PayPal seller protection

Quantity of this item

de[n]
optional
Format CHAR(1..255)
Array elements [n] starting with [1]; serially numbered; max [400]

Required for physical goods in order to ensure PayPal seller protection

Description of this item. Will be printed on documents to customer.

va[n]
optional
Format NUMERIC(4)

VAT rate (% or bp)

Array elements [n] starting with [1]; serially numbered; max [400]

Response Parameters
status
required
Permitted Values
REDIRECT
ERROR
Response Parameter (redirect)
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

Format NUMERIC(6..12)

PAYONE User ID, defined by PAYONE

Format CHAR(2..2000)

Redirect URL → zMerchant system has to redirect customer to this URL to complete payment

Response Parameter (Error)
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
    Content-Type: application/x-www-form-urlencoded  
Payload
mid=23456
portalid=12345123
key=abcdefghijklmn123456789
api_version=3.11
mode=test (set to „live“ for live-requests)
request=preauthorization
encoding=UTF-8
aid=12345
clearingtype=wlt
reference=Ref123456
language: de,
wallettype: PAL,
workorderid: PP2AAD7NDFDJ0ALS,
id[n]: 1001001,
id[n+1]: 1001002,
it[n]: goods,
it[n+1]: shipment,
no[n]: 1,
no[n+1]: 1,
pr[n]: 2000,
pr[n+1]: 500,
de[n]: Testartikel1,
de[n+1]: Transport,
va: {
va[n]: 19,
va[n+1]: 19,
amount: 20500,
currency: EUR
firstname: Maximilian,
lastname: Maximilian,
street: Heinestrasse3,
country: DE,
city: Berlin,
zip: 12345,
email: pui-testGast@payone.de,
shipping_firstname: Maximilian,
shipping_lastname: Maximilian,
shipping_street: Heinestrasse3,
shipping_country: DE,
shipping_city: Berlin,
shipping_zip: 12345,
successurl=http://www.your-success.url
errorurl=http://www.your-error.url
backurl=http://www.your-back.url
RESPONSE
status=REDIRECT
txid: 1202830913,
userid: 27966082,
redirecturl: https: //www.sandbox.paypal.com/checkoutnow?token 

---end

POST Request - genericpayment – add_paydata[action] = update_order

This can be used, when through the SDK it is signaled, that the buyer has changed the shipping address on their PayPal site, so that the shipping costs have changed (delivery to the isles, or abroad). Only the parameter that needs to be changed, need to be sent

Account Parameters
request
required
Fixed Value: preauthorization / authorization
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric

---end

PERSONAL DATA Parameters
email
optional
Format CHAR(5..254)

Mandatory if "add_paydata[shopping_cart_type]=DIGITAL"

Permitted Symbols RFC 5322

Special Remark email validation:

Max. length for email is 254 characters. Validation is set up in the following way:

Username = Max. 63 characters

Domain Name = Max. 63 characters
Domain Suffixes = Max. 4 suffixes with max. 124 characters
Example: username[63]@domain_name[63].suffix[60].suffix[60].suffix[4]

"@" and "." is counted as a character as well; in case of a total of three suffixes, this would allow a total of 254 characters.

email-address of customer

telephonenumber
optional
Format CHAR(1..30)

Phone number of customer

language
optional
Format LIST

Permitted values ISO 639-1 (Language)2-letter-codes

Language indicator (ISO 639) to specify the language that should be presented to the customer (e.g. for error messages, frontend display).

If the language is not transferred, the browser language will be used. For a non-supported language English will be used.

---end

Delivery data Parameters
shipping_firstname
required
Format CHAR(1..50)

First name of delivery address

shipping_lastname
required
Format CHAR(1..50)

Surname of delivery address

shipping_company
optional
Format CHAR(2..50)

Company name of delivery address

shipping_street
optional
Format CHAR(2..50)

Street number and name of delivery address

shipping_zip
required
Format CHAR(2..50)

Postcode of delivery address

shipping_addressaddition
optional
Format CHAR(1..50)

Specifies an additional address line for the delivery address of the customer, e.g. "7th floor", "c/o Maier".

shipping_country
optional
Format LIST

Permitted values ISO 3166 2-letter-codes

 

Samples DE / GB / US

Specifies country of address for the customer.

Some countries require additional information in parameter "state"

shipping_state
optional
Format LIST

Permitted values ISO 3166-2 States (regions) 2-letter-codes

Samples US Samples CA
AK BC
AB AR
AL BA

---end

Wallet PARAMETERS
wallettype
required
Fixed Value PAL
successurl
required
Format CHAR(2..255)

Scheme <scheme>://<host>/<path>
       <scheme>://<host>/<path>?<query>
       
scheme-pattern: [a-zA-Z]{1}[a-zA-Z0-9]{1,9}

URL for "payment successful"

errorurl
required
Format CHAR(2..255)

Scheme <scheme>://<host>/<path>
       <scheme>://<host>/<path>?<query>
       
scheme-pattern: [a-zA-Z]{1}[a-zA-Z0-9]{1,9}

URL for "faulty payment"

backurl
required
Format CHAR(2..255)

Scheme <scheme>://<host>/<path>
       <scheme>://<host>/<path>?<query>
       
scheme-pattern: [a-zA-Z]{1}[a-zA-Z0-9]{1,9}

URL for "Back" or "Cancel"

---end

Article Parameters
it[n]
required

it[n] Comments
goods Goods
shipment Shipping Charges
handling Handling fee
voucher Voucher / discount

id[n]
required
Format CHAR(1..32)
Array Array elements [n] starting with [1]; serially numbered; max [400]Permitted Symbols [0-9][a-z][A-Z], .,-,_,/

International Article Number (EAN bzw. GTIN)

Product number, SKU, etc. of this item

pr[n]
required
Format NUMERIC(10) max. 19 999 999 99
Array Array elements [n] starting with [1]; serially numbered; max [400]Permitted

Unit gross price of the item in smallest unit! e.g. cent

no[n]
required
Format NUMERIC(6)
Array elements [n] starting with [1]; serially numbered; max [400]Permitted

Quantity of this item

de[n]
required
Format CHAR(1..255)
Array Array elements [n] starting with [1]; serially numbered; max [400]Permitted

Description of this item. Will be printed on documents to customer.

va[n]
optional
Format NUMERIC(4)

VAT rate (% or bp)

Array elements [n] starting with [1]; serially numbered; max [400]

---end

Paydata Parameters
add_paydata[payment_action]
required
Fixed Value:  Capture / Authorize

Is either Capture (for Authorization call) or Authorize (for preauthorization call)

add_paydata[action]
required
Fixed Value: update_order

add_paydata[request_id]
required
Format: (CHAR 1...255)

...sometext

---end

Response Parameters
status
required
Permitted Values
OK / ERROR
Response Parameter (OK)
workorderid
Format AN(1..16)

The ID is unique. The returned workorderid is mandatory for the following requests of PayPal Express Checkout.

The workorderid is a technical id returned from the PAYONE platform to identify a workorder. A workorder is a part of a payment process (identified by a txid). The workorderid is used for the genericpayment request.

---

ReSponse Parameter (Error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
    Content-Type: application/x-www-form-urlencoded
    
Payload
request: genericpayment,
mid: 18323,
aid: 18324,
portalid: 2013285,
key: 1856f15989f3df533f77f294a6871c2a,
add_paydata[payment_action]: your payment action
add_paydata[action]: update_order,
add_paydata[request_id]: 73851048-867f-4f1b-be4a-4daafa2ef999,
id[n]: 1001001,
id[n+1]: 1001002,
it[n]: goods,
it[n+1]: shipment,
no[n]: 1,
no[n+1]: 1,
pr[n]: 2000,
pr[n+1]: 500,
de[n]: Testartikel1,
de[n+1]: Transport,
successurl: https: //pay1-test.de/api_test.php?exit=success&txid=__txid__,
backurl: https: //pay1-test.de/api_test.php?exit=back,
errorurl: https: //pay1-test.de/api_test.php?exit=error&errorcode=__errorcode__,
encoding: UTF-8,
language: de,
email: email@email.com,
telephonenumber: 49123456789,
currency: EUR,
workorderid: PP2AAD7924U0PV3H,
clearingtype: wlt,
wallettype: PAL,
customerid: 13377331,
amount: 1100,
mode: test


RESPONSE
status=OK
workorderid: PP2AAD7924U0PV3H              

---end

POST Request - Capture
Account Parameters
request
required
Fixed Value: capture
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
common Parameters
txid
required
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

sequencenumber
optional
Format NUMERIC(1..3)
Permitted values 0..127

Sequence number for this transaction within the payment process (1..n), e.g. PreAuthorization: 0, 1. Capture: 1, 2. Capture: 2

Required for multi partial capture (starting with the 2nd capture)

amount
required
Format NUMERIC(1..10)
Permitted values max. +/- 19 999 999 99

Specifies the total gross amount of a payment transaction.

Value is given in smallest currency unit, e.g. Cent of Euro; Pence of Pound sterling; Öre of Swedish krona.

The amount must be less than or equal to the amount of the corresponding booking.

currency
required
Fixed Value EUR
narrative_text
optional
Format CHAR(1..81)

Dynamic text element on account statements (3 lines with 27 characters each) and credit card statements.

Response Parameters
Permitted Values
APPROVED
PENDING
ERROR
Response Parameter (approved)
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

add_paydata[capture_id]
Format CHAR(16)

The capture ID can be used for multiple captures and refunds, to connect a specific refund to a specific capture

Format LIST
Value Comment

yes

Settlement of outstanding balances has been carried out.

no

Settlement of outstanding balances has not been carried out.

Provides information about whether a settlement of balances has been carried out.

Response parameters (pending)
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

Format NUMERIC(6..12)

PAYONE User ID, defined by PAYONE

Response Parameter (Error)
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload
mid=23456 (your mid)
portalid=12345123 (your portalid)
key=abcdefghijklmn123456789 (your key)
api_version=3.10
mode=test (set to „live“ for live-requests)
request=capture
encoding=UTF-8
id[n]: 1001001,
id[n+1]: 1001002,
it[n]: goods,
it[n+1]: shipment,
no[n]: 1,
no[n+1]: 1,
pr[n]: 20000,
pr[n+1]: 500,
de[n]: Testartikel1,
de[n+1]: Transport,
va[n]: 19,
va[n+1]: 19,
amount: 20500,
currency: EUR,
sequencenumber: 1,
settleaccount: auto,
txid: 1202830913
RESPONSE
status: APPROVED,
txid: 1202830913,
add_paydata[capture_id]: TX2AAD7XN4UFGG9X,
settleaccount: yes
POST Request - Debit
Account Parameters
request
required
Fixed Value: debit
mid
required
your merchant ID, 5-digit numeric
aid
required
your subaccount ID, 5-digit numeric
portalId
required
your Portal ID, 7-digit numeric
key
required
your key value, alpha-numeric
Common Parameters
txid
required
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

sequencenumber
required
Format NUMERIC(1..3)
Permitted values 0..127

Sequence number for this transaction within the payment process (1..n), e.g. PreAuthorization: 0, 1. Capture: 1, 2. Capture: 2

Required for multi partial capture (starting with the 2nd capture)

amount
required
Format NUMERIC(1..10)
Permitted values max. +/- 19 999 999 99

Specifies the total gross amount of a payment transaction.

Value is given in smallest currency unit, e.g. Cent of Euro; Pence of Pound sterling; Öre of Swedish krona.

The amount must be less than or equal to the amount of the corresponding booking.

currency
required
Fixed Value EUR
narrative_text
optional
Format CHAR(1..81)

Dynamic text element on account statements (3 lines with 27 characters each) and credit card statements.

add_paydata[capture_id]
optional
Fixed Char(1..16)

The capture ID can be used for multiple captures and refunds, to connect a specific refund to a specific capture

use_customerdata
optional
Format LIST
Value Comment
yes

Uses current account details from debtor's master data (default)

no

Uses the last known account details in the payment process

Use account details from debtor's master data

transaction_param
optional
Format CHAR(1..50)
Permitted Symbols [0-9][A-Z][a-z][.-_/]

Optional parameter for merchant information (per payment request)

Response Parameters
Permitted Values
APPROVED
PENDING
ERROR
Response Parameter (approved)
txid
Format NUMERIC(9..12)

The txid specifies the payment process within the PAYONE platform

settleaccount
Format LIST
Value Comment
yes Settlement of outstanding balances has been carried out.
no Settlement of outstanding balances has not been carried out.

Provides information about whether a settlement of balances has been carried out.

Response Parameter (error)
errorcode
Format NUMERIC(1..6)

In case of error the PAYONE Platform returns an error code for your internal usage.

errormessage
Format CHAR(1..1024)

In case of error the PAYONE Platform returns an error message for your internal usage.

customermessage
Format CHAR(1..1024)

The customermessage is returned to your system in order to be displayed to the customer.

(Language selection is based on the end customer's language, parameter "language")

Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload
mid=23456
portalid=12345123
key=abcdefghijklmn123456789
api_version=3.10
mode=test (set to „live“ for live-requests)
request=capture
encoding=UTF-8
request: refund,
aid: 54321,
sequencenumber: 2,
txid: 1202830913,
amount: -20500,
currency: EUR
RESPONSE
status: APPROVED,
txid: 1202830913

Sequence Diagrams

Server to Server Preauthorization - Capture - Refund

 

Javascript sDK - Preauthorization - Capture - Refund

 

Server to Server - Authorization - Refund

Javascript sDK - Authorization - Refund