API Function reference

POST cards/sale

Resource URL: POST https://direct.paylane.com/rest/cards/sale The cards/sale method allows to perform a single transaction using a card (credit, debit, pre-paid etc.). It includes additional security features, such as AVS or fraud check.

Request structure

Field Format Required Description
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.
sale structure
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.
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.
customer structure
Field Format Required Description
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.
address structure
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).
card structure
Field Format Required Description
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).

Request example

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"
    }
    }

Response structure

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

Response examples

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
    }
^ back to top

POST cards/saleByToken

Resource URL: POST https://direct.paylane.com/rest/cards/saleByToken The cards/saleByToken method allows to perform a single transaction with a card (credit, debit, pre-paid etc.). It includes additional security features, such as AVS or fraud check.

Request structure

Field Format Required Description
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.
sale structure
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.
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.
customer structure
Field Format Required Description
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.
address structure
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).
card structure
Field Format Required Description
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.

Request example

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"
    }
    }

Response structure

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

Response examples

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
    }
^ back to top

POST cards/authorization

Resource URL: POST https://direct.paylane.com/rest/cards/authorization The cards/authorization method allows to authorize a card (credit, debit, pre-paid etc.) – it does not perform a complete sale, but blocks a specified amount. A transaction may be captured later (which means completing a transaction and actually charging the blocked amount). Card authorization is commonly used for card verification.

Request structure

Field Format Required Description
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.
sale structure
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.
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.
customer structure
Field Format Required Description
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.
address structure
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).
card structure
Field Format Required Description
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).

Request example

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"
    }
    }

Response structure

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

Response examples

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
    }
^ back to top

POST cards/authorizationByToken

Resource URL: POST https://direct.paylane.com/rest/cards/authorizationByToken The cards/authorizationByToken method allows to authorize a card (credit, debit, pre-paid etc.) – it does not perform a complete sale, but blocks a specified amount. A transaction may be captured later (which means completing a transaction and actually charging the blocked amount). Card authorization is commonly used for card verification.

Request structure

Field Format Required Description
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.
sale structure
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.
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.
customer structure
Field Format Required Description
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.
address structure
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).
card structure
Field Format Required Description
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.

Request example

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"
    }
    }

Response structure

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

Response examples

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
    }
^ back to top

POST cards/generateToken

Resource URL: POST https://direct.paylane.com/rest.js/cards/generateToken The cards/generateToken method creates a temporary, unique token for a given set of credit card information. This token is stored for 15 minutes, after which it is discarded.

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 The cards/check method checks whether the card number is valid and determines the card’s brand.

Request structure

Field Format Required Description
card_number string (13-19 digits) Yes The full number of the card without any whitespaces. Only digits are allowed.

Request example

1
2
3
{
    "card_number" : "4200000000000000"
    }

Response structure

Field Format Description
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.
error structure
Field Format Description
error_number unsigned integer Error number. Always three digits.
error_description string (max. 128 characters) Short description of the error.

Response examples

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."
    }
    }
^ back to top

POST cards/checkByToken

Resource URL: POST https://direct.paylane.com/rest/cards/checkByToken The cards/checkByToken method checks whether the card number is valid and determines the card’s brand.

Request structure

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

Request example

1
2
3
{
    "token" : "12a34b45c67d89e00f1aa2bb3cc4dd5ee6ff12a34b45c67d89e00f1aa2bb3cc4"
    }

Response structure

Field Format Description
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.
error structure
Field Format Description
error_number unsigned integer Error number. Always three digits.
error_description string (max. 128 characters) Short description of the error.

Response examples

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."
    }
    }
^ back to top

POST paypal/sale

Resource URL: POST https://direct.paylane.com/rest/paypal/sale The paypal/sale method allows to perform a single transaction using a PayPal account.

Request structure

Field Format Required Description
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.
sale structure
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.
recurring structure
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.

Request example

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"
    }

Response structure

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

Response examples

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."
    }
    }
^ back to top

POST paypal/authorization

Resource URL: POST https://direct.paylane.com/rest/paypal/authorization The paypal/authorization method allows to authorize a PayPal account.

Request structure

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

Request example

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"
    }

Response structure

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

