Opis funkcji API

POST cards/sale

Resource URL: POST https://direct.paylane.com/rest/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 Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
card JSON Object Yes A structure containing card information.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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 No Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level integer (0…4) No Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
Struktura customer
Pole Format Wymagane Opis
name string (2-50 characters, UTF-8 encoded) No Customer name or company. Usually the same as in the name_on_card.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 No A structure containing customer address.
Struktura address
Pole Format Wymagane Opis
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
Struktura card
Pole Format Wymagane Opis
card_number string (13-19 digits) Yes The full number of the card without any whitespaces. Only digits are allowed.
expiration_month string (2 digits, 01…12) Yes Expiration month. 01 to 12.
expiration_year string (4 digits, 2008…2018) Yes Expiration year as on the card.
name_on_card string (2-50 characters, UTF-8 encoded) Yes Cardholder name as written on the card.
card_code string (3-4 digits) Yes for ecommerce,
No for MOTO
Depending on the type of the card this will be either CVV2 (Visa), CVC2 (MasterCard) or CID (American Express).

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
    "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 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.
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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
6
7
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "avs_result"    :   "M",
    "fraud_score"   :   10,
    "id_account"    :   14
}
1
2
3
4
5
6
7
8
9
10
11
12
13
{
    "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
}
^ do góry

POST cards/saleByToken

Resource URL: POST https://direct.paylane.com/rest/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 Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
card JSON Object Yes A structure containing card information.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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 No Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level integer (0…4) No Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
Struktura customer
Pole Format Wymagane Opis
name string (2-50 characters, UTF-8 encoded) No Customer name or company. Usually the same as in the name_on_card.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 No A structure containing customer address.
Struktura address
Pole Format Wymagane Opis
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
Struktura card
Pole Format Wymagane Opis
token string (64 chars) Yes A unique string that identifies a specific card. It’s generated by PayLane when making a payment and remains active for 15 minutes.

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    "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.
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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
6
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "avs_result"    :   "M",
    "fraud_score"   :   10
}
1
2
3
4
5
6
7
8
9
10
11
12
{
    "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
}
^ do góry

POST cards/authorization

Resource URL: POST https://direct.paylane.com/rest/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 Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
card JSON Object Yes A structure containing card information.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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 No Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level integer (0…4) No Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
Struktura customer
Pole Format Wymagane Opis
name string (2-50 characters, UTF-8 encoded) No Customer name or company. Usually the same as in the name_on_card.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 No A structure containing customer address.
Struktura address
Pole Format Wymagane Opis
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
Struktura card
Pole Format Wymagane Opis
card_number string (13-19 digits) Yes The full number of the card without any whitespaces. Only digits are allowed.
expiration_month string (2 digits, 01…12) Yes Expiration month. 01 to 12.
expiration_year string (4 digits, 2008…2018) Yes Expiration year as on the card.
name_on_card string (2-50 characters, UTF-8 encoded) Yes Cardholder name as written on the card.
card_code string (3-4 digits) Yes for ecommerce,
No for MOTO
Depending on the type of the card this will be either CVV2 (Visa), CVC2 (MasterCard) or CID (American Express).

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
    "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.
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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
6
7
{
    "success"           :   true,
    "id_authorization"  :   1234567,
    "avs_result"        :   "M",
    "fraud_score"       :   10,
    "id_account"        :   14
}
1
2
3
4
5
6
7
8
9
10
11
12
13
{
    "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
}
^ do góry

POST cards/authorizationByToken

Resource URL: POST https://direct.paylane.com/rest/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 Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
card JSON Object Yes A structure containing card information.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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 No Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level integer (0…4) No Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
Struktura customer
Pole Format Wymagane Opis
name string (2-50 characters, UTF-8 encoded) No Customer name or company. Usually the same as in the name_on_card.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 No A structure containing customer address.
Struktura address
Pole Format Wymagane Opis
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
Struktura card
Pole Format Wymagane Opis
token string (64 chars) Yes A unique string that identifies a specific card. It’s generated by PayLane when making a payment and remains active for 15 minutes.

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    "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.
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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
6
{
    "success"           :   true,
    "id_authorization"  :   1234567,
    "avs_result"        :   "M",
    "fraud_score"       :   10
}
1
2
3
4
5
6
7
8
9
10
11
12
{
    "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
}
^ do góry

