post

/vendor/token

Before merchant redirects customer to Leanpay checkout page, merchant’s server must obtain unique token from Leanpay server. Received token will be used as parameter for redirect HTTP request.

Request Body

Schema
object
$schema: http://json-schema.org/draft-04/schema#
vendorApiKey
string

Assigned vendor API key. This value will be assigned at the time of application.

3 validations + required
vendorTransactionId
string

Your unique reference or identification number for the transaction. (Must be unique for each payment)

2 validations + required
amount
number

The total amount payable. Note: do not include the trailing zeroes if the amount is a natural number. For example: “23” (not “23.00”).

2 validations + required
successUrl
string

URL to which the customer is returned once the successful payment is made.

3 validations + required
errorUrl
string

URL to which the customer is returned if the payment is cancelled or fails.

3 validations + required
vendorPhoneNumber
string

Customer phone number acquired by vendor as part of registration on vendors online shop.

2 validations
vendorFirstName
string

Customer first name acquired by vendor as part of registration on vendors online shop.

2 validations + required
vendorLastName
string

Customer last name acquired by vendor as part of registration on vendors online shop.

2 validations + required
vendorAddress
string

Customer address acquired by vendor as part of registration on vendors online shop.

2 validations
vendorZip
number

Customer zip acquired by vendor as part of registration on vendors online shop.

2 validations
vendorCity
string

Customer city acquired by vendor as part of registration on vendors online shop.

2 validations
language
string

Language wich customer selected on vendors online shop.

2 validations
vendorProductCode
string

Identification for financial product that you agreed with Leanpay. If it is not specified, default will be used.

3 validations
CartItems
object
required

Responses

Received token will be used as parameter for redirect HTTP request.

Schema
object
$schema: http://json-schema.org/draft-04/schema#
token
string

token for checkout page.

1 validation

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
No $$.env variables are being used in this request.