Response examples

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."
    }
    }
^ back to top

POST paypal/stopRecurring

Resource URL: POST https://direct.paylane.com/rest/paypal/stoprecurring The paypal/stopRecurring method allows to stop an active PayPal recurring profile.

Request structure

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

Response structure

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.

Response examples

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"
    }
    }
^ back to top

POST banktransfers/sale

Resource URL: POST https://direct.paylane.com/rest/banktransfers/sale The banktransfers/sale method allows to perform a wire transfer payment.

Request structure

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.
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.
sale structure
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.
customer structure
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.
address structure
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).

Request example

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"
    }
    }

Response structure

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

Response examples

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."
    }
    }
^ back to top

POST directdebits/sale

Resource URL: POST https://direct.paylane.com/rest/directdebits/sale The directdebits/sale method allows to perform a Direct Debit transaction.

Request structure

Field Format Required Description
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.
sale structure
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.
customer structure
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.
address structure
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).
account structure
Field Format Required Description
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 »).

Request example

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"
    }
    }

Response structure

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

Response examples

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."
    }
    }
^ back to top

POST sofort/sale

Resource URL: POST https://direct.paylane.com/rest/sofort/sale The sofort/sale method allows to perform a payment using the SOFORT Banking system.

Request structure

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.
sale structure
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.
customer structure
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.
address structure
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).

Request example

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"
    }
    }

Response structure

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.
error structure
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).

Response examples

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."
    }
    }
^ back to top

POST refunds

Resource URL: POST https://direct.paylane.com/rest/refunds The refunds method allows to return funds regarding a specific transaction.

Request structure

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

Request example

1
2
3
4
5
{
    "id_sale" : 1234567,
    "amount" : 15.00,
    "reason" : "Special discount."
    }

Response structure

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

Response examples

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."
    }
    }
^ back to top

POST authorizations/capture

Resource URL: POST https://direct.paylane.com/rest/authorizations/capture The authorizations/capture method allows to charge a specified amount from the sum blocked during a card, PayPal or Direct Debit authorization.

Request structure

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

Request example

1
2
3
4
5
{
    "id_authorization" : 1234567,
    "amount" : 75.50,
    "description" : "First rate"
    }

Response structure

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

Response examples

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
    }
^ back to top

POST authorizations/close

Resource URL: POST https://direct.paylane.com/rest/authorizations/close The authorizations/close method allows to close a previously opened card or PayPal authorization without charging the blocked amount. Note that all authorizations expire after a specific time and in some cases you may be charged for closing authorizations manually.

Request structure

Field Format Required Description
id_authorization unsigned long Yes Identification number of the authorization.

Request example

1
2
3
{
    "id_authorization" : 12345
    }

Response structure

Field Format Description
success boolean True or false, depending on whether the authorization closing was successful.
error JSON object Present only if success == false.
error structure
Field Format Description
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).
 

Response examples

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."
    }
    }
^ back to top

POST authorizations/info

Resource URL: POST https://direct.paylane.com/rest/authorizations/info The authorizations/info method returns transaction data pertaining to single card authorization, identified by its unique ID.

Request structure

Field Format Required Description
id_authorization unsigned int Yes Identification number of the authorization.

Request example

1
2
3
{
    "id_authorization" : 12345
    }

Response structure

Field Format Description
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.
error structure
Field Format Description
error_number unsigned integer (always 3 digits) PayLane error number.
error_description string (max 128 chars) PayLane’s description of the occurred error.
customer structure
Field Format Description
name string Customer name.
email string Customer e-mail address.
card structure
Field Format Description
name string Cardholder name.
number string Masked card number; first four and last four digits of the card number.
 

Response examples

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."
    }
    }
^ back to top

POST sales/info

Resource URL: POST https://direct.paylane.com/rest/sales/info The sales/info method returns transaction’s data that allow to identify its status (including fund returns).

Request structure

Field Format Required Description
id_sale unsigned long Yes Identification number of a sale.

Request example

1
2
3
{
    "id_sale" : 2345
    }

Response structure