POST cards/generateToken

Resource URL: POST https://direct.paylane.com/rest.js/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
card_number string (13-19 digits) Yes The full number of the card without any whitespaces. Only digits are allowed.
expiration_month string (2 digits, 01…12) Yes Expiration month. 01 to 12.
expiration_year string (4 digits, 2008…2018) Yes Expiration year as on the card.
name_on_card string (2-50 characters, UTF-8 encoded) Yes Cardholder name as written on the card.
card_code string (3-4 digits) Yes for ecommerce,
No for MOTO
Depending on the type of the card this will be either CVV2 (Visa), CVC2 (MasterCard) or CID (American Express).

Przykład zapytania

1
2
3
4
5
6
7
{
    "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.
Struktura error
Pole Format Opis
error_number unsigned integer Error number. Always three digits.
error_description string (max. 128 characters) Short description of the error.

Przykłady odpowiedzi

1
2
3
4
{
    "success"       :   true,
    "token"         :   "12a34b45c67d89e00f1aa2bb3cc4dd5ee6ff12a34b45c67d89e00f1aa2bb3cc4"
}
1
2
3
4
5
6
7
{
    "success"       :   false,
    "error"         :   {
                        "error_number"      :   415,
                        "error_description" :   "Card has expired."
    }
}
^ do góry

POST cards/check

Resource URL: POST https://direct.paylane.com/rest/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) Yes The full number of the card without any whitespaces. Only digits are allowed.

Przykład zapytania

1
2
3
{
    "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 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.
Struktura error
Pole Format Opis
error_number unsigned integer Error number. Always three digits.
error_description string (max. 128 characters) Short description of the error.

Przykłady odpowiedzi

1
2
3
4
{
    "success"   :   true,
    "card_type" :   "VISA"
}
1
2
3
4
5
6
7
{
    "success" :   false,
    "error"   :   {
        "error_number"      : "411",
        "error_description" : "Card number format is not valid."
    }
}
^ do góry

POST cards/checkByToken

Resource URL: POST https://direct.paylane.com/rest/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) Yes A unique string that identifies a specific card. It’s generated by PayLane when making a payment and remains active for 15 minutes.

Przykład zapytania

1
2
3
{
    "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 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.
Struktura error
Pole Format Opis
error_number unsigned integer Error number. Always three digits.
error_description string (max. 128 characters) Short description of the error.

Przykłady odpowiedzi

1
2
3
4
{
    "success"   :   true,
    "card_type" :   "VISA"
}
1
2
3
4
5
6
7
{
    "success" :   false,
    "error"   :   {
        "error_number"      : "411",
        "error_description" : "Card number format is not valid."
    }
}
^ do góry

POST paypal/sale

Resource URL: POST https://direct.paylane.com/rest/paypal/sale

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

Struktura zapytania

Pole Format Wymagane Opis
sale JSON Object Yes A structure containing sale information.
back_url string (10-255 characters, UTF-8 encoded) Yes Website address where a customer will be redirected after performing the payment.
recurring JSON Object No A structure containing recurring profile information.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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.
Struktura recurring
Field Format Required Description
amount decimal (12,2) Yes Amount of single recurring payment.
start_date string (format: YYYY-mm-dd) Yes Date of the first recurring payment.
period string (accepted values: day, week, month) Yes Recurring payments period.

Przykład zapytania

1
2
3
4
5
6
7
8
{
    "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.
redirect_url string (UTF-8 encoded) Website address where the customer will be redirected to perform a payment.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "redirect_url"  :   "https://secure.paylane.com/payment/123"
}
1
2
3
4
5
6
7
8
9
10
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}
^ do góry

POST paypal/authorization

Resource URL: POST https://direct.paylane.com/rest/paypal/authorization

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

Struktura zapytania

Pole Format Wymagane Opis
sale JSON Object Yes A structure containing sale information.
back_url string (10-255 characters, UTF-8 encoded) Yes Website address where a customer will be redirected after performing the payment.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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.

Przykład zapytania

1
2
3
4
5
6
7
8
{
    "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.
redirect_url string (UTF-8 encoded) Website address where the customer will be redirected to perform a payment.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
{
    "success"           :   true,
    "id_authorization"  :   1234567,
    "redirect_url"      :   "https://secure.paylane.com/payment/123"
}
1
2
3
4
5
6
7
8
9
10
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}
^ do góry

POST paypal/stopRecurring

Resource URL: POST https://direct.paylane.com/rest/paypal/stoprecurring

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

Struktura zapytania

Field Format Required Description
id_paypal_recurring unsigned long Yes Identification number of recurring profile.

Struktura odpowiedzi

Field Format Description
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.

Przykłady odpowiedzi

1
2
3
4
{
    "success"             : true,
    "id_paypal_recurring" : 1,
}
1
2
3
4
5
6
7
{
    "success"               :   false,
    "error"                 :   {
      "error_number"      : 805
      "error_description" : "id_paypal_recurring not found"
    }
}
^ do góry

POST banktransfers/sale

Resource URL: POST https://direct.paylane.com/rest/banktransfers/sale

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

Struktura zapytania

Pole Format Wymagane Opis
sale JSON Object Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
back_url string (10-255 characters, UTF-8 encoded) Yes Website address where a customer will be redirected after performing the payment.
payment_type string (2-3 characters) Yes Bank code:
  • AB – Alior Bank,
  • AS – T-Mobile Usługi Bankowe,
  • MT – mBank (mTransfer),
  • IN – Inteligo,
  • IP – iPKO,
  • DB – Deutsche Bank,
  • MI – Millennium,
  • CA – Credit Agricole,
  • PP – Poczta Polska (postal money order),
  • PCZ – Bank Pocztowy,
  • BP – Bank BPH,
  • IB – Idea Bank,
  • PO – Pekao S.A.,
  • GB – Getin Bank,
  • IG – ING Bank Śląski,
  • WB – Bank Zachodni WBK,
  • BG – Bank BGŻ BNP PARIBAS (BGŻ),
  • PB – Bank BGŻ BNP PARIBAS (BNP),
  • OH – other.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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.
Struktura customer
Pole Format Wymagane Opis
name string (2-50 characters, UTF-8 encoded) No Customer name or company.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 Yes A structure containing customer address.
Struktura address
Pole Format Wymagane Opis
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
    "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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "redirect_url"  :   "https://secure.paylane.com/payment/123"
}
1
2
3
4
5
6
7
8
9
10
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}
^ do góry

