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.

Request structure

Field Format Required Description
public_api_key string (40 characters) Yes Your Public API Key.
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).

Response structure

1
2
3
4
5
6
7
8
{
    "public_api_key"   : "71426338751d8c8e454a13fa4c44a3094cbab89c",
    "card_number"      : "4111111111111111",
    "expiration_month" : "03",
    "expiration_year"  : "2017",
    "name_on_card"     : "John Doe",
    "card_code"        : "123"
    }

Response

Field Format Description
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.
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,
    "token" : "12a34b45c67d89e00f1aa2bb3cc4dd5ee6ff12a34b45c67d89e00f1aa2bb3cc4"
    }
1
2
3
4
5
6
7
{
    "success" : false,
    "error" : {
    "error_number" : 415,
    "error_description" : "Card has expired."
    }
    }
^ back to top

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,
  • MI – Millennium,
  • CA – Credit Agricole,
  • PP – Poczta Polska (postal money order),
  • PCZ – Bank Pocztowy,
  • IB – Idea Bank,
  • PO – Pekao S.A.,
  • GB – Getin Bank,
  • IG – ING Bank Śląski,
  • WB – Santander Bank,
  • PB – Bank BGŻ BNP PARIBAS,
  • CT – Citi,
  • PL – PlusBank,
  • NP – Noble Pay,
  • BS – Bank Spółdzielczy,
  • NB – NestBank,
  • PBS – Podkarpacki Bank Spółdzielczy,
  • SGB – SGB,
  • 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 applepay/sale

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

The applepay/sale method allows to perform a single transaction using Apple Pay payment token.

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.
Structure 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.
Structure customer
Field Format Required Description
name string (2-50 characters, UTF-8 encoded) Yes Customer name.
email string (6-80 characters) Yes Valid email address.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
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.
Structure card
Field Format Required Description
token string (base64) Yes Base64 encoded payment token. It’s generated by Apple device.

Request example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
    "sale": {
        "amount": 1.00,
        "currency": "USD",
        "description": "Test product"
    },
    "customer": {
        "name": "John Doe",
        "email": "john.doe@example.com",
        "country_code": "US",
        "ip": "127.0.0.1"
    },
    "card": {
        "token": "eyJwYXltZW50RGF0YSI6eyJ2ZXJzaW9uIjoiRUNfdjEiLCJkYXRhIjoicFpkZERNL2VmQm1qZ0drTk1RUmJncjM3VjdXVzhVMW40WlNXRjZzK2R4ZHBSMVRpbmI1aFlVVXRnQVBRRGZSV3NmR21ldEQ5RUF0cGFRTThPbEJGS21sdThKUXkrSUNhOXMyeDdSY3hFV1A4NXBsWWxNWjgvNkMwQWhLSGNEdkhuaW01VHZLVUZVY0NoeXhHNVlrNDhENUZObGl0OG0yL0dnWmkxVXkwS1RwTTZzZVMwMGpuRHl1a3hCenJmOGRVMFkrTzRSSWFPODhkNS9OSlA1ZVNnay8vVTlHb1lWUXBjZjQzL3BQbGt4ZUgrRGhwSVFuRHRza0ZhTFpNSkhaKzU3YUZUbVYvcXBPdHRmQ1dZRFp2MWF1aEUrRUJsbH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FsUHVibGljS2V5IjoiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFWmUrMlc5cTNyTEFETnNrNVdxc0VmR2cvQ01pdXNOWVpYdlJIeVZMWEowcFRSQ0VUR1dLQjl2dzNHZm9IZnA2RFFrK2FFTGxGeXFSRUswZC9MRDlWM1E9PSIsInB1YmxpY0tleUhhc2giOiJIYVZ4ZmdDUnVkOFpsRk1FWHZiTk1yNlk1MlhLQTNFaDljY0kveXR4eGxnPSIsInRyYW5zYWN0aW9uSWQiOiI4N2Q4MWIxNGQ1MzU4ZmFkZjE1ZjU1MWI5ZTM2MTg1Mzc4N2IyNjA2ZTM3MTY2Y2JkN2NhZjdmZWI5ZTczZDg3In19LCJwYXltZW50TWV0aG9kIjp7ImRpc3BsYXlOYW1lIjoiVmlzYSAxNDQ1IiwibmV0d29yayI6IlZpc2EiLCJ0eXBlIjoiZGViaXQifSwidHJhbnNhY3Rpb25JZGVudGlmaWVyIjoiODdEODFCMTRENTM1OEZBREYxNUY1NTFCOUUzNjE4NTM3ODdCMjYwNkUzNzE2NkNCRDdDQUY3RkVCOUU3M0Q4NyJ9"
    }
}

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.
Structure 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.

Response example

1
2
3
4
{
    "success": true,
    "id_sale": 1234567,
}
1
2
3
4
5
6
7
8
{
    "success": false,
    "error": {
        "id_error": 1234567,
        "error_number": 403,
        "error_description": "Card declined."
    }
}
^ back to top

