Recurring billing API documentation version v1
https://checkout-eu-a.paysera.com/checkout/rest/v1/
API to create payment requests as well as authorize them and capture
/payment-requests
Create payment request
Get filtered payment requests (not available for public use)
post /payment-requests
Create payment request
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
Example:
{
"id": "RA123123123",
"status": "new",
"business_id": "B123123123",
"order_id": "shop-order-123",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"valid_until": 1471478400,
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel",
"callback_url": "https://eshop.lt/callback",
"authorization_url": "http://checkout/authorize",
"parameters": {
"free": "form"
}
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
Example:
{
"id": "abc-123",
"status": "captured",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"price_paid": {
"amount": "123.22",
"currency": "EUR"
},
"valid_until": 1471478400,
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"first_payment": {
"id": "PAhuuIqXjylaMu-xQ81eqQwTdbo7kLG"
},
"locale": "en",
"payer": {
"name": "John",
"surname": "Doe",
"full_name": "John Doe",
"personal_code": "123123123",
"email": "asdsd@asdasd.com",
"ip": "127.0.0.1",
"ip_country": "LT",
"account": "..."
},
"created_at": 1654604614,
"contact_info": {
"contacts_url": "http://contacts.url",
"name": "Some Merchant",
"address": "Some street, Other town",
"email": "merchant@email.com",
"phone": "+12345678",
"other": "some other contacts"
},
"information_request": {
"personal_code": "code"
},
"card_data_restriction": {
"card_type": "type",
"card_brand": "brand"
},
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel",
"callback_url": "https://eshop.lt/callback",
"authorization_url": "http://checkout/checkout/rest/v1/payment-requests/123/authorize",
"affiliate_key": "key",
"parameters": {
"what": "ever"
},
"token_strategy": "required",
"issued_token": "token"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "not_found",
"error_description": "Request not found"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
get /payment-requests
Get filtered payment requests (not available for public use)
Query Parameters
-
business_id:
(string)
Unique business hash
-
status:
(one of new, authorized, captured, canceled)
Status of payment request
-
method_key:
(string)
Payment method key of payment request
-
order_id:
(string)
Order id
-
payer_name:
(string)
Payer name/surname/full name in case if payment was created for payment request
-
request_id:
(string)
Unique payment request hash
-
date_from:
(integer)
Lower bound of payment request creation date
Annotations
- datetime_timestamp
-
date_to:
(integer)
Upper bound of payment request creation date
Annotations
- datetime_timestamp
-
gateway_key:
(string)
Payment gateway key of payment request
-
price_amount:
(string)
Payment request amount
-
price_currency:
(string)
Payment request currency
-
payment_number:
(string)
Payment request number
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
_metadata:
required (object)
-
total:
required (integer)
Total count of items
-
offset:
required (integer)
Cursor position
-
limit:
(integer)
Max allowed results
-
order_direction:
(string)
Order direction
-
order_by:
(string)
Order results by some field
-
has_next:
(boolean)
When order_direction=asc, tells whether there are other records whose field referenced in order_by is greater. When order_direction=desc, tells whether there are other records whose field referenced in order_by is lower.
-
has_previous:
(boolean)
When order_direction=asc, tells whether there are other records whose field referenced in order_by is lower. When order_direction=desc, tells whether there are other records whose field referenced in order_by is greater.
-
cursors:
(object)
-
after:
(string)
When order_direction = asc, stores the greatest value of the order_by field. When order_direction = desc, stores the lowest value of the order_by field. In both order directions the client should use this value when retrieving the next page.
-
before:
(string)
When order_direction = asc, stores the lowest value of the order_by field. When order_direction = desc, stores the greatest value of the order_by field.
-
after:
(string)
-
total:
required (integer)
-
items:
required (array of items)
Items: items
-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
-
id:
(string)
Example:
{
"items": [{
"id": "abc-123",
"status": "captured",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"price_paid": {
"amount": "123.22",
"currency": "EUR"
},
"valid_until": 1471478400,
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"first_payment": {
"id": "PAhuuIqXjylaMu-xQ81eqQwTdbo7kLG"
},
"locale": "en",
"payer": {
"name": "John",
"surname": "Doe",
"full_name": "John Doe",
"personal_code": "123123123",
"email": "asdsd@asdasd.com",
"ip": "127.0.0.1",
"ip_country": "LT",
"account": "..."
},
"created_at": 1654604614,
"contact_info": {
"contacts_url": "http://contacts.url",
"name": "Some Merchant",
"address": "Some street, Other town",
"email": "merchant@email.com",
"phone": "+12345678",
"other": "some other contacts"
},
"information_request": {
"personal_code": "code"
},
"card_data_restriction": {
"card_type": "type",
"card_brand": "brand"
},
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel",
"callback_url": "https://eshop.lt/callback",
"authorization_url": "http://checkout/checkout/rest/v1/payment-requests/123/authorize",
"affiliate_key": "key",
"parameters": {
"what": "ever"
},
"token_strategy": "required",
"issued_token": "token"
}],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: limit"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Get payment request
get /payment-requests/{paymentRequestId}
Get payment request
URI Parameters
- paymentRequestId: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
Example:
{
"id": "abc-123",
"status": "captured",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"price_paid": {
"amount": "123.22",
"currency": "EUR"
},
"valid_until": 1471478400,
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"first_payment": {
"id": "PAhuuIqXjylaMu-xQ81eqQwTdbo7kLG"
},
"locale": "en",
"payer": {
"name": "John",
"surname": "Doe",
"full_name": "John Doe",
"personal_code": "123123123",
"email": "asdsd@asdasd.com",
"ip": "127.0.0.1",
"ip_country": "LT",
"account": "..."
},
"created_at": 1654604614,
"contact_info": {
"contacts_url": "http://contacts.url",
"name": "Some Merchant",
"address": "Some street, Other town",
"email": "merchant@email.com",
"phone": "+12345678",
"other": "some other contacts"
},
"information_request": {
"personal_code": "code"
},
"card_data_restriction": {
"card_type": "type",
"card_brand": "brand"
},
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel",
"callback_url": "https://eshop.lt/callback",
"authorization_url": "http://checkout/checkout/rest/v1/payment-requests/123/authorize",
"affiliate_key": "key",
"parameters": {
"what": "ever"
},
"token_strategy": "required",
"issued_token": "token"
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: limit"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Cancel payment request
put /payment-requests/{paymentRequestId}/cancel
Cancel payment request
URI Parameters
- paymentRequestId: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
Example:
{
"id": "abc-123",
"status": "canceled",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"price_paid": {
"amount": "123.22",
"currency": "EUR"
},
"valid_until": 1471478400,
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"locale": "en",
"payer": {
"name": "John",
"surname": "Doe",
"full_name": "John Doe",
"personal_code": "123123123",
"email": "asdsd@asdasd.com",
"ip": "127.0.0.1",
"ip_country": "LT",
"account": "..."
},
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel",
"callback_url": "https://eshop.lt/callback",
"authorization_url": "http://checkout/checkout/rest/v1/payment-requests/123/authorize"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "not_found",
"error_description": "Request not found"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Get payment request public info
get /payment-requests/{paymentRequestId}/public-info
Get payment request public info
URI Parameters
- paymentRequestId: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
required (object)
-
is_email_present:
required (boolean)
Flag if email present or not
-
is_email_present:
required (boolean)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
Example:
{
"id": "abc-123",
"status": "captured",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"locale": "en",
"payer": {
"is_email_present": true
},
"created_at": 1654604614,
"contact_info": {
"contacts_url": "http://contacts.url",
"name": "Some Merchant",
"address": "Some street, Other town",
"email": "merchant@email.com",
"phone": "+12345678",
"other": "some other contacts"
},
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "not_found",
"error_description": "Request not found"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Update payment request customer email
put /payment-requests/{paymentRequestId}/set-email
Update payment request customer email
URI Parameters
- paymentRequestId: required (string)
Body
Media type: application/json
Type: object
Properties-
email:
required (string)
Email
Example:
{
"email": "john@doe.com"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
Example:
{
"id": "abc-123",
"status": "captured",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"price_paid": {
"amount": "123.22",
"currency": "EUR"
},
"valid_until": 1471478400,
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"first_payment": {
"id": "PAhuuIqXjylaMu-xQ81eqQwTdbo7kLG"
},
"locale": "en",
"payer": {
"name": "John",
"surname": "Doe",
"full_name": "John Doe",
"personal_code": "123123123",
"email": "asdsd@asdasd.com",
"ip": "127.0.0.1",
"ip_country": "LT",
"account": "..."
},
"created_at": 1654604614,
"contact_info": {
"contacts_url": "http://contacts.url",
"name": "Some Merchant",
"address": "Some street, Other town",
"email": "merchant@email.com",
"phone": "+12345678",
"other": "some other contacts"
},
"information_request": {
"personal_code": "code"
},
"card_data_restriction": {
"card_type": "type",
"card_brand": "brand"
},
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel",
"callback_url": "https://eshop.lt/callback",
"authorization_url": "http://checkout/checkout/rest/v1/payment-requests/123/authorize",
"affiliate_key": "key",
"parameters": {
"what": "ever"
},
"token_strategy": "required",
"issued_token": "token"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "not_found",
"error_description": "Request not found"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Get payment methods for a payment request
get /payment-requests/{paymentRequestId}/methods
Get payment methods for a payment request
URI Parameters
- paymentRequestId: required (string)
Query Parameters
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
_metadata:
required (object)
-
total:
required (integer)
Total count of items
-
offset:
required (integer)
Cursor position
-
limit:
(integer)
Max allowed results
-
order_direction:
(string)
Order direction
-
order_by:
(string)
Order results by some field
-
has_next:
(boolean)
When order_direction=asc, tells whether there are other records whose field referenced in order_by is greater. When order_direction=desc, tells whether there are other records whose field referenced in order_by is lower.
-
has_previous:
(boolean)
When order_direction=asc, tells whether there are other records whose field referenced in order_by is lower. When order_direction=desc, tells whether there are other records whose field referenced in order_by is greater.
-
cursors:
(object)
-
after:
(string)
When order_direction = asc, stores the greatest value of the order_by field. When order_direction = desc, stores the lowest value of the order_by field. In both order directions the client should use this value when retrieving the next page.
-
before:
(string)
When order_direction = asc, stores the lowest value of the order_by field. When order_direction = desc, stores the greatest value of the order_by field.
-
after:
(string)
-
total:
required (integer)
-
items:
required (array of items)
Items: items
-
key:
required (string)
Payment method key
-
countries:
(array of items)
Country ISO 3166-1 alpha-2 codes
-
group_key:
required (string)
Payment methods group key
-
logo_url:
required (string)
Payment methods logo url
-
basic_information:
required (array of items)
Payment method basic information
Items: items
-
language:
(string - minLength: 2 -
maxLength: 2)
Language ISO 639-1 code
-
title:
(string)
Payment method title
-
description:
(string)
Payment method description
-
language:
(string - minLength: 2 -
maxLength: 2)
-
gateway:
required (string)
Payment method active gateway that is actually used. It's also possible gateway to be null e.g. no available gateways for payment method.
-
status:
required (one of enabled, disabled)
Payment method status
-
key:
required (string)
Example:
{
"items": [{
"key": "some_key",
"countries": ["LT"],
"group_key": "bank",
"logo_url": "https://www.dummy-url.com",
"basic_information": [{
"language": "lt",
"title": "Dummy title",
"description": "Dummy description"
}],
"gateway": "lt_swedbank_banklink",
"status": "enabled"
}],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: limit"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "not_found",
"error_description": "Request not found"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Start payment and return flow data
put /payment-requests/{paymentRequestId}/start-payment
Start payment and return flow data
URI Parameters
- paymentRequestId: required (string)
Body
Media type: application/json
Type: object
Properties-
method_key:
required (string)
Payment method.
Example:
{
"method_key": "entercash"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
type:
required (one of form_auto_post, redirect, custom)
Type of response
-
flow_data:
required (object)
Data provided with start payment response
-
action_url:
(string)
Action url (only for "form_auto_post" type)
-
method:
(POST)
Action method (only for "form_auto_post" type)
-
auto_post_data:
(object)
Action POST data (only for "form_auto_post" type)
-
redirect_url:
(string)
Redirect url (only for "redirect" type)
-
gateway_key:
(string)
Gateway key (only for "custom" type)
-
action_url:
(string)
Examples:
custom:
{
"type": "custom",
"flow_data": {
"gateway_key": "card"
}
}
auto-post:
{
"type": "form_auto_post",
"flow_data": {
"action_url": "http://example.com",
"method": "POST",
"auto_post_data": {
"postKey": "postValue"
}
}
}
redirect:
{
"type": "redirect",
"flow_data": {
"redirect_url": "http://example.com"
}
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Set missing payment request customer email
put /payment-requests/{paymentRequestId}/set-missing-email
Set missing payment request customer email
URI Parameters
- paymentRequestId: required (string)
Body
Media type: application/json
Type: object
Properties-
email:
required (string)
Email
Example:
{
"email": "john@doe.com"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
Example:
{
"id": "abc-123",
"status": "captured",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"price_paid": {
"amount": "123.22",
"currency": "EUR"
},
"valid_until": 1471478400,
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"first_payment": {
"id": "PAhuuIqXjylaMu-xQ81eqQwTdbo7kLG"
},
"locale": "en",
"payer": {
"name": "John",
"surname": "Doe",
"full_name": "John Doe",
"personal_code": "123123123",
"email": "asdsd@asdasd.com",
"ip": "127.0.0.1",
"ip_country": "LT",
"account": "..."
},
"created_at": 1654604614,
"contact_info": {
"contacts_url": "http://contacts.url",
"name": "Some Merchant",
"address": "Some street, Other town",
"email": "merchant@email.com",
"phone": "+12345678",
"other": "some other contacts"
},
"information_request": {
"personal_code": "code"
},
"card_data_restriction": {
"card_type": "type",
"card_brand": "brand"
},
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel",
"callback_url": "https://eshop.lt/callback",
"authorization_url": "http://checkout/checkout/rest/v1/payment-requests/123/authorize",
"affiliate_key": "key",
"parameters": {
"what": "ever"
},
"token_strategy": "required",
"issued_token": "token"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "not_found",
"error_description": "Request not found"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Set missing request price
put /payment-requests/{paymentRequestId}/set-missing-price
Set missing request price
URI Parameters
- paymentRequestId: required (string)
Body
Media type: application/json
Type: object
Properties- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
Example:
{
"id": "abc-123",
"status": "captured",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"price_paid": {
"amount": "123.22",
"currency": "EUR"
},
"valid_until": 1471478400,
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"first_payment": {
"id": "PAhuuIqXjylaMu-xQ81eqQwTdbo7kLG"
},
"locale": "en",
"payer": {
"name": "John",
"surname": "Doe",
"full_name": "John Doe",
"personal_code": "123123123",
"email": "asdsd@asdasd.com",
"ip": "127.0.0.1",
"ip_country": "LT",
"account": "..."
},
"created_at": 1654604614,
"contact_info": {
"contacts_url": "http://contacts.url",
"name": "Some Merchant",
"address": "Some street, Other town",
"email": "merchant@email.com",
"phone": "+12345678",
"other": "some other contacts"
},
"information_request": {
"personal_code": "code"
},
"card_data_restriction": {
"card_type": "type",
"card_brand": "brand"
},
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel",
"callback_url": "https://eshop.lt/callback",
"authorization_url": "http://checkout/checkout/rest/v1/payment-requests/123/authorize",
"affiliate_key": "key",
"parameters": {
"what": "ever"
},
"token_strategy": "required",
"issued_token": "token"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "not_found",
"error_description": "Request not found"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Authorize PaymentRequest with already issued Token
put /payment-requests/{paymentRequestId}/authorize
Authorize PaymentRequest with already issued Token
URI Parameters
- paymentRequestId: required (string)
Body
Media type: application/json
Type: object
Properties-
token:
required (string)
Value of issued_token to use for authorization.
Example:
{
"token": "knopevHodcelNietEidaggyecuveanoj"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "not_found",
"error_description": "Request not found"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Capture authorized PaymentRequest
put /payment-requests/{paymentRequestId}/capture
Capture authorized PaymentRequest
URI Parameters
- paymentRequestId: required (string)
Body
Media type: application/json
Type: object
Properties-
capture_amount:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
Example:
{
"capture_amount": {
"amount": "5.49",
"currency": "EUR"
}
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "not_found",
"error_description": "Request not found"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Confirm payment request by id for admin
put /payment-requests/{paymentRequestId}/confirm
Confirm payment request by id for admin
JWT Token authentication
URI Parameters
- paymentRequestId: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request (only in response)
-
status:
(one of new, authorized, captured, canceled)
Status of payment request.
-
business_id:
required (string)
Business id.
-
order_id:
required (string)
Order Id provided by API client.
-
unique_identifier:
(string)
Unique payment request identifier provided by API client. If payment request already exists with client_id and unique_identifier pair then additional requests with same client_id and unique_identifier pair will lead to these situations:
- if payment request is already paid, then error will be returned payment_request_not_unique
- if payment is not paid, then previous payment request will be canceled and the new one created
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
price_paid:
(object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Timestamp until it's possible to make payment e.g. tickets have expiration date.
-
locale:
(string)
Locale of payment request
-
description:
(string)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values. Mandatory placeholders:
- [order_nr]
- [site_name]
-
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surame. (only in response)
-
full_name:
(string)
Customer full name. (only in response)
-
personal_code:
(string)
Customer personal code. (only in response)
-
email:
(string)
Customer email.
-
ip:
(string)
Customer IP address. (only in response)
-
ip_country:
(string)
Customer IP address country. (only in response)
-
account:
(string)
Payers account number. (only in response)
-
name:
(string)
-
created_at:
required (integer)
Payment request creation date
Annotations
- datetime_timestamp
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
-
name:
(string)
Merchant name
-
address:
(string)
Merchant address
-
email:
(string)
Merchant email
-
phone:
(string)
Merchant phone
-
other:
(string)
Other merchant contact data
-
contacts_url:
(string)
-
information_request:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
personal_code:
(string)
Expected personal code value.
-
personal_code:
(string)
-
card_data_restriction:
(object)
Provide parameter names with expected values. If parameters values do not match, payment request may be set to an appropriate status.
-
card_type:
(string)
Expected card type value.
-
card_brand:
(string)
Expected card brand value.
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
callback_url:
required (string)
Shop URL
-
authorization_url:
(string)
URL to authorize payment.
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
-
parameters:
(object)
Additional custom parameters formatted in a one level key value JSON format. Only strings as values are supported. This allows to provided custom needed parameters for internal use.
-
token_strategy:
(string)
Only
required
is available at this moment. If provided, only payment methods supporting tokens will be available. Alsoissued_token
will be available for this PaymentRequest after it will be captured. -
issued_token:
(string)
If
token_strategy
was set torequired
,issued_token
will be available after thisPaymentRequest
will be captured. It can be used to authorize otherPaymentRequest
s in the future. -
first_payment:
(object)
-
id:
(string)
ID (hash) of payment request first payment
-
id:
(string)
Example:
{
"id": "abc-123",
"status": "captured",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"price": {
"amount": "123.22",
"currency": "EUR"
},
"price_paid": {
"amount": "123.22",
"currency": "EUR"
},
"valid_until": 1471478400,
"description": "Payment for goods on order [order_nr] on the website [site_name].",
"method_country": "LT",
"method_key": "lt_swedbank",
"first_payment": {
"id": "PAhuuIqXjylaMu-xQ81eqQwTdbo7kLG"
},
"locale": "en",
"payer": {
"name": "John",
"surname": "Doe",
"full_name": "John Doe",
"personal_code": "123123123",
"email": "asdsd@asdasd.com",
"ip": "127.0.0.1",
"ip_country": "LT",
"account": "..."
},
"created_at": 1654604614,
"contact_info": {
"contacts_url": "http://contacts.url",
"name": "Some Merchant",
"address": "Some street, Other town",
"email": "merchant@email.com",
"phone": "+12345678",
"other": "some other contacts"
},
"information_request": {
"personal_code": "code"
},
"card_data_restriction": {
"card_type": "type",
"card_brand": "brand"
},
"accept_url": "https://eshop.lt/accept",
"cancel_url": "https://eshop.lt/cancel",
"callback_url": "https://eshop.lt/callback",
"authorization_url": "http://checkout/checkout/rest/v1/payment-requests/123/authorize",
"affiliate_key": "key",
"parameters": {
"what": "ever"
},
"token_strategy": "required",
"issued_token": "token"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Secured by JWT
Headers
-
Authorization:
required (string)
Valid Bearer JWT token
HTTP status code 401
Bad or expired token. To fix, re-authenticate the user.
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)
HTTP status code 403
Access denied with the current authenticated token to the requiested resource.
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: required (string)