POST directdebits/sale

Resource URL: POST https://direct.paylane.com/rest/directdebits/sale

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

Struktura zapytania

Pole Format Wymagane Opis
sale JSON Object Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
account JSON Object Yes A structure containing account data.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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.
Struktura customer
Pole Format Wymagane Opis
name string (2-50 characters, UTF-8 encoded) No Customer name or company.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 Yes A structure containing customer address.
Struktura address
Pole Format Wymagane Opis
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
Struktura account
Pole Format Wymagane Opis
iban string (16-31 characters, UTF-8 encoded) Yes Account IBAN number.
bic string (8-11 characters, UTF-8 encoded) Yes Bank Identifier Code (SWIFT/BIC/BLZ).
account_holder string (2-30 characters, UTF-8 encoded) Yes Account holder name.
account_country string (2 characters) Yes Bank account country code (ISO 3166 standard): e.g. AT/DE/NL.
mandate_id string (1-35 characters) Yes 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 »).

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
    "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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
{
    "success"       :   true,
    "id_sale"       :   1234567
}
1
2
3
4
5
6
7
8
9
10
{
    "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."
    }
}
^ do góry

POST sofort/sale

Resource URL: POST https://direct.paylane.com/rest/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 Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
back_url string (10-255 characters, UTF-8 encoded) Yes Website address where a customer will be redirected after performing the payment.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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.
Struktura customer
Pole Format Wymagane Opis
name string (2-50 characters, UTF-8 encoded) No Customer name or company.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 Yes A structure containing customer address.
Struktura address
Pole Format Wymagane Opis
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
    "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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "redirect_url"  :   "https://secure.paylane.com/payment/123"
}
1
2
3
4
5
6
7
8
9
10
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}
^ do góry

POST refunds

Resource URL: POST https://direct.paylane.com/rest/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 Yes Identification number of the sale that should be refunded.
amount decimal (12,2) Yes 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) Yes 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.

Przykład zapytania