POST applepay/authorization

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

The applepay/authorization method allows to authorize a card (credit, debit, pre-paid etc.) using Apple Pay payment token. 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).

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.
Structure 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.
Structure customer
Field Format Required Description
name string (2-50 characters, UTF-8 encoded) Yes Customer name.
email string (6-80 characters) Yes Valid email address.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
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.
Structure card
Field Format Required Description
token string (base64) Yes Base64 encoded payment token. It’s generated by Apple device.

Request example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
    "sale": {
        "amount": 1.00,
        "currency": "USD",
        "description": "Test product"
    },
    "customer": {
        "name": "John Doe",
        "email": "john.doe@example.com",
        "country_code": "US",
        "ip": "127.0.0.1"
    },
    "card": {
        "token": "eyJwYXltZW50RGF0YSI6eyJ2ZXJzaW9uIjoiRUNfdjEiLCJkYXRhIjoicFpkZERNL2VmQm1qZ0drTk1RUmJncjM3VjdXVzhVMW40WlNXRjZzK2R4ZHBSMVRpbmI1aFlVVXRnQVBRRGZSV3NmR21ldEQ5RUF0cGFRTThPbEJGS21sdThKUXkrSUNhOXMyeDdSY3hFV1A4NXBsWWxNWjgvNkMwQWhLSGNEdkhuaW01VHZLVUZVY0NoeXhHNVlrNDhENUZObGl0OG0yL0dnWmkxVXkwS1RwTTZzZVMwMGpuRHl1a3hCenJmOGRVMFkrTzRSSWFPODhkNS9OSlA1ZVNnay8vVTlHb1lWUXBjZjQzL3BQbGt4ZUgrRGhwSVFuRHRza0ZhTFp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6bUZ3RkZxQUFBQUFBQUEiLCJoZWFkZXIiOnsiZXBoZW1lcmFsUHVibGljS2V5IjoiTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFWmUrMlc5cTNyTEFETnNrNVdxc0VmR2cvQ01pdXNOWVpYdlJIeVZMWEowcFRSQ0VUR1dLQjl2dzNHZm9IZnA2RFFrK2FFTGxGeXFSRUswZC9MRDlWM1E9PSIsInB1YmxpY0tleUhhc2giOiJIYVZ4ZmdDUnVkOFpsRk1FWHZiTk1yNlk1MlhLQTNFaDljY0kveXR4eGxnPSIsInRyYW5zYWN0aW9uSWQiOiI4N2Q4MWIxNGQ1MzU4ZmFkZjE1ZjU1MWI5ZTM2MTg1Mzc4N2IyNjA2ZTM3MTY2Y2JkN2NhZjdmZWI5ZTczZDg3In19LCJwYXltZW50TWV0aG9kIjp7ImRpc3BsYXlOYW1lIjoiVmlzYSAxNDQ1IiwibmV0d29yayI6IlZpc2EiLCJ0eXBlIjoiZGViaXQifSwidHJhbnNhY3Rpb25JZGVudGlmaWVyIjoiODdEODFCMTRENTM1OEZBREYxNUY1NTFCOUUzNjE4NTM3ODdCMjYwNkUzNzE2NkNCRDdDQUY3RkVCOUU3M0Q4NyJ9"
    }
}

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 capture). Authorization identification number is unique for each authorization.
error JSON Object A structure that contains error information; present only if an error occurs.
Structure 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.

Response example

1
2
3
4
{
    "success": true,
    "id_authorization": 1234567,
}
1
2
3
4
5
6
7
8
{
    "success": false,
    "error": {
        "id_error": 1234567,
        "error_number": 403,
        "error_description": "Card declined."
    }
}
^ 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.
date string (ISO 8601) Authorization date.
currency string (3 characters) Transaction currency code. ISO 4217 format, all uppercase.
payment_method string Payment method code such as CC_VISA or CC_MC.
description string A short description of the authorization.
is_disposed boolean If true, authorization cannot be used as a reference.
customer JSON Object Basic customer information.
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.
expiration_month integer Card expiration month. 1 to 12
expiration_year integer Card expiration year.
 