Field Format Description
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.
customer structure
Field Format Description
name string Customer name.
email string Customer e-mail address.
card structure
Field Format Description
name string Cardholder name.
number string Masked card number; first four and last four digits of the card number.
account structure
Field Format Description
name string Account owner name.
number string Masked account number; last four digits of the account number.
reversals structure
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.
refunds structure
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.
chargebacks structure
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.
error structure
Field Format Description
error_number unsigned integer PayLane error number.
error_description string (max 128 chars) PayLane’s description of the occurred error.

Response examples

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
    }
^ back to top

POST sales/status

Resource URL: POST https://direct.paylane.com/rest/sales/status The sales/status allows to retrieve a single transaction’s status when the sale’s ID is unknown. If sale ID is known, please use the sales/info method.

Request structure

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

Request example

1
2
3
4
5
{
    "amount" : 45.00,
    "currency" : "EUR",
    "description" : "A great product"
    }

Response structure

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

Response examples

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."
    }
    }
^ back to top

POST resales/sale

Resource URL: POST https://direct.paylane.com/rest/resales/sale The resales/sale method allows to perform a transaction in reference to a previous sale. Thanks to this the method does not require complete sale information and allows to perform the payment easier and quicker.

Request structure

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

Request example

1
2
3
4
5
6
{
    "id_sale" : 436635,
    "amount" : 4.99,
    "currency" : "EUR",
    "description" : "Great Magazine subscription"
    }

Response structure

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

Response examples

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
    }
^ back to top

POST resales/authorization

Resource URL: POST https://direct.paylane.com/rest/resales/authorization The resales/authorization method allows to perform a transaction in reference to a previously made card authorization. Thanks to this the method does not require complete sale information and allows to perform the payment easier and quicker.

Request structure

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

Request example

1
2
3
4
5
6
{
    "id_authorization" : 436635,
    "amount" : 4.99,
    "currency" : "EUR",
    "description" : "Great Magazine subscription"
    }

Response structure

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

Response examples

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
    }
^ back to top

POST 3DSecure/checkCard

Resource URL: POST https://direct.paylane.com/rest/3DSecure/checkCard This function is used to check if a card is enrolled in the 3-D Secure program. Checking the enrollment is a first step in performing 3-D Secure transaction (sale).

Request structure

Field Format Required Description
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.
sale structure
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.
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.
customer structure
Field Format Required Description
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.
address structure
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).
card structure
Field Format Required Description
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).

Request example

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"
    }

Response structure

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

Response examples

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
    }
^ back to top

POST 3DSecure/checkCardByToken

Resource URL: POST https://direct.paylane.com/rest/3DSecure/checkCardByToken This function is used to check if a card is enrolled in the 3-D Secure program. Checking the enrollment is a first step in performing 3-D Secure transaction (sale).

Request structure

Field Format Required Description
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.
sale structure
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.
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.
customer structure
Field Format Required Description
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.
address structure
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).
card structure
Field Format Required Description
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.

Request example

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"
    }

Response structure

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

Response examples

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
    }
^ back to top

POST 3DSecure/authSale

Resource URL: POST https://direct.paylane.com/rest/3DSecure/authSale The 3DSecure/authSale method allows to perform a card payment in reference to a previously made 3-D Secure authorization.

Request structure

Field Format Required Description
id_3dsecure_auth unsigned long Yes Identification number of initiated 3-D Secure authentication.

Request example

1
2
3
{
    "id_3dsecure_auth" : 237473
    }

Response structure

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

Response examples

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
    }
^ back to top

POST ideal/sale

Resource URL: POST https://direct.paylane.com/rest/ideal/sale The ideal/sale method performs an iDeal transaction.

Request structure

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.
sale structure
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.
customer structure
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.
address structure
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).

Request example

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"
    }
    }

Response structure

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.
error structure
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).

Response examples

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."
    }
    }
^ back to top

GET ideal/bankcodes

Resource URL: GET https://direct.paylane.com/rest/ideal/bankcodes The ideal/bankcodes method returns information about all the available banks that participate in the iDeal program.

Response structure

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.
data element structure
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)
error structure
Field Format Description
error_number unsigned integer Error number. Always three digits.
error_description string (max. 128 characters) Short description of the error.

Response examples

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."
    }
    }
^ back to top