1
2
3
4
5
{
    "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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
{
    "success"   :   true,
    "id_refund" :   1234567
}
1
2
3
4
5
6
7
8
9
10
{
    "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."
    }
}
^ do góry

POST authorizations/capture

Resource URL: POST https://direct.paylane.com/rest/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 Yes Identification number of the authorization.
amount decimal (12,2) Yes 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) No A short sale description.

Przykład zapytania

1
2
3
4
5
{
    "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.
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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
6
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "fraud_score"   :   10,
    "id_account"    :   14
}
1
2
3
4
5
6
7
8
9
10
11
12
{
    "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
}
^ do góry

POST authorizations/close

Resource URL: POST https://direct.paylane.com/rest/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 Yes Identification number of the authorization.

Przykład zapytania

1
2
3
{
    "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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
{
    "success"   :   true
}
1
2
3
4
5
6
7
8
9
10
{
    "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."
    }
}
^ do góry

POST authorizations/info

Resource URL: POST https://direct.paylane.com/rest/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 Yes Identification number of the authorization.

Przykład zapytania

1
2
3
{
    "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.
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.
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.
customer JSON Object Basic customer information.
card JSON Object A structure containing basic card information.
error JSON Object A structure that contains error information; present only if an error occurs.
Struktura error
Pole Format Opis
error_number unsigned integer
(always 3 digits)
PayLane error number.
error_description string
(max 128 chars)
PayLane’s description of the occurred error.
Struktura customer
Pole Format Opis
name string Customer name.
email string Customer e-mail address.
Struktura card
Pole Format Opis
name string Cardholder name.
number string Masked card number; first four and last four digits of the card number.

Przykłady odpowiedzi

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
    "success"          : true,
    "id_authorization" : 1234,
    "status"           : "CAPTURED",
    "amount"           : 100.00,
    "currency_code"    : "EUR",
    "description"      : "A brilliant product, #52704",
    "customer"         : {
                        "name"  :   "John Doe",
                        "email" :   "john@doe.com"
    }
    "card"             :   {
                        "name"   :   "John Doe",
                        "number" :   "4100...0001"
    },
}
1
2
3
4
5
6
7
8
{
    "success"          : true,
    "id_authorization" : 999999999,
    "status"           : "NOT_FOUND",
    "description"      : "",
    "amount"           : "",
    "currency_code"    : ""
}
1
2
3
4
5
6
7
{
    "success"   :   false,
    "error"     :   {
                "error_number"       :  441,
                "error_description"  :  "Sale Authorization ID is not valid."
    }
}
^ do góry

POST sales/info

Resource URL: POST https://direct.paylane.com/rest/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 Yes Identification number of a sale.

Przykład zapytania

1
2
3
{
    "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 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.
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.
card JSON Object A structure containing basic card information; present only if the checked sale was performed with the cards/sale method.
account JSON Object A structure containing basic account information; present only if the checked sale was performed with the directdebits/sale.
reversals JSON Object Reversals list set if is_reversal is true
refunds JSON Object Refunds list set if is_refund is true
chargebacks JSON Object Chargebacks list set if is_chargeback is true
error JSON Object A structure that contains error information; present only if an error occurs.
id_account unsigned long Identification number of Merchant Account where the transaction took place.
Struktura customer
Pole Format Opis
name string Customer name.
email string Customer e-mail address.
Struktura card
Pole Format Opis
name string Cardholder name.
number string Masked card number; first four and last four digits of the card number.
Struktura account
Pole Format Opis
name string Account owner name.
number string Masked account number; last four digits of the account number.
Struktura reversals
Field Format Description
id_reversal unsigned long Identificaiton number of reversal.
date string (YYYY-mm-dd) Date of reversal.
code string Code of reversal.
description string Description of reversal.
Struktura refunds
Field Format Description
id_refund unsigned long Identificaiton number of refund.
date string (YYYY-mm-dd) Date of refund.
amount decimal (12,2) Refund amount.
description string Description of refund.
Struktura chargebacks
Field Format Description
id_chargeback unsigned long Identificaiton number of chargeback.
date string (YYYY-mm-dd) Date of chargeback.
amount decimal (12,2) Chargeback amount.
code string Code of chargeback.
description string Description of chargeback.
Struktura error
Pole Format Opis
error_number unsigned integer PayLane error number.
error_description string
(max 128 chars)
PayLane’s description of the occurred error.

Przykłady odpowiedzi

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
    "success"       :   true,
    "id_sale"       :   2345,
    "status"        :   "PERFORMED",
    "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
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
    "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
}
1
2
3
4
5
6
7
8
{
    "success"    :   false,
    "error"      :   {
                    "error_number"      :   491,
                    "error_description" :   "Sale ID list is not set or empty."
    },
    "id_account" :   14
}
^ do góry