Response examples

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
    "success" : true,
    "id_authorization" : 1234,
    "status" : "CAPTURED",
    "amount" : 100.00,
    "date" : "2018-01-15T10:00:12+00:00",
    "clearing_date" : "2018-01-15T10:00:12+00:00",
    "currency_code" : "EUR",
    "description" : "A brilliant product, #52704",
    "is_disposed" : false,
    "customer" : {
    "name" : "John Doe",
    "email" : "john@doe.com"
    }
    "card" : {
    "name" : "John Doe",
    "number" : "4100...0001"
    },
    }
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.
date string (ISO 8601) Transaction date.
clearing_date string (ISO 8601) | null Clearing date.
currency string (3 characters) Transaction currency code. ISO 4217 format, all uppercase.
description string A short description of the sale.
customer JSON Object Basic customer information.
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.
is_disposed boolean If true, transaction cannot be used as a reference.
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.
expiration_month integer Card expiration month. 1 to 12
expiration_year integer Card expiration year.
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 (ISO 8601) 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 (ISO 8601) 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 (ISO 8601) 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_card_enrolled boolean True if a card is enrolled in the 3-D Secure program; otherwise false.
id_3dsecure_auth unsigned long Identification number of initiated 3-D Secure authentication. It is important to provide this ID when continuing the sale transaction even if card is not enrolled in 3-D Secure.
redirect_url string (256 characters) Website address where the customer will be redirected to perform a payment.
error JSON Object A structure that contains error information; present only if an error occurs.
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_card_enrolled boolean True if a card is enrolled in the 3-D Secure program; otherwise false.
id_3dsecure_auth unsigned long Identification number of initiated 3-D Secure authentication. It is important to provide this ID when continuing the sale transaction even if card is not enrolled in 3-D Secure.
redirect_url string (256 characters) Website address where the customer will be redirected to perform a payment.
error JSON Object A structure that contains error information; present only if an error occurs.
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 3DSecure/auth

Resource URL: POST https://direct.paylane.com/rest/3DSecure/auth The 3DSecure/auth method allows to autorize a card 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_authorization unsigned long Identification number of the performed 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 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

POST googlepay/sale

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

The googlepay/sale method allows to perform a single transaction using Google Pay payment token.

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.
Structure 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.
Structure customer
Field Format Required Description
name string (2-50 characters, UTF-8 encoded) Yes Customer name.
email string (6-80 characters) Yes Valid email address.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
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.
Structure card
Field Format Required Description
token string (base64) Yes Base64 encoded payment token.

Request example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
    "sale": {
        "amount": 1.00,
        "currency": "USD",
        "description": "Test product"
    },
    "customer": {
        "name": "John Doe",
        "email": "john.doe@example.com",
        "country_code": "US",
        "ip": "127.0.0.1"
    },
    "card": {
        "token": "eyJzaWduYXR1cmUiOiJNRVlDSVFDcUE1T0Vpd1ptR29GNlVqUEI3MktBNWtOa2lyUE5WMGN0T1A4Uytwam1qd0loQUo1QjVXa3Vnd1JhNWk3enRUWjE4eHBEWjJXK0hNTjh3a0M2SFFCZ3ZyUWkiLCJwcm90b2NvbFZlcnNpb24iOiJFQ3YxIiwic2lnbmVkTWVzc2FnZSI6IntcImVuY3J5cHRlZE1lc3NhZ2VcIjpcIlJnSGV1UVA4OVFpa1FDZmtLemRia1g3dU4w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=="
    }
}

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.
Structure 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.

Response example

1
2
3
4
{
    "success": true,
    "id_sale": 1234567,
}
1
2
3
4
5
6
7
8
{
    "success": false,
    "error": {
        "id_error": 1234567,
        "error_number": 403,
        "error_description": "Card declined."
    }
}
^ back to top

POST googlepay/authorization

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

The googlepay/authorization method allows to authorize a card (credit, debit, pre-paid etc.) using Google Pay payment token. 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).

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.
Structure 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.
Structure customer
Field Format Required Description
name string (2-50 characters, UTF-8 encoded) Yes Customer name.
email string (6-80 characters) Yes Valid email address.
country_code string (2 characters) Yes Country code (ISO 3166 standard).
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.
Structure card
Field Format Required Description
token string (base64) Yes Base64 encoded payment token.

Request example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
    "sale": {
        "amount": 1.00,
        "currency": "USD",
        "description": "Test product"
    },
    "customer": {
        "name": "John Doe",
        "email": "john.doe@example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MwU28yYyt4SnU5b21FUy9QbFVXU1hJdXltL1hXMldhd1xcdTAwM2RcXHUwMDNkXCIsXCJlcGhlbWVyYWxQdWJsaWNLZXlcIjpcIkJGZzZoNWZkQ0RIbWFNODlNN0VKOVdyWHVkZWh3bzFrci8rWmdNZDJiUE5NNmhHVVZRZVp2VHRZSm5ua1dGY2JVODZteXU0WmduM2VyL05pMUNwVFk1RVxcdTAwM2RcIixcInRhZ1wiOlwiY3NzcXNmcnJpSDRwSzlUQmJPRWpSMDc2Slc2YWNKL3JEQ3JHTUpaLzFaa1xcdTAwM2RcIn0ifQ=="
    }
}

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 capture). Authorization identification number is unique for each authorization.
error JSON Object A structure that contains error information; present only if an error occurs.
Structure 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.

Response example

1
2
3
4
{
    "success": true,
    "id_authorization": 1234567,
}
1
2
3
4
5
6
7
8
{
    "success": false,
    "error": {
        "id_error": 1234567,
        "error_number": 403,
        "error_description": "Card declined."
    }
}
^ back to top