Opis funkcji API

POST cards / sale

Metoda cards/sale umożliwia przeprowadzenie pojedynczej płatności z użyciem karty (kredytowej, debetowej, przedpłaconej itd.). Uwzględnia dodatkowe mechanizmy bezpieczeństwa, takie jak AVS czy fraud check.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
fraud_check_on
boolean
nie
Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level
integer (0…4)
nie
Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
nie
Customer name or company. Usually the same as in the name_on_card.
email
string (6-80 characters)
tak
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
nie
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
card
JSON Object
tak
A structure containing card information
Rozwiń

Struktura card

card_number
string (13-19 digits)
tak
The full number of the card without any whitespaces. Only digits are allowed.
expiration_month
string (2 digits, 01…12)
tak
Expiration month. 01 to 12.
expiration_year
string (4 digits, 2008…2018)
tak
Expiration year as on the card.
name_on_card
string (2-50 characters, UTF-8 encoded)
tak
Cardholder name as written on the card.
card_code
string (3-4 digits)
tak
Depending on the type of the card this will be either CVV2 (Visa), CVC2 (MasterCard) or CID (American Express).
API Endpoint: POST https://direct.paylane.com/rest/cards/sale
Przykład zapytania
JSON
{
    "sale"      :   {
                    "amount"            :   100.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704",
                    "fraud_check_on"    :   true,
                    "avs_check_level"   :   2
    },
    "customer"  :   {
                    "name"      :   "John Doe",
                    "email"     :   "john@doe.com",
                    "ip"        :   "123.456.78.90",
                    "address"   :   {
                                "street_house"  :   "1600 Pennsylvania Avenue Northwest",
                                "city"          :   "Washington",
                                "state"         :   "DC",
                                "zip"           :   "20500",
                                "country_code"  :   "US"
                    }
    },
    "card"      :   {
                    "card_number"       :   "4111111111111111",
                    "expiration_month"  :   "03",
                    "expiration_year"   :   "2017",
                    "name_on_card"      :   "John Doe",
                    "card_code"         :   "123"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
nsigned long
Optional: identification number of the attempt to make a sale.
id_sale
unsigned long
Identification number of the sale. This number should be always saved in your system to perform other operations on a sale (for example recurring billing, resales, refunds). Sale identification number is unique for each sale
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
fraud_score
decimal
Fraud score of the transaction. Decimal values from 0 to 100. The lower, the better.
avs_result
string
AVS (Address Verification System) result code.
id_account
unsigned long
Identification number of Merchant Account where the transaction took place.
Odpowiedź
Success/Error
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "avs_result"    :   "M",
    "fraud_score"   :   10,
    "id_account"    :   14
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   415,
                        "error_description"             :   "Card has expired.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    },
    "avs_result"    :   "D",
    "fraud_score"   :   65,
    "id_account"    :   14
}

POST cards / saleByToken

Metoda cards/saleByToken umożliwia przeprowadzenie pojedynczej płatności z użyciem karty (kredytowej, debetowej, przedpłaconej itd.). Uwzględnia dodatkowe mechanizmy bezpieczeństwa, takie jak AVS czy fraud check.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
fraud_check_on
boolean
nie
Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level
integer (0…4)
nie
Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
sstring (2-50 characters, UTF-8 encoded)
nie
Customer name or company. Usually the same as in the name_on_card.
email
string (6-80 characters)
tak
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
nie
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
card
JSON Object
tak
A structure containing card information.
Rozwiń

Struktura card

token
string (64 chars)
tak
A unique string that identifies a specific card. It’s generated by PayLane when making a payment and remains active for 15 minutes.
API Endpoint: POST https://direct.paylane.com/rest/cards/saleByToken
Przykład zapytania
JSON
{
    "sale"      :   {
                    "amount"            :   100.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704",
                    "fraud_check_on"    :   true,
                    "avs_check_level"   :   2
    },
    "customer"  :   {
                    "name"      :   "John Doe",
                    "email"     :   "john@doe.com",
                    "ip"        :   "123.456.78.90",
                    "address"   :   {
                                "street_house"  :   "1600 Pennsylvania Avenue Northwest",
                                "city"          :   "Washington",
                                "state"         :   "DC",
                                "zip"           :   "20500",
                                "country_code"  :   "US"
                    }
    },
    "card"      :   {
                    "token" : "12a34b45c67d89e00f1aa2bb3cc4dd5ee6ff12a34b45c67d89e00f1aa2bb3cc4"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
id_sale
unsigned long
Identification number of the sale. This number should be always saved in your system to perform other operations on a sale (for example recurring billing, resales, refunds). Sale identification number is unique for each sale.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
fraud_score
decimal
Fraud score of the transaction. Decimal values from 0 to 100. The lower, the better.
avs_result
string
AVS (Address Verification System) result code.
Odpowiedź
Success/Error
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "avs_result"    :   "M",
    "fraud_score"   :   10
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   415,
                        "error_description"             :   "Card has expired.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    },
    "avs_result"    :   "D",
    "fraud_score"   :   65
}

POST cards / authorization

Metoda cards/authorization umożliwia autoryzowanie karty (kredytowej, debetowej, przedpłaconej itd.). Oznacza to, że określona kwota zostaje jedynie zablokowana, ale nie będzie pobrana z karty. Zablokowane środki mogą zostać później pobrane (metoda authorizations/capture) lub zwolnione (metoda authorization/close) automatyczne zwolnienie środków nastąpi też po określonym czasie). Mechanizm autoryzacji jest często stosowany do zweryfikowania karty.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
fraud_check_on
boolean
nie
Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level
integer (0…4)
nie
Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
nie
Customer name or company. Usually the same as in the name_on_card.
email
string (6-80 characters)
tak
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
nie
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
card
JSON Object
tak
A structure containing card information.
Rozwiń

Struktura card

card_number
string (13-19 digits)
tak
The full number of the card without any whitespaces. Only digits are allowed.
expiration_month
string (2 digits, 01…12)
tak
Expiration month. 01 to 12.
expiration_year
string (4 digits, 2008…2018)
tak
Expiration year as on the card.
name_on_card
string (2-50 characters, UTF-8 encoded)
tak
Cardholder name as written on the card.
card_code
string (3-4 digits)
tak
Depending on the type of the card this will be either CVV2 (Visa), CVC2 (MasterCard) or CID (American Express).
API Endpoint: POST https://direct.paylane.com/rest/cards/authorization
Przykład zapytania
JSON
{
    "sale"      :   {
                    "amount"            :   10.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704",
                    "fraud_check_on"    :   true,
                    "avs_check_level"   :   2
    },
    "customer"  :   {
                    "name"      :   "John Doe",
                    "email"     :   "john@doe.com",
                    "ip"        :   "123.456.78.90",
                    "address"   :   {
                                "street_house"  :   "1600 Pennsylvania Avenue Northwest",
                                "city"          :   "Washington",
                                "state"         :   "DC",
                                "zip"           :   "20500",
                                "country_code"  :   "US"
                    }
    },
    "card"      :   {
                    "card_number"       :   "4111111111111111",
                    "expiration_month"  :   "03",
                    "expiration_year"   :   "2017",
                    "name_on_card"      :   "John Doe",
                    "card_code"         :   "123"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
id_authorization
unsigned long
Identification number of the authorization. This number should be always saved in your system to perform other operations (for example refunds). Authorization identification number is unique for each authorization.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
fraud_score
decimal
Fraud score of the transaction. Decimal values from 0 to 100. The lower, the better.
avs_result
string
AVS (Address Verification System) result code.
id_account
unsigned long
Identification number of Merchant Account where the transaction took place.
Odpowiedź
Success/Error
{
    "success"           :   true,
    "id_authorization"  :   1234567,
    "avs_result"        :   "M",
    "fraud_score"       :   10,
    "id_account"        :   14
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   415,
                        "error_description"             :   "Card has expired.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    },
    "avs_result"    :   "D",
    "fraud_score"   :   65,
    "id_account"    :   14
}

POST cards / authorizationByToken

Metoda cards/authorizationByToken umożliwia autoryzowanie karty (kredytowej, debetowej, przedpłaconej itd.). Oznacza to, że określona kwota zostaje jedynie zablokowana, ale nie będzie pobrana z karty. Zablokowane środki mogą zostać później pobrane (metoda authorizations/capture) lub zwolnione (metoda authorization/close) automatyczne zwolnienie środków nastąpi też po określonym czasie). Mechanizm autoryzacji jest często stosowany do zweryfikowania karty.  

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
fraud_check_on
boolean
nie
Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level
integer (0…4)
nie
Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
nie
Customer name or company. Usually the same as in the name_on_card.
email
string (6-80 characters)
nie
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
nie
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
card
JSON Object
tak
A structure containing card information.
Rozwiń

Struktura card

token
string (64 chars)
tak
A unique string that identifies a specific card. It’s generated by PayLane when making a payment and remains active for 15 minutes.
API Endpoint: POST https://direct.paylane.com/rest/cards/authorizationByToken
Przykład zapytania
JSON
{
    "sale"      :   {
                    "amount"            :   10.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704",
                    "fraud_check_on"    :   true,
                    "avs_check_level"   :   2
    },
    "customer"  :   {
                    "name"      :   "John Doe",
                    "email"     :   "john@doe.com",
                    "ip"        :   "123.456.78.90",
                    "address"   :   {
                                "street_house"  :   "1600 Pennsylvania Avenue Northwest",
                                "city"          :   "Washington",
                                "state"         :   "DC",
                                "zip"           :   "20500",
                                "country_code"  :   "US"
                    }
    },
    "card"      :   {
                    "token" : "12a34b45c67d89e00f1aa2bb3cc4dd5ee6ff12a34b45c67d89e00f1aa2bb3cc4"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
id_authorization
unsigned long
Identification number of the authorization. This number should be always saved in your system to perform other operations (for example refunds). Authorization identification number is unique for each authorization.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
fraud_score
decimal
Fraud score of the transaction. Decimal values from 0 to 100. The lower, the better.
avs_result
string
AVS (Address Verification System) result code.
Odpowiedź
Success/Error
{
    "success"           :   true,
    "id_authorization"  :   1234567,
    "avs_result"        :   "M",
    "fraud_score"       :   10
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   415,
                        "error_description"             :   "Card has expired.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    },
    "avs_result"    :   "D",
    "fraud_score"   :   65
}

POST cards / generateToken

Metoda cards/generateToken tworzy tymczasowy, unikalny token dla podanego zestawu danych karty. Token jest ważny przez 15 minut od utworzenia.

Struktura zapytania

Pole
Format
Wymagane
Opis
public_api_key
string (40 characters)
tak
Your Public API Key.
card_number
string (13-19 digits)
tak
The full number of the card without any whitespaces. Only digits are allowed.
expiration_month
string (2 digits, 01…12)
tak
Expiration month. 01 to 12.
expiration_year
string (4 digits, 2008…2018)
tak
Expiration year as on the card.
name_on_card
string (2-50 characters, UTF-8 encoded)
tak
Cardholder name as written on the card.
card_code
string (3-4 digits)
tak
Depending on the type of the card this will be either CVV2 (Visa), CVC2 (MasterCard) or CID (American Express)
API Endpoint: POST https://direct.paylane.com/rest.js/cards/generateToken
Sample Request
JSON
{
    "public_api_key"    :   "71426338751d8c8e454a13fa4c44a3094cbab89c",
    "card_number"       :   "4111111111111111",
    "expiration_month"  :   "03",
    "expiration_year"   :   "2017",
    "name_on_card"      :   "John Doe",
    "card_code"         :   "123"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
token
string (64 hexadecimal characters)
Generated token.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
Sample Response
Success/Error
{
    "success"       :   true,
    "token"         :   "12a34b45c67d89e00f1aa2bb3cc4dd5ee6ff12a34b45c67d89e00f1aa2bb3cc4"
}
{
    "success"       :   false,
    "error"         :   {
                        "error_number"      :   415,
                        "error_description" :   "Card has expired."
    }
}

POST cards / check

Metoda cards/check sprawdza, czy podany numer karty jest prawidłowy oraz rozpoznaje wystawcę karty.

Struktura zapytania

Pole
Format
Wymagane
Opis
card_number
string (13-19 digits)
tak
The full number of the card without any whitespaces. Only digits are allowed.
API Endpoint: POST https://direct.paylane.com/rest/cards/check
Sample Request
JSON
{
    "card_number"  :   "4200000000000000"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the check was successful and the card’s brand was recognized.
card_type
string (64 hexadecimal characters)
Card’s brand name. Possible values: VISA – Visa, MC – MasterCard, AMEX – American Express, MAESTRO_INT – Maestro International, DISC – Discover, DINERS – Diners Club, JCB – JCB.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
Sample Response
Success/Error
{
    "success"   :   true,
    "card_type" :   "VISA"
}
{
    "success" :   false,
    "error"   :   {
        "error_number"      : "411",
        "error_description" : "Card number format is not valid."
    }
}

POST cards / checkByToken

Metoda cards/checkByToken sprawdza, czy podany numer karty jest prawidłowy oraz rozpoznaje wystawcę karty.

Struktura zapytania

Pole
Format
Wymagane
Opis
token
string (64 chars)
tak
A unique string that identifies a specific card. It’s generated by PayLane when making a payment and remains active for 15 minutes.
API Endpoint: POST https://direct.paylane.com/rest/cards/checkByToken
Sample Request
JSON
{
    "token" : "12a34b45c67d89e00f1aa2bb3cc4dd5ee6ff12a34b45c67d89e00f1aa2bb3cc4"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the check was successful and the card’s brand was recognized.
card_type
string (64 hexadecimal characters)
Card’s brand name. Possible values: VISA – Visa, MC – MasterCard, AMEX – American Express, MAESTRO_INT – Maestro International, DISC – Discover, DINERS – Diners Club, JCB – JCB.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
Sample Response
Success/Error
{
    "success"   :   true,
    "card_type" :   "VISA"
}
{
    "success" :   false,
    "error"   :   {
        "error_number"      : "411",
        "error_description" : "Card number format is not valid."
    }
}

POST paypal / sale

Metoda paypal/sale umożliwia przeprowadzenie pojedynczej transakcji z wykorzystaniem konta PayPal.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
back_url
string (10-255 characters, UTF-8 encoded)
tak
Website address where a customer will be redirected after performing the payment.
recurring
JSON Object
nie
A structure containing recurring profile information.
Rozwiń

Struktura recurring

amount
decimal (12,2)
tak
Amount of single recurring payment.
start_date
string (format: YYYY-mm-dd)
tak
Date of the first recurring payment.
period
string (accepted values: day, week, month)
tak
Recurring payments period.
API Endpoint: POST https://direct.paylane.com/rest/paypal/sale
Sample Request
JSON
{
    "sale"      :   {
                    "amount"            :   100.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704"
    },
    "back_url"      :   "http://merchants-website.com"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false
id_sale
unsigned long
Identification number of the sale. This number should be always saved in your system to perform other operations on a sale (for example recurring billing, resales, refunds). Sale identification number is unique for each sale.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
redirect_url
string (UTF-8 encoded)
Website address where the customer will be redirected to perform a payment.
Sample Response
Success/Error
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "redirect_url"  :   "https://secure.paylane.com/payment/123"
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}

POST paypal / authorization

Metoda paypal/authorization umożliwia autoryzację konta PayPal (blokadę środków).  

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
back_url
string (10-255 characters, UTF-8 encoded)
tak
Website address where a customer will be redirected after performing the payment.
API Endpoint: POST ttps://direct.paylane.com/rest/paypal/authorization
Sample Request
JSON
{
    "sale"      :   {
                    "amount"            :   10.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704"
    },
    "back_url"      :   "http://merchants-website.com"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
id_authorization
unsigned long
An unique identification number of the authorization.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
redirect_url
string (UTF-8 encoded)
Website address where the customer will be redirected to perform a payment.
Sample Response
Success/Error
{
    "success"           :   true,
    "id_authorization"  :   1234567,
    "redirect_url"      :   "https://secure.paylane.com/payment/123"
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}

POST paypal / stopRecurring

Metoda paypal/stopRecurring umożliwia zatrzymanie aktywnego profilu recurringowego PayPala.

Struktura zapytania

Pole
Format
Wymagane
Opis
id_paypal_recurring
unsigned long
tak
Identification number of recurring profile.
API Endpoint: POST https://direct.paylane.com/rest/paypal/stoprecurring

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
id_paypal_recurring
unsigned long
Identification number of stopped recurring profile.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Sample Response
Success/Error
{
    "success"             : true,
    "id_paypal_recurring" : 1,
}
{
    "success"               :   false,
    "error"                 :   {
      "error_number"      : 805
      "error_description" : "id_paypal_recurring not found"
    }
}

POST banktransfers / sale

Metoda banktransfers/sale umożliwia przeprowadzenie płatności z wykorzystaniem przelewu bankowego.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
nie
Customer name or company.
email
string (6-80 characters)
tak
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
tak
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
back_url
string (10-255 characters, UTF-8 encoded)
tak
Website address where a customer will be redirected after performing the payment.
payment_type
string (2-3 characters)
nie
Bank code:
AB – Alior Bank,
AS – T-Mobile Usługi Bankowe,
MT – mBank (mTransfer),
IN – Inteligo,
IP – iPKO,
MI – Millennium,
CA – Credit Agricole,
PP – Poczta Polska (postal money order),
PCZ – Bank Pocztowy,
IB – Idea Bank,
PO – Pekao S.A.,
GB – Getin Bank,
IG – ING Bank Śląski,
WB – Bank Zachodni WBK,
PB – Bank BGŻ BNP PARIBAS,
OH – other.
API Endpoint: POST https://direct.paylane.com/rest/banktransfers/sale
Sample Request
JSON
{
    "sale"          :   {
                        "amount"            :   100.00,
                        "currency"          :   "EUR",
                        "description"       :   "A brilliant product, #52704"
    },
    "customer"      :   {
                        "name"      :   "Hans Muller",
                        "email"     :   "hans@muller.de",
                        "ip"        :   "123.456.78.90",
                        "address"   :   {
                                    "street_house"  :   "Platz der Republik 1",
                                    "city"          :   "Berlin",
                                    "state"         :   "Berlin",
                                    "zip"           :   "11011",
                                    "country_code"  :   "DE"
                        }
    },
    "back_url"      :   "http://merchants-website.com",
    "payment_type"  :   "OH"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
id_sale
unsigned long
Identification number of the sale.
redirect_url
string (UTF-8 encoded)
Website address where the customer will be redirected to perform a payment.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
characters) Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
Sample Response
JSON/JSON
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "redirect_url"  :   "https://secure.paylane.com/payment/123"
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}

POST directdebits / sale

Metoda directdebits/sale umożliwia przeprowadznei płatności Direct Debit.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
nie
Customer name or company.
email
string (6-80 characters)
tak
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
tak
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
account
JSON Object
tak
A structure containing account data.
Rozwiń

Struktura account

iban
string (16-31 characters, UTF-8 encoded)
tak
Account IBAN number.
bic
string (8-11 characters, UTF-8 encoded)
tak
Bank Identifier Code (SWIFT/BIC/BLZ).
account_holder
string (2-30 characters, UTF-8 encoded)
tak
Account holder name.
account_country
string (2 characters)
tak
Bank account country code (ISO 3166 standard): e.g. AT/DE/NL.
mandate_id
string (1-35 characters)
tak
A unique ID that refers to a specific mandate (which is a written consent where the customer agree that the merchant may charge their account; learn more »).
API Endpoint: POST https://direct.paylane.com/rest/directdebits/sale
Sample Request
JSON
{
    "sale"      :   {
                    "amount"            :   100.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704"
    },
    "customer"  :   {
                    "name"      :   "Hans Muller",
                    "email"     :   "hans@muller.de",
                    "ip"        :   "123.456.78.90",
                    "address"   :   {
                                "street_house"  :   "Platz der Republik 1",
                                "city"          :   "Berlin",
                                "state"         :   "Berlin",
                                "zip"           :   "11011",
                                "country_code"  :   "DE"
                    }
    },
    "account"   :   {
                    "account_holder"    :   "Hans Muller",
                    "account_country"   :   "DE",
                    "iban"              :   "DE12345678901234567890",
                    "bic"               :   "BICBICDE",
                    "mandate_id"        :   "54321"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
id_sale
unsigned long
Identification number of the sale. This number should be always saved in your system to perform other operations on a sale (for example refunds). Sale identification number is unique for each sale.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
Sample Response
JSON/JSON
{
    "success"       :   true,
    "id_sale"       :   1234567
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   312,
                        "error_description"             :   "Account holder name is not valid.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}

POST sofort/sale

Metoda sofort/sale umożliwia przeprowadzenie płatności w wykorzystaniem systemu SOFORT Banking

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
nie
Customer name or company.
email
string (6-80 characters)
tak
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
tak
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
back_url
string (10-255 characters, UTF-8 encoded)
tak
Website address where a customer will be redirected after performing the payment.
API Endpoint: POST https://direct.paylane.com/rest/sofort/sale
Sample Request
JSON
{
    "sale"      :   {
                    "amount"            :   100.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704"
    },
    "customer"  :   {
                    "name"      :   "Hans Muller",
                    "email"     :   "hans@muller.de",
                    "ip"        :   "123.456.78.90",
                    "address"   :   {
                                "street_house"  :   "Platz der Republik 1",
                                "city"          :   "Berlin",
                                "state"         :   "Berlin",
                                "zip"           :   "11011",
                                "country_code"  :   "DE"
                    }
    },
    "back_url"  :   "http://merchants-website.com"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
id_sale
unsigned long
Identification number of the sale
redirect_url
string (UTF-8 encoded)
Website address where the customer will be redirected to perform a payment.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
Sample Response
Success/Error
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "redirect_url"  :   "https://secure.paylane.com/payment/123"
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}

POST applepay/sale

Metoda applepay/sale umożliwia przeprowadzenie pojedynczej transakcji z użyciem tokenu płatniczego Apple Pay.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
tak
Customer name.
email
string (6-80 characters)
tak
Valid email address.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
card
JSON Object
tak
A structure containing card information.
Rozwiń

Struktura card

token
string (base64)
tak
Base64 encoded payment token. It’s generated by Apple device.
API Endpoint: POST https://direct.paylane.com/rest/applepay/sale
Sample Request
JSON
{
    "sale": {
        "amount": 1.00,
        "currency": "USD",
        "description": "Test product"
    },
    "customer": {
        "name": "John Doe",
        "email": "john.doe@example.com",
        "country_code": "US",
        "ip": "127.0.0.1"
    },
    "card": {
        "token": "eyJwYXltZW50RGF0YSI6eyJ2ZXJzaW9uIjoiRUNfdjEiLCJkYXRhIjoicFpkZERNL2VmQm1qZ0drTk1RUmJncjM3VjdXVzhVMW40WlNXRjZzK2R4ZHBSMVRpbmI1aFlVVXRnQVBRRGZSV3NmR21ldEQ5RUF0cGFRTThPbEJGS21sdThKUXkrSUNhOXMyeDdSY3hFV1A4NXBsWWxNWjgvNkMwQWhLSGNEdkhuaW01VHZLVUZVY0NoeXhHNVlrNDhENUZObGl0OG0yL0dnWmkxVXkwS1RwTTZzZVMwMGpuRHl1a3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lF3VlNTK1V5azNBbnE5ZmIwa09uMGl5d21jTGdFQ0lDNWN1Y0FRSXk1SHI5UzhqWHRWREJsU2lpeDBDYnVsRlppOGR6bUZ3RkZxQUFBQUFBQUEiLCJoZWFkZXIiOnsiZXBoZW1lcmFsUHVibGljS2V5IjoiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFWmUrMlc5cTNyTEFETnNrNVdxc0VmR2cvQ01pdXNOWVpYdlJIeVZMWEowcFRSQ0VUR1dLQjl2dzNHZm9IZnA2RFFrK2FFTGxGeXFSRUswZC9MRDlWM1E9PSIsInB1YmxpY0tleUhhc2giOiJIYVZ4ZmdDUnVkOFpsRk1FWHZiTk1yNlk1MlhLQTNFaDljY0kveXR4eGxnPSIsInRyYW5zYWN0aW9uSWQiOiI4N2Q4MWIxNGQ1MzU4ZmFkZjE1ZjU1MWI5ZTM2MTg1Mzc4N2IyNjA2ZTM3MTY2Y2JkN2NhZjdmZWI5ZTczZDg3In19LCJwYXltZW50TWV0aG9kIjp7ImRpc3BsYXlOYW1lIjoiVmlzYSAxNDQ1IiwibmV0d29yayI6IlZpc2EiLCJ0eXBlIjoiZGViaXQifSwidHJhbnNhY3Rpb25JZGVudGlmaWVyIjoiODdEODFCMTRENTM1OEZBREYxNUY1NTFCOUUzNjE4NTM3ODdCMjYwNkUzNzE2NkNCRDdDQUY3RkVCOUU3M0Q4NyJ9"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
id_sale
unsigned long
Identification number of the sale. This number should be always saved in your system to perform other operations on a sale (for example recurring billing, resales, refunds). Sale identification number is unique for each sale.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
Sample Response
Success/Error
{
    "success": true,
    "id_sale": 1234567,
}
{
    "success": false,
    "error": {
        "id_error": 1234567,
        "error_number": 403,
        "error_description": "Card declined."
    }
}

POST applepay/authorization

Metoda applepay/authorization umożliwia autoryzowanie karty (kredytowej, debetowej, przedpłaconej itd.) z użyciem tokenu płatniczego Apple Pay. Oznacza to, że określona kwota zostaje jedynie zablokowana, ale nie będzie pobrana z karty. Zablokowane środki mogą zostać później pobrane (metoda authorizations/capture) lub zwolnione (metoda authorization/close; automatyczne zwolnienie środków nastąpi też po określonym czasie).

Mechanizm autoryzacji jest często stosowany do zweryfikowania karty.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
tak
Customer name.
email
string (6-80 characters)
tak
Valid email address.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
card
JSON Object
tak
A structure containing card information.
Rozwiń

Struktura card

token
string (base64)
tak
Base64 encoded payment token. It’s generated by Apple device.
API Endpoint: POST https://direct.paylane.com/rest/applepay/authorization
Sample Request
JSON
{
    "sale": {
        "amount": 1.00,
        "currency": "USD",
        "description": "Test product"
    },
    "customer": {
        "name": "John Doe",
        "email": "john.doe@example.com",
        "country_code": "US",
        "ip": "127.0.0.1"
    },
    "card": {
        "token": "eyJwYXltZW50RGF0YSI6eyJ2ZXJzaW9uIjoiRUNfdjEiLCJkYXRhIjoicFpkZERNL2VmQm1qZ0drTk1RUmJncjM3VjdXVzhVMW40WlNXRjZzK2R4ZHBSMV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JnbGdoa2dCWlFNRUFnRUZBS0VLQmdncWhrak9QUVFEQWpBdkJna3Foa2lHOXcwQkNRUXhJZ1FnR1ZOZlJESkZIclBYR0M0Z3MrTWJaZmtKZ2xXbkxKcDNoOTFkb2laTHVISXdDZ1lJS29aSXpqMEVBd0lFUnpCRkFpRUEvai9SV2hFZER4dEhSdlF3VlNTK1V5azNBbnE5ZmIwa09uMGl5d21jTGdFQ0lDNWN1Y0FRSXk1SHI5UzhqWHRWREJsU2lpeDBDYnVsRlppOGR6bUZ3RkZxQUFBQUFBQUEiLCJoZWFkZXIiOnsiZXBoZW1lcmFsUHVibGljS2V5IjoiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFWmUrMlc5cTNyTEFETnNrNVdxc0VmR2cvQ01pdXNOWVpYdlJIeVZMWEowcFRSQ0VUR1dLQjl2dzNHZm9IZnA2RFFrK2FFTGxGeXFSRUswZC9MRDlWM1E9PSIsInB1YmxpY0tleUhhc2giOiJIYVZ4ZmdDUnVkOFpsRk1FWHZiTk1yNlk1MlhLQTNFaDljY0kveXR4eGxnPSIsInRyYW5zYWN0aW9uSWQiOiI4N2Q4MWIxNGQ1MzU4ZmFkZjE1ZjU1MWI5ZTM2MTg1Mzc4N2IyNjA2ZTM3MTY2Y2JkN2NhZjdmZWI5ZTczZDg3In19LCJwYXltZW50TWV0aG9kIjp7ImRpc3BsYXlOYW1lIjoiVmlzYSAxNDQ1IiwibmV0d29yayI6IlZpc2EiLCJ0eXBlIjoiZGViaXQifSwidHJhbnNhY3Rpb25JZGVudGlmaWVyIjoiODdEODFCMTRENTM1OEZBREYxNUY1NTFCOUUzNjE4NTM3ODdCMjYwNkUzNzE2NkNCRDdDQUY3RkVCOUU3M0Q4NyJ9"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
true if the payment was performed successfully, otherwise – false.
id_authorization
unsigned long
Identification number of the authorization. This number should be always saved in your system to perform other operations (for example capture). Authorization identification number is unique for each authorization.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
Sample Response
Success/Error
{
    "success": true,
    "id_authorization": 1234567,
}
{
    "success": false,
    "error": {
        "id_error": 1234567,
        "error_number": 403,
        "error_description": "Card declined."
    }
}

POST refunds

Metoda refunds umożliwia dokonanie zwrotu środków w odniesieniu do konkretnej transakcji (niezależnie od rodzaju metody płatności).

Struktura zapytania

Pole
Format
Wymagane
Opis
id_sale
unsigned long
tak
Identification number of the sale that should be refunded.
amount
decimal (12,2)
tak
Amount to be refunded (always a positive value). Note that partial refunds are possible and can be issued up to the amount of the original transaction.
reason
string (2-200 characters)
tak
A reason for the refund. Should be always entered, as the refund ratio should be kept on the reasonable low level. PayLane risk management team will occasionally check the reason fields of the merchant when the refund ratio is too high.
API Endpoint: POST https://direct.paylane.com/rest/refunds
Sample Request
JSON
{
    "id_sale"   :   1234567,
    "amount"    :   15.00,
    "reason"    :   "Special discount."
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
id_refund
unsigned long
A unique refund identification number; should always be saved.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the close authorization attempt.
error_number
unsigned integer
PayLane error number.
error_description
string (max 128 chars)
PayLane’s description of the occurred error
processor_error_number
string
Error number returned by the acquiring bank (payment processor).
processor_error_description
string
Error description returned by the acquiring bank (payment processor).
Sample Response
Success/Error
{
    "success"   :   true,
    "id_refund" :   1234567
}
{
    "success"   :   false,
    "error"     :   {
                    "id_error"                      :   1234567,
                    "error_number"                  :   481,
                    "error_description"             :   "Sale ID is not valid.",
                    "processor_error_number"        :   "1234567",
                    "processor_error_description"   :   "Example description."
    }
}

POST authorizations / capture

Metoda authorizations/capture umożliwia pobranie kwoty, która została uprzednio zablokowana podczas autoryzacji na karcie, koncie PayPal lub przy transakcji Direct Debit.

Struktura zapytania

Pole
Format
Wymagane
Opis
id_authorization
unsigned long
tak
dentification number of the authorization.
amount
decimal (12,2)
tak
Amount to be captured. This amount must not be larger than previously authorized amount. It is possible to capture lower amount than authorized (e.g. when charging for partially fulfilled order).
description
string (2-200 characters)
nie
A short sale description.
API Endpoint: POST https://direct.paylane.com/rest/authorizations/capture
Sample Request
JSON
{
    "id_authorization"  :   1234567,
    "amount"            :   75.50,
    "description"       :   "First rate"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
id_sale
unsigned long
A unique sale identification number; should always be saved.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
fraud_score
decimal
Fraud score of the transaction. Decimal values from 0 to 100. The lower, the better. This parameter is optional and is returned only for card transactions that use fraud score protection.
id_account
unsigned long
Identification number of Merchant Account where the transaction took place.
Sample Response
Success/Error
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "fraud_score"   :   10,
    "id_account"    :   14
}
{
    "success"   :   false,
    "error"     :   {
                    "id_error"                      :   1234567,
                    "error_number"                  :   443,
                    "error_description"             :   "Capture sale amount greater than the authorization amount.",
                    "processor_error_number"        :   "1234567",
                    "processor_error_description"   :   "Example description."
    },
    "fraud_score"   :   65,
    "id_account"    :   14
}

POST authorizations / close

Metoda authorizations/close umożliwia zamknięcie wcześniejszej autoryzacji (np. karty lub konta PayPal) i zwolnienie zablokowanych środków. Autoryzacje wygasają samoistnie po określonym czasie, niemniej w niektórych przypadkach może być uzasadnione wcześniejsze zamknięcie.

Struktura zapytania

Pole
Format
Wymagane
Opis
id_authorization
unsigned long
tak
Identification number of the authorization.
API Endpoint: POST https://direct.paylane.com/rest/authorizations/close
Sample Request
JSON
{
    "id_authorization"  :   12345
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
error
JSON object
Present only if success == false.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the close authorization attempt.
error_number
unsigned integer (always 3 digits)
PayLane error number.
error_description
string (max 128 chars)
PayLane’s description of the occurred error.
processor_error_number
string
Error number returned by the acquiring bank (payment processor).
processor_error_description
string
Error description returned by the acquiring bank (payment processor).
Sample Response
Success/Error
{
    "success"   :   true
}
{
    "success"   :   false,
    "error"     :   {
                "id_error"                      :   1234567,
                "error_number"                  :   441,
                "error_description"             :   "Sale Authorization ID is not valid.",
                "processor_error_number"        :   "123",
                "processor_error_description"   :   "Example description."
    }
}

POST authorizations / info

Metoda authorizations/info zwraca dane dotyczące konkretnej autoryzacji (jednoznacznie określonej przez jej numer ID).

Struktura zapytania

Pole
Format
Wymagane
Opis
id_authorization
unsigned int
tak
Identification number of the authorization.
API Endpoint: POST https://direct.paylane.com/rest/authorizations/info
Sample Request
JSON
{
    "id_authorization"  :   12345
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
error
JSON object
Present only if success == false.
Rozwiń

Struktura error

error_number
unsigned integer (always 3 digits)
PayLane error number.
error_description
string (max 128 chars)
PayLane’s description of the occurred error.
id_authorization
unsigned long
Identification number of an authorization.
status
string
Authorization status: ACTIVE CAPTURED CLOSED EXPIRED NOT_FOUND
amount
decimal (15,2)
The total amount of the authorization.
date
string (ISO 8601)
Authorization date.
currency
string (3 characters)
Transaction currency code. ISO 4217 format, all uppercase.
payment_method
string
Payment method code such as CC_VISA or CC_MC.
description
string
A short description of the authorization.
is_disposed
boolean
If true, authorization cannot be used as a reference.
customer
JSON Object
Basic customer information.
Rozwiń

Struktura customer

name
string
Customer name.
email
string
Customer e-mail address.
card
JSON Object
A structure containing basic card information.
Rozwiń

Struktura card

name
string
Cardholder name.
number
string
Masked card number; first four and last four digits of the card number.
expiration_month
nteger
Card expiration month. 1 to 12
expiration_year
integer
Card expiration year.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Sample Response
Success/Success/Error
{
    "success"          : true,
    "id_authorization" : 1234,
    "status"           : "CAPTURED",
    "amount"           : 100.00,
    "date"             : "2018-01-15T10:00:12+00:00",
    "currency_code"    : "EUR",
    "description"      : "A brilliant product, #52704",
    "is_disposed"      : false,
    "customer"         : {
                        "name"  :   "John Doe",
                        "email" :   "john@doe.com"
    }
    "card"             :   {
                        "name"   :   "John Doe",
                        "number" :   "4100...0001"
    },
}
{
    "success"          : true,
    "id_authorization" : 999999999,
    "status"           : "NOT_FOUND",
    "description"      : "",
    "amount"           : "",
    "currency_code"    : ""
}
{
    "success"   :   false,
    "error"     :   {
                "error_number"       :  441,
                "error_description"  :  "Sale Authorization ID is not valid."
    }
}

POST sales / info

Metoda sales/info zwraca dane o transakcji, które pozwalają na określenie statusu płatności (włącznie z tym, czy środki były zwracane).

Struktura zapytania

Pole
Format
Wymagane
Opis
id_sale
unsigned long
tak
Identification number of a sale.
API Endpoint: POST https://direct.paylane.com/rest/sales/info
Sample Request
JSON
{
    "id_sale"  :   2345
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
id_sale
unsigned long
Identification number of a sale.
status
string (UTF-8 encoded)
Sale status: NOT_FOUND – sale ID was not found for this merchant account; PENDING – sale is waiting to be performed (in progress or not completed); PERFORMED – sale has been successfully performed; CLEARED – sale has been cleared (confirmation from a bank was received).
is_refund
boolean
If true, a refund has been performed for this sale.
is_chargeback
boolean
If true, a chargeback has been performed for this sale.
is_reversal
boolean
If true, a reversal has been performed for this sale.
amount
decimal (12,2)
The total amount of the sale.
date
string (ISO 8601)
Transaction date.
clearing_date
string (ISO 8601) | null
Clearing date.
currency
string (3 characters)
Transaction currency code. ISO 4217 format, all uppercase.
description
string
A short description of the sale.
customer
JSON Object
Basic customer information.
Rozwiń

Struktura customer

name
string
Customer name.
email
string
Customer e-mail address.
card
JSON Object
A structure containing basic card information; present only if the checked sale was performed with the cards/sale method.
Rozwiń

Struktura card

name
string
Cardholder name.
number
string
Masked card number; first four and last four digits of the card number.
expiration_month
integer
Card expiration month. 1 to 12
expiration_year
integer
Card expiration year.
account
JSON Object
A structure containing basic account information; present only if the checked sale was performed with the directdebits/sale.
Rozwiń

Struktura account

name
string
Account owner name.
number
string
Masked account number; last four digits of the account number.
reversals
JSON Object
Reversals list set if is_reversal is true
Rozwiń

Struktura reversals

id_reversal
unsigned long
Identificaiton number of reversal.
date
string (ISO 8601)
Date of reversal.
code
string
Code of reversal.
description
string
Description of reversal.
refunds
JSON Object
Refunds list set if is_refund is true
Rozwiń

Struktura refunds

id_refund
unsigned long
Identificaiton number of refund.
date
string (ISO 8601)
Date of refund.
amount
decimal (12,2)
Refund amount.
description
string
Description of refund.
chargebacks
JSON Object
Chargebacks list set if is_chargeback is true
Rozwiń

Struktura chargebacks

id_chargeback
unsigned long
Identificaiton number of chargeback.
date
string (ISO 8601)
Date of chargeback.
amount
decimal (12,2)
Chargeback amount.
code
string
Code of chargeback.
description
string
Description of chargeback.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

error_number
unsigned integer
PayLane error number.
error_description
string (max 128 chars)
PayLane’s description of the occurred error.
id_account
unsigned long
Identification number of Merchant Account where the transaction took place.
is_disposed
boolean
If true, transaction cannot be used as a reference.
Sample Response
Success/Success/Error
    "success"       :   true,
    "id_sale"       :   2345,
    "status"        :   "PERFORMED",
    "date"          :   "2018-01-15T10:00:12+00:00",
    "clearing_date" :   "2018-01-15T10:00:12+00:00",
    "refunds"       :   {
        {
            "id_refund"   : 1,
            "date"        : "2014-01-01",
            "amount"      : 1.00,
            "description" : "My first refund"
        },
        {
            "id_refund"   : 2,
            "date"        : "2014-01-02",
            "amount"      : 7.69,
            "description" : "My second refund"
        }
    },
    "is_chargeback" :   false,
    "is_reversal"   :   false,
    "amount"        :   100.00,
    "currency"      :   "EUR",
    "description"   :   "A brilliant product, #52704",
    "customer"      :   {
                        "name"  :   "John Doe",
                        "email" :   "john@doe.com"
    }
    "card"          :   {
                        "name"   :   "John Doe",
                        "number" :   "4100...0001"
    },
    "id_account"    :    14,
    "is_disposed"   :   false
}
{
    "success"       :   true,
    "id_sale"       :   3456,
    "status"        :   "PENDING",
    "is_refund"     :   false,
    "is_chargeback" :   false,
    "is_reversal"   :   false,
    "amount"        :   19.99,
    "currency"      :   "EUR",
    "description"   :   "A brilliant product, #52506",
    "customer"      :   {
                        "name"  :   "Hans Muller",
                        "email" :   "hans@muller.de"
    }
    "account"       :   {
                        "name"   :   "Hans Muller",
                        "number" :   "...3000"
    },
    "id_account"    :   14
}
{
    "success"    :   false,
    "error"      :   {
                    "error_number"      :   491,
                    "error_description" :   "Sale ID list is not set or empty."
    },
    "id_account" :   14
}

POST sales / status

Metoda sale/status umożliwia pobranie statusu pojedynczej transakcji w momencie, gdy nie jest znany jej numer ID. Jeśli numer ID jest znany, należy użyć metody sales/info.

Struktura zapytania

Pole
Format
Wymagane
Opis
amount
decimal (12,2)
tak
Amount of the performed sale.
currency
string (3 characters)
tak
Currency code of the performed sale. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A description of the performed sale.
API Endpoint: POST https://direct.paylane.com/rest/sales/status
Sample Request
JSON
{
    "amount"        :   45.00,
    "currency"      :   "EUR",
    "description"   :   "A great product"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
id_sale
unsigned long
Identification number of the sale.
status
string (UTF-8 encoded)
Sale status: NOT_FOUND – sale ID was not found for this merchant account; PENDING – sale is waiting to be performed (in progress or not completed); PERFORMED – sale has been successfully performed; CLEARED – sale has been cleared (confirmation from a bank was received), ERROR – an error occurred while performing the sale.
id_error
unsigned long
Optional: identification number of the sale error.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
Sample Response
Success/Error
{
    "success"   :   true,
    "id_sale"   :   3627547,
    "status"    :   "PENDING"
    ]
}
{
    "success"   :   false,
    "error"     :   {
                    "error_number"      :   123,
                    "error_description" :   "Example error."
    }
}

POST resales / sale

Metoda resales/sale umożliwia przeprowadzenie transakcji na podstawie wcześniej wykonanej płatności. Dzięki takiemu odniesieniu metoda nie wymaga podawania kompletnych danych (np. karty) i pozwala na szybsze dokonanie płatności.

Struktura zapytania

Pole
Format
Wymagane
Opis
id_sale
unsigned long
tak
Identification number of a sale.
amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
API Endpoint: POST https://direct.paylane.com/rest/resales/sale
Sample Request
JSON
{
    "id_sale"       :   436635,
    "amount"        :   4.99,
    "currency"      :   "EUR",
    "description"   :   "Great Magazine subscription"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
id_sale
unsigned long
Identification number of the performed sale.
fraud_score
decimal
Fraud score of the transaction. Decimal values from 0 to 100. The lower, the better. This parameter is optional and is returned only for card transactions that use fraud score protection.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
id_account
unsigned long
Identification number of Merchant Account where the transaction took place.
Sample Response
Success/Error
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "id_account"    :   14
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   471,
                        "error_description"             :   "Sale ID is not valid.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    },
    "id_account"    :   14
}

POST resales / authorization

Metoda resales/authorization umożliwia przeprowadznie płatności na podstawie wcześniej dokonanej autoryzacji. Dzięki takiemu odniesieniu metoda nie wymaga podawania kompletnych danych (np. karty) i pozwala na szybsze dokonanie płatności.

Struktura zapytania

Pole
Format
Wymagane
Opis
id_authorization
unsigned long
tak
Identification number of the authorization.
amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
nie
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
API Endpoint: POST https://direct.paylane.com/rest/resales/authorization
Sample Request
JSON
{
    "id_authorization"  :   436635,
    "amount"            :   4.99,
    "currency"          :   "EUR",
    "description"       :   "Great Magazine subscription"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
id_sale
unsigned long
Identification number of the performed sale.
fraud_score
decimal
Fraud score of the transaction. Decimal values from 0 to 100. The lower, the better. This parameter is optional and is returned only for card transactions that use fraud score protection.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
id_account
unsigned long
Identification number of Merchant Account where the transaction took place.
Sample Response
Success/Error
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "id_account"    :   14
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   471,
                        "error_description"             :   "Sale ID is not valid.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    },
    "id_account"    :   14
}

POST 3DSecure / checkCard

Metoda 3DSecure/checkCard sprawdza, czy karta uczestniczy w programie 3-D Secure – to pierwszy krok podczas przeprowadzania płatności z użyciem tego zabezpieczenia.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
fraud_check_on
boolean
nie
Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level
integer (0…4)
nie
Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
nie
Customer name or company. Usually the same as in the name_on_card.
email
string (6-80 characters)
tak
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
tak
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
card
JSON Object
tak
A structure containing card information.
Rozwiń

Struktura card

card_number
string (13-19 digits)
tak
The full number of the card without any whitespaces. Only digits are allowed.
expiration_month
string (2 digits, 01…12)
tak
Expiration month. 01 to 12.
expiration_year
string (4 digits, 2008…2018)
tak
Expiration year as on the card.
name_on_card
string (2-50 characters, UTF-8 encoded)
tak
Cardholder name as written on the card.
card_code
string (3-4 digits)
tak
Depending on the type of the card this will be either CVV2 (Visa), CVC2 (MasterCard) or CID (American Express).
back_url
string (2-200 characters, UTF-8 encoded)
tak
Website address where a customer will be redirected after performing the payment.
API Endpoint: POST https://direct.paylane.com/rest/3DSecure/checkCard
Sample Request
JSON
{
    "sale"      :   {
                    "amount"            :   100.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704",
                    "fraud_check_on"    :   true,
                    "avs_check_level"   :   2
    },
    "customer"  :   {
                    "name"      :   "John Doe",
                    "email"     :   "john@doe.com",
                    "ip"        :   "123.456.78.90",
                    "address"   :   {
                                "street_house"  :   "1600 Pennsylvania Avenue Northwest",
                                "city"          :   "Washington",
                                "state"         :   "DC",
                                "zip"           :   "20500",
                                "country_code"  :   "US"
                    }
    },
    "card"      :   {
                    "card_number"       :   "4111111111111111",
                    "expiration_month"  :   "03",
                    "expiration_year"   :   "2017",
                    "name_on_card"      :   "John Doe",
                    "card_code"         :   "123"
    },
    "back_url"  :   "http://example-url.com"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
is_card_enrolled
boolean
True if a card is enrolled in the 3-D Secure program; otherwise false.
id_3dsecure_auth
unsigned long
Identification number of initiated 3-D Secure authentication. It is important to provide this ID when continuing the sale transaction even if card is not enrolled in 3-D Secure.
redirect_url
string (256 characters)
Website address where the customer will be redirected to perform a payment.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
Sample Response
Success/Error
{
    "success"           :   true,
    "id_3dsecure_auth"  :   1234567,
    "redirect_url"      :   "https://secure.paylane.com/payment/123"
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   704,
                        "error_description"             :   "3-D Secure authentication failed. Card declined.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    },
    "avs_result"    :   "D",
    "fraud_score"   :   65
}

POST 3DSecure / checkCardByToken

Metoda 3DSecure/checkCardByToken sprawdza, czy karta uczestniczy w programie 3-D Secure – to pierwszy krok podczas przeprowadzania płatności z użyciem tego zabezpieczenia.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
fraud_check_on
boolean
nie
Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level
integer (0…4)
nie
Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
nie
Customer name or company. Usually the same as in the name_on_card.
email
string (6-80 characters)
tak
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
tak
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
card
JSON Object
tak
A structure containing card information.
Rozwiń

Struktura card

token
string (64 chars)
tak
A unique string that identifies a specific card. It’s generated by PayLane when making a payment and remains active for 15 minutes.
back_url
string (2-200 characters, UTF-8 encoded)
tak
Website address where a customer will be redirected after performing the payment.
API Endpoint: POST https://direct.paylane.com/rest/3DSecure/checkCardByToken
Sample Request
JSON
{
    "sale"      :   {
                    "amount"            :   100.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704",
                    "fraud_check_on"    :   true,
                    "avs_check_level"   :   2
    },
    "customer"  :   {
                    "name"      :   "John Doe",
                    "email"     :   "john@doe.com",
                    "ip"        :   "123.456.78.90",
                    "address"   :   {
                                "street_house"  :   "1600 Pennsylvania Avenue Northwest",
                                "city"          :   "Washington",
                                "state"         :   "DC",
                                "zip"           :   "20500",
                                "country_code"  :   "US"
                    }
    },
    "card"      :   {
                    "token" : "12a34b45c67d89e00f1aa2bb3cc4dd5ee6ff12a34b45c67d89e00f1aa2bb3cc4"
    },
    "back_url"  :   "http://example-url.com"
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
is_card_enrolled
boolean
True if a card is enrolled in the 3-D Secure program; otherwise false.
id_3dsecure_auth
unsigned long
Identification number of initiated 3-D Secure authentication. It is important to provide this ID when continuing the sale transaction even if card is not enrolled in 3-D Secure.
redirect_url
string (256 characters)
Website address where the customer will be redirected to perform a payment.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
Sample Response
Success/Error
{
    "success"           :   true,
    "id_3dsecure_auth"  :   1234567,
    "redirect_url"      :   "https://secure.paylane.com/payment/123"
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   704,
                        "error_description"             :   "3-D Secure authentication failed. Card declined.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    },
    "avs_result"    :   "D",
    "fraud_score"   :   65
}

POST 3DSecure / authSale

Metoda 3DSecure/authSale umożliwia przeprowadzenie płatności kartą na podstawie wcześniej przeprowadzonej autoryzacji 3-D Secure.

Struktura zapytania

Pole
Format
Wymagane
Opis
id_3dsecure_auth
unsigned long
tak
Identification number of initiated 3-D Secure authentication.
API Endpoint: POST https://direct.paylane.com/rest/3DSecure/authSale
Sample Request
JSON
{
    "id_3dsecure_auth"  :   237473
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True or false, depending on whether the authorization closing was successful.
id_sale
unsigned long
Identification number of the performed sale.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer).
fraud_score
decimal
Fraud score of the transaction. Decimal values from 0 to 100. The lower, the better.
avs_result
string
AVS (Address Verification System) result code.
id_account
unsigned long
Identification number of Merchant Account where the transaction took place.
Sample Response
Success/Error
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "avs_result"    :   "M",
    "fraud_score"   :   10,
    "id_account"    :   14
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   415,
                        "error_description"             :   "Card has expired.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    },
    "avs_result"    :   "D",
    "fraud_score"   :   65,
    "id_account"    :   14
}

POST ideal / sale

Metoda ideal/sale wykonuje transakcję iDEAL.

Struktura zapytania

Pole
Format
Wymagane
Opis
sale
JSON Object
tak
A structure containing sale information.
Rozwiń

Struktura sale

amount
decimal (12,2)
tak
The total amount of the sale. Use dot (.) as decimal separator.
currency
string (3 characters)
tak
Transaction currency code. ISO 4217 format, all uppercase.
description
string (2-200 characters, UTF-8 encoded)
tak
A short description of the sale; this will be shown in the Merchant Panel as the sale details. It is strongly recommended to put unique identification information here.
customer
JSON Object
tak
A structure containing customer data.
Rozwiń

Struktura customer

name
string (2-50 characters, UTF-8 encoded)
nie
Customer name or company.
email
string (6-80 characters)
tak
Valid email address.
ip
string (max. 15 characters, only digits and dots are allowed)
tak
The IP address of the customer who performs a transaction. This should be always a routable IP number, not a private IP number. If you supply a private IP number it is likely that the sale will be declined by the anti fraud system.
address
JSON Object
tak
A structure containing customer address.
Rozwiń

Struktura address

street_house
string (2-46 characters, UTF-8 encoded)
tak
Street name and house number (along with the apartment number if applicable).
city
string (2-40 characters, UTF-8 encoded)
tak
City name.
state
string (2-40 characters, UTF-8 encoded)
nie
State or province if applicable. It is not required but is recommended to maintain full address information.
zip
string (1-9 characters, UTF-8 encoded)
tak
Zip or postal code. If not applicable please enter n/a.
country_code
string (2 characters)
tak
Country code (ISO 3166 standard).
back_url
string (10-255 characters, UTF-8 encoded)
tak
Website address where a customer will be redirected after performing the payment.
bank_code
string (8-11 characters)
nie
Bank BIC code.
API Endpoint: POST https://direct.paylane.com/rest/ideal/sale
Sample Request
JSON
{
    "sale"      :   {
                    "amount"            :   100.00,
                    "currency"          :   "EUR",
                    "description"       :   "A brilliant product, #52704"
    },
    "customer"  :   {
                    "name"      :   "Hans Muller",
                    "email"     :   "hans@muller.de",
                    "ip"        :   "123.456.78.90",
                    "address"   :   {
                                "street_house"  :   "Platz der Republik 1",
                                "city"          :   "Berlin",
                                "state"         :   "Berlin",
                                "zip"           :   "11011",
                                "country_code"  :   "DE"
                    }
    },
    "back_url"  :   "http://merchants-website.com",
    "bank_code" :   "INGBNL2A"
    }
}

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
id_sale
unsigned long
Identification number of the sale.
redirect_url
string (UTF-8 encoded)
Website address where the customer will be redirected to perform a payment.
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

id_error
unsigned long
Optional: identification number of the attempt to make a sale.
error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
processor_error_number
string
Error number from the processor (acquirer).
processor_error_description
string
Short description of the error from the processor (acquirer)
Sample Response
Success/Error
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "redirect_url"  :   "https://secure.paylane.com/payment/123"
}
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}

GET ideal / bankcodes

Metoda ideal/bankcodes zwraca informacje o wszystkich dostępnych bankach.
API Endpoint: GET https://direct.paylane.com/rest/ideal/bankcodes

Struktura odpowiedzi

Pole
Format
Opis
success
boolean
True if the payment was performed successfully, otherwise – false.
data
array
Bank code objects.
Rozwiń

Struktura data

bank_code
string 8-11 characters
Bank BIC code.
bank_name
string
Bank name.
country
string
Country of bank’s operation (currently only Nederland)
error
JSON Object
A structure that contains error information; present only if an error occurs.
Rozwiń

Struktura error

error_number
unsigned integer
Error number. Always three digits.
error_description
string (max. 128 characters)
Short description of the error.
Sample Response
Success/Error
{
    "success" : true,
    "data"    : [
        {
            "bank_code" : "ABNANL2A",
            "bank_name" : "ABN AMRO",
            "country"   : "Nederland"
        },
        {
            "bank_code" : "INGBNL2A",
            "bank_name" : "ING",
            "country"   : "Nederland"
        }
    ]
}
{
    "success" : false,
    "error"   : {
        "error_number"      : 502,
        "error_description" : "Payment gateway error. Please try again later." 
    }
}

Przykłady cURL

cURL jest jednym z bardziej podstawowych narzędzi umożliwiających wysyłanie zapytań do API.

Sposób użycia jest bardzo prosty, wystarczy wywołać komendę w linii poleceń z odpowiednimi parametrami (dane dostępowe oraz dot. zapytania).

Poniżej przedstawiamy prosty przykład, realizuje on testową płatność kartą z użyciem metody cards/sale.

Użyjemy danych do transakcji z przykładów na naszej stronie.

Możesz skopiować poniższy kod, ale pamiętaj, by wstawić swoją nazwę użytkownika i hasło.

curl --request POST 'https://your_login:your_password@direct.paylane.com/rest/cards/sale' \--data '{"sale": {"amount":19.99, "currency":"EUR", "description":"Product #1"}, "customer":{"name":"John Doe", "email":"john@doe.com", "ip":"127.0.0.1", "address":{"street_house":"1600 Pennsylvania Avenue Northwest", "city":"Washington", "state":"DC", "zip":"500", "country_code":"US"}}, "card":{"card_number":"4200000000000000", "expiration_month":"03", "expiration_year":"2017", "name_on_card":"John Doe", "card_code":"123"}}'

Do powyższego zapytania możesz także dodać inne, opcjonalne parametry, np. --i lub --header 'Content-type:application/json'.

Odpowiedź powinna wyglądać podobnie do tej:

{
"success":true,
"id_sale":1234567
}

Spróbujmy teraz pobrać informacje o transakcji, którą właśnie wykonaliśmy.

Wywołajmy zatem metodę sales/info, podając numer ID naszej transakcji:

curl --request GET 'https://your_login:your_password@direct.paylane.com/rest/sales/info' \--data '{"id_sale":1234567}'

Powinniśmy zobaczyć teraz odpowiedź podobną do poniższej:

{
 "success":true, 
 "id_sale":1234567, 
 "status":"PERFORMED", 
 "is_refund":false, 
 "is_chargeback":false, 
 "is_reversal":false, 
 "amount":"19.99", 
 "currency":"EUR", 
 "description":"Product #1", 
 "customer":{
             "name":"John Doe", 
             "email":"john@doe.com"
            }, "card":{
                       "name":"John Doe", 
                       "number":"4200...0000"
            }
}

Wystarczy zatem określić metodę HTTP (np. GET lub POST), podać dane do API PayLane oraz dane samego żadania, by z powodzeniem komunikować się z API używając cURL.