POST sales/status

Resource URL: POST https://direct.paylane.com/rest/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) Yes Amount of the performed sale.
currency string (3 characters) Yes Currency code of the performed sale. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes A description of the performed sale.

Przykład zapytania

1
2
3
4
5
{
    "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 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.
Struktura error
Pole Format Opis
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.

Przykłady odpowiedzi

1
2
3
4
5
6
{
    "success"   :   true,
    "id_sale"   :   3627547,
    "status"    :   "PENDING"
    ]
}
1
2
3
4
5
6
7
{
    "success"   :   false,
    "error"     :   {
                    "error_number"      :   123,
                    "error_description" :   "Example error."
    }
}
^ do góry

POST resales/sale

Resource URL: POST https://direct.paylane.com/rest/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 Yes Identification number of a sale.
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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.

Przykład zapytania

1
2
3
4
5
6
{
    "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.
id_account unsigned long Identification number of Merchant Account where the transaction took place.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "id_account"    :   14
}
1
2
3
4
5
6
7
8
9
10
11
{
    "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
}
^ do góry

POST resales/authorization

Resource URL: POST https://direct.paylane.com/rest/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 Yes Identification number of the authorization.
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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.

Przykład zapytania

1
2
3
4
5
6
{
    "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.
id_account unsigned long Identification number of Merchant Account where the transaction took place.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "id_account"    :   14
}
1
2
3
4
5
6
7
8
9
10
11
{
    "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
}
^ do góry

POST 3DSecure/checkCard

Resource URL: POST https://direct.paylane.com/rest/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 Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
card JSON Object Yes A structure containing card information.
back_url string Yes Website address where a customer will be redirected after performing the payment.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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 No Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level integer (0…4) No Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
Struktura customer
Pole Format Wymagane Opis
name string (2-50 characters, UTF-8 encoded) No Customer name or company. Usually the same as in the name_on_card.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 Yes A structure containing customer address.
Struktura address
Pole Format Wymagane Opis
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
Struktura card
Pole Format Wymagane Opis
card_number string (13-19 digits) Yes The full number of the card without any whitespaces. Only digits are allowed.
expiration_month string (2 digits, 01…12) Yes Expiration month. 01 to 12.
expiration_year string (4 digits, 2008…2018) Yes Expiration year as on the card.
name_on_card string (2-50 characters, UTF-8 encoded) Yes Cardholder name as written on the card.
card_code string (3-4 digits) Yes for ecommerce,
No for MOTO
Depending on the type of the card this will be either CVV2 (Visa), CVC2 (MasterCard) or CID (American Express).

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
    "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_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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
{
    "success"           :   true,
    "id_3dsecure_auth"  :   1234567,
    "redirect_url"      :   "https://secure.paylane.com/payment/123"
}
1
2
3
4
5
6
7
8
9
10
11
12
{
    "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
}
^ do góry

POST 3DSecure/checkCardByToken

Resource URL: POST https://direct.paylane.com/rest/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 Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
card JSON Object Yes A structure containing card information.
back_url string Yes Website address where a customer will be redirected after performing the payment.
Struktura sale
Pole Format Wymagane Opis
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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 No Overrides the default setting for a merchant account. If true, transaction data will be checked for fraud.
avs_check_level integer (0…4) No Overrides the default AVS level setting. Values from 0 (disabled) to 4 (all required) may be set.
Struktura customer
Pole Format Wymagane Opis
name string (2-50 characters, UTF-8 encoded) No Customer name or company. Usually the same as in the name_on_card.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 Yes A structure containing customer address.
Struktura address
Pole Format Wymagane Opis
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
Struktura card
Pole Format Wymagane Opis
token string (64 chars) Yes A unique string that identifies a specific card. It’s generated by PayLane when making a payment and remains active for 15 minutes.

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
    "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_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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
{
    "success"           :   true,
    "id_3dsecure_auth"  :   1234567,
    "redirect_url"      :   "https://secure.paylane.com/payment/123"
}
1
2
3
4
5
6
7
8
9
10
11
12
{
    "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
}
^ do góry

POST 3DSecure/authSale

Resource URL: POST https://direct.paylane.com/rest/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 Yes Identification number of initiated 3-D Secure authentication.

Przykład zapytania

1
2
3
{
    "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.
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.
Struktura error
Pole Format Opis
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).

Przykłady odpowiedzi

1
2
3
4
5
6
7
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "avs_result"    :   "M",
    "fraud_score"   :   10,
    "id_account"    :   14
}
1
2
3
4
5
6
7
8
9
10
11
12
13
{
    "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
}
^ do góry

POST ideal/sale

Resource URL: POST https://direct.paylane.com/rest/ideal/sale

Metoda ideal/sale wykonuje transakcję iDEAL.

Struktura zapytania

Field Format Required Description
sale JSON Object Yes A structure containing sale information.
customer JSON Object Yes A structure containing customer data.
back_url string (10-255 characters, UTF-8 encoded) Yes Website address where a customer will be redirected after performing the payment.
bank_code string (8-11 characters) Yes Bank BIC code.
Struktura sale
Field Format Required Description
amount decimal (12,2) Yes The total amount of the sale. Use dot (.) as decimal separator.
currency string (3 characters) Yes Transaction currency code. ISO 4217 format, all uppercase.
description string (2-200 characters, UTF-8 encoded) Yes 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.
Struktura customer
Field Format Required Description
name string (2-50 characters, UTF-8 encoded) No Customer name or company.
email string (6-80 characters) Yes Valid email address.
ip string (max. 15 characters, only digits and dots are allowed) Yes 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 Yes A structure containing customer address.
Struktura address
Field Format Required Description
street_house string (2-46 characters, UTF-8 encoded) Yes Street name and house number (along with the apartment number if applicable).
city string (2-40 characters, UTF-8 encoded) Yes City name.
state string (2-40 characters, UTF-8 encoded) No 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) Yes Zip or postal code. If not applicable please enter n/a.
country_code string (2 characters) Yes Country code (ISO 3166 standard).

Przykład zapytania

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
    "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

Field Format Description
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.
Struktura error
Field Format Description
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).

Przykłady odpowiedzi

1
2
3
4
5
{
    "success"       :   true,
    "id_sale"       :   1234567,
    "redirect_url"  :   "https://secure.paylane.com/payment/123"
}
1
2
3
4
5
6
7
8
9
10
{
    "success"       :   false,
    "error"         :   {
                        "id_error"                      :   1234567,
                        "error_number"                  :   321,
                        "error_description"             :   "Amount is too low.",
                        "processor_error_number"        :   "1234567",
                        "processor_error_description"   :   "Example description."
    }
}
^ do góry

GET ideal/bankcodes

Resource URL: GET https://direct.paylane.com/rest/ideal/bankcodes

Metoda ideal/bankcodes zwraca informacje o wszystkich dostępnych bankach.

Struktura odpowiedzi

Field Format Description
success boolean True if the payment was performed successfully, otherwise – false.
data array Bank code objects.
error JSON Object A structure that contains error information; present only if an error occurs.
Struktura elementu data
Field Format Description
bank_code string 8-11 characters Bank BIC code.
bank_name string Bank name.
country string Country of bank’s operation (currently only Nederland)
Struktura error
Field Format Description
error_number unsigned integer Error number. Always three digits.
error_description string (max. 128 characters) Short description of the error.

Przykłady odpowiedzi

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    "success" : true,
    "data"    : [
        {
            "bank_code" : "ABNANL2A",
            "bank_name" : "ABN AMRO",
            "country"   : "Nederland"
        },
        {
            "bank_code" : "INGBNL2A",
            "bank_name" : "ING",
            "country"   : "Nederland"
        }
    ]
}
1
2
3
4
5
6
7
{
    "success" : false,
    "error"   : {
        "error_number"      : 502,
        "error_description" : "Payment gateway error. Please try again later."
    }
}
^ do góry