Recurring billing API documentation version v1
https://checkout-api.paysera.com/notification/rest/v1
API to create payment requests as well as authorize them and capture
/payment-requests
Create payment request
post /payment-requests
Create payment request
MAC token
Body
Media type: application/json
Type: object
Properties-
business_id:
required (string)
Business id.
Example:
5T7SCNm5nGdHOTL_2cyCvG05OFRIRU28
-
order_id:
required (string)
Order Id provided by API client.
Example:
1
-
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
Example:
unique-identifier-123
-
price:
required (object)
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Date in UNIX Timestamp format until it is possible to make payment. E.g. tickets have expiration date.
Example:
1691482088
-
locale:
(string)
Locale of payment request
Example:
en
-
description:
(string - maxLength: 255)
Payment request description which must be provided with placeholders/variables. Placeholders will be replaced by API with appropriate values and payment number will be added at the beginning.
Available placeholders combinations:
[order_nr]
+[site_name]
+[owner_name]
[order_nr]
+[site_name]
[order_nr]
+[owner_name]
If other combination of placeholders is provided, the default description would be used.
Default description:
Payment for order #[order_nr] at [site_name]
.Example:
Payment for order #[order_nr] at [site_name] for [owner_name]
-
method_country:
(string)
Payment request method country.
Example:
LT
-
method_key:
(string)
Payment request method key.
Example:
card
-
gateway_key:
(string)
Payment request gateway key.
Example:
card
-
payer:
(object)
-
email:
(string)
Payer email address.
Example:
payer@paysera.net
-
email:
(string)
-
contact_info:
(object)
Requires special permission to update contact_info.
-
contacts_url:
(string)
Merchant contacts URL
Example:
https://paysera.net/contact
-
name:
(string)
Merchant name
Example:
John Doe
-
address:
(string)
Merchant address
Example:
Street 12/2
-
email:
(string)
Merchant email
Example:
contact@paysera.net
-
phone:
(string)
Merchant phone
Example:
48123123123
-
other:
(string)
Other merchant contact data
Example:
Other contact info
-
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:
(object)
-
expected:
(string)
Expected personal code value.
Example:
personal code
-
expected:
(string)
-
personal_code:
(object)
-
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.
Example:
credit
-
card_brand:
(string)
Expected card brand value.
Example:
visa
-
card_type:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
Example:
https://paysera.net/accept
-
cancel_url:
required (string)
URL to redirect if payment failed.
Example:
https://paysera.net/cancel
-
callback_url:
required (string)
Shop URL
Example:
https://paysera.net/callback/callback
-
affiliate_key:
(string)
Integrators/developers/affiliates receive the affiliate fee - they need to be identified by unique key.
Example:
affiliate-key-123
-
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.
Example:
{"version": 1.7}
-
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.Example:
required
Example:
{
"business_id": "5T7SCNm5nGdHOTL_2cyCvG05OFRIRU28",
"order_id": "1",
"price": {
"amount": "1.00",
"currency": "EUR"
},
"payer": {
"email": "payer@paysera.net"
},
"accept_url": "https://paysera.net/accept",
"cancel_url": "https://paysera.net/cancel",
"callback_url": "https://paysera.net/callback",
"unique_identifier": "unique-identifier-123",
"valid_until": "1735689661",
"locale": "en",
"description": "Payment for order #[order_nr] at [site_name] for [owner_name]",
"method_country": "LT",
"method_key": "card",
"gateway_key": "card",
"affiliate_key": "affiliate-key-123",
"parameters": {
"version": "1.7",
"refund_on_capture": true
},
"token_strategy": "required",
"contact_info": {
"contacts_url": "https://paysera.net/contact",
"name": "John Doe",
"address": "Street 12/2",
"email": "contact@paysera.net",
"phone": "+48123123123",
"other": "Other contact info"
},
"information_request": {
"personal_code": {
"expected": "personal code"
}
},
"card_data_restriction": {
"card_type": "credit",
"card_brand": "visa"
}
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request
-
status:
(one of new, processing, authorized, captured, canceled, instantly_refunded)
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)
The actual amount paid by the customer
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Date in UNIX Timestamp format until it is possible to make payment. E.g. tickets have expiration date.
Example:
1691482088
-
locale:
(string)
Locale of payment request
-
description:
(string - maxLength: 255)
Payment request description.
Default description:
Payment for order #[order_nr] at [site_name]
. -
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
gateway_key:
(string)
Payment request gateway key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surname. (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 in UNIX Timestamp format.
Example:
1691482088
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
Example:
https://paysera.net/contact
-
name:
(string)
Merchant name
Example:
John Doe
-
address:
(string)
Merchant address
Example:
Street 12/2
-
email:
(string)
Merchant email
Example:
contact@paysera.net
-
phone:
(string)
Merchant phone
Example:
48123123123
-
other:
(string)
Other merchant contact data
Example:
Other contact info
-
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:
(object)
-
expected:
(string)
Expected personal code value.
Example:
personal code
-
expected:
(string)
-
personal_code:
(object)
-
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.
Example:
credit
-
card_brand:
(string)
Expected card brand value.
Example:
visa
-
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
- is_email_correct: required (boolean)
-
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": "PRAZaA4sd9l7ZzkDmJpYAyJDmupGWXch",
"contact_info": {
"contacts_url": "https://paysera.net/contact",
"name": "John Doe",
"address": "Street 12/2",
"email": "contact@paysera.net",
"phone": "+48123123123",
"other": "Other contact info"
},
"payer": {
"email": "payer@paysera.net"
},
"is_email_correct": true,
"authorization_url": "https://checkout-frontend.dev.docker/payment-request/PRAZaA4sd9l7ZzkDmJpYAyJDmupGWXch",
"price": {
"amount": "1.00",
"currency": "EUR"
},
"price_paid": {
"amount": "1.00",
"currency": "EUR"
},
"locale": "en",
"information_request": {
"personal_code": {
"expected": "personal code"
}
},
"card_data_restriction": {
"card_brand": "visa",
"card_type": "credit"
},
"business_id": "5T7SCNm5nGdHOTL_2cyCvG05OFRIRU28",
"order_id": "1",
"unique_identifier": "unique-identifier-123",
"valid_until": "1735689661",
"description": "RA34188074 Payment for order #1 at https://paysera.net/contact for New shiny business",
"method_key": "card",
"method_country": "LT",
"accept_url": "https://paysera.net/accept",
"cancel_url": "https://paysera.net/cancel",
"callback_url": "https://paysera.net/callback",
"affiliate_key": "affiliate-key-123",
"parameters": {
"version": "1.7"
},
"status": "new",
"gateway_key": "card",
"token_strategy": "required",
"created_at": 1696424518
}
HTTP status code 400
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: (string)
-
errors:
(array of object)
Items: items
- code: required (string)
- message: required (string)
- field: required (string)
Examples:
Form validation errors:
{
"error": "invalid_parameters",
"error_description": "Some required parameter is missing or it's format is invalid",
"errors": [
{
"code": null,
"message": "This field is missing.",
"field": "[order_id]"
},
{
"code": null,
"message": "This value should be greater than 0.",
"field": "[price][amount]"
},
{
"code": null,
"message": "Email \"wrong.email.com\" is not correct",
"field": "[payer][email]"
}
]
}
Business inactive:
{
"error": "invalid_business",
"error_description": "Business does not exist or is inactive"
}
HTTP status code 401
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "unauthorized",
"error_description": "body_hash parameter in MAC ext field must be empty on empty request content"
}
HTTP status code 403
Body
Media type: application/json
Type: ApiError
Example:
{
"error":"forbidden",
"error_description":"No permissions granted to set custom contact info"
}
HTTP status code 500
An unknown exception has occurred
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Secured by MAC
Headers
-
Authorization:
required (string)
The MAC token, eg 'MAC id="VRNBD1Ndr3pcyK9V", ts="1646164080", nonce="A8me4b2pILMczguEEWeTyCLCRFBCG806", mac="hntkmthK2D+Megq8gozJ8l6H/9aKHzp6IGdCR2ebxQI=", ext="body_hash=D1aS%2B9vdOYFHdI9RYsUSmqJSMglW3CD48Ql0tp8GpWk%3D"'
HTTP status code 401
Authentication failed (missing or invalid header)
HTTP status code 403
Access denied due to insufficient permissions
Get payment request
get /payment-requests/{paymentRequestId}
Get payment request
MAC token
URI Parameters
- paymentRequestId: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request
-
status:
(one of new, processing, authorized, captured, canceled, instantly_refunded)
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)
The actual amount paid by the customer
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Date in UNIX Timestamp format until it is possible to make payment. E.g. tickets have expiration date.
Example:
1691482088
-
locale:
(string)
Locale of payment request
-
description:
(string - maxLength: 255)
Payment request description.
Default description:
Payment for order #[order_nr] at [site_name]
. -
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
gateway_key:
(string)
Payment request gateway key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surname. (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 in UNIX Timestamp format.
Example:
1691482088
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
Example:
https://paysera.net/contact
-
name:
(string)
Merchant name
Example:
John Doe
-
address:
(string)
Merchant address
Example:
Street 12/2
-
email:
(string)
Merchant email
Example:
contact@paysera.net
-
phone:
(string)
Merchant phone
Example:
48123123123
-
other:
(string)
Other merchant contact data
Example:
Other contact info
-
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:
(object)
-
expected:
(string)
Expected personal code value.
Example:
personal code
-
expected:
(string)
-
personal_code:
(object)
-
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.
Example:
credit
-
card_brand:
(string)
Expected card brand value.
Example:
visa
-
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
- is_email_correct: required (boolean)
-
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": "PRAZaA4sd9l7ZzkDmJpYAyJDmupGWXch",
"contact_info": {
"contacts_url": "https://paysera.net/contact",
"name": "John Doe",
"address": "Street 12/2",
"email": "contact@paysera.net",
"phone": "+48123123123",
"other": "Other contact info"
},
"payer": {
"email": "payer@paysera.net"
},
"is_email_correct": true,
"authorization_url": "https://checkout-frontend.dev.docker/payment-request/PRAZaA4sd9l7ZzkDmJpYAyJDmupGWXch",
"price": {
"amount": "1.00",
"currency": "EUR"
},
"price_paid": {
"amount": "1.00",
"currency": "EUR"
},
"locale": "en",
"information_request": {
"personal_code": {
"expected": "personal code"
}
},
"card_data_restriction": {
"card_brand": "visa",
"card_type": "credit"
},
"business_id": "5T7SCNm5nGdHOTL_2cyCvG05OFRIRU28",
"order_id": "1",
"unique_identifier": "unique-identifier-123",
"valid_until": "1735689661",
"description": "RA34188074 Payment for order #1 at https://paysera.net/contact for New shiny business",
"method_key": "card",
"method_country": "LT",
"accept_url": "https://paysera.net/accept",
"cancel_url": "https://paysera.net/cancel",
"callback_url": "https://paysera.net/callback",
"affiliate_key": "affiliate-key-123",
"parameters": {
"version": "1.7"
},
"status": "new",
"gateway_key": "card",
"token_strategy": "required",
"created_at": 1696424518
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: (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: (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: (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Secured by MAC
Headers
-
Authorization:
required (string)
The MAC token, eg 'MAC id="VRNBD1Ndr3pcyK9V", ts="1646164080", nonce="A8me4b2pILMczguEEWeTyCLCRFBCG806", mac="hntkmthK2D+Megq8gozJ8l6H/9aKHzp6IGdCR2ebxQI=", ext="body_hash=D1aS%2B9vdOYFHdI9RYsUSmqJSMglW3CD48Ql0tp8GpWk%3D"'
HTTP status code 401
Authentication failed (missing or invalid header)
HTTP status code 403
Access denied due to insufficient permissions
Cancel payment request
put /payment-requests/{paymentRequestId}/cancel
Cancel payment request
MAC token
URI Parameters
- paymentRequestId: required (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties-
id:
(string)
ID of payment request
-
status:
(one of new, processing, authorized, captured, canceled, instantly_refunded)
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)
The actual amount paid by the customer
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Date in UNIX Timestamp format until it is possible to make payment. E.g. tickets have expiration date.
Example:
1691482088
-
locale:
(string)
Locale of payment request
-
description:
(string - maxLength: 255)
Payment request description.
Default description:
Payment for order #[order_nr] at [site_name]
. -
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
gateway_key:
(string)
Payment request gateway key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surname. (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 in UNIX Timestamp format.
Example:
1691482088
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
Example:
https://paysera.net/contact
-
name:
(string)
Merchant name
Example:
John Doe
-
address:
(string)
Merchant address
Example:
Street 12/2
-
email:
(string)
Merchant email
Example:
contact@paysera.net
-
phone:
(string)
Merchant phone
Example:
48123123123
-
other:
(string)
Other merchant contact data
Example:
Other contact info
-
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:
(object)
-
expected:
(string)
Expected personal code value.
Example:
personal code
-
expected:
(string)
-
personal_code:
(object)
-
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.
Example:
credit
-
card_brand:
(string)
Expected card brand value.
Example:
visa
-
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
- is_email_correct: required (boolean)
-
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 order #[order_nr] at [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: (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: (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Secured by MAC
Headers
-
Authorization:
required (string)
The MAC token, eg 'MAC id="VRNBD1Ndr3pcyK9V", ts="1646164080", nonce="A8me4b2pILMczguEEWeTyCLCRFBCG806", mac="hntkmthK2D+Megq8gozJ8l6H/9aKHzp6IGdCR2ebxQI=", ext="body_hash=D1aS%2B9vdOYFHdI9RYsUSmqJSMglW3CD48Ql0tp8GpWk%3D"'
HTTP status code 401
Authentication failed (missing or invalid header)
HTTP status code 403
Access denied due to insufficient permissions
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, processing, authorized, captured, canceled, instantly_refunded)
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
-
valid_until:
required (integer)
Payment request will be valid until
Annotations
- datetime_timestamp
-
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)
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
Example:
https://paysera.net/contact
-
name:
(string)
Merchant name
Example:
John Doe
-
address:
(string)
Merchant address
Example:
Street 12/2
-
email:
(string)
Merchant email
Example:
contact@paysera.net
-
phone:
(string)
Merchant phone
Example:
48123123123
-
other:
(string)
Other merchant contact data
Example:
Other contact info
-
contacts_url:
(string)
-
accept_url:
required (string)
URL to redirect if payment was successful.
-
cancel_url:
required (string)
URL to redirect if payment failed.
-
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.
Example:
{
"id": "abc-123",
"status": "captured",
"business_id": "P123",
"order_id": "123456",
"unique_identifier": "123456",
"valid_until": 1654403654,
"price": {
"amount": "123.22",
"currency": "EUR"
},
"description": "Payment for order #[order_nr] at [site_name]",
"method_country": "LT",
"method_key": "lt_swedbank",
"locale": "en",
"payer": {
"is_email_present": true
},
"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",
"parameters": {
"refund_on_capture": true
}
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: (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: (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Update payment request payer email
put /payment-requests/{paymentRequestId}/set-email
Update payment request payer email
MAC token
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
-
status:
(one of new, processing, authorized, captured, canceled, instantly_refunded)
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)
The actual amount paid by the customer
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Date in UNIX Timestamp format until it is possible to make payment. E.g. tickets have expiration date.
Example:
1691482088
-
locale:
(string)
Locale of payment request
-
description:
(string - maxLength: 255)
Payment request description.
Default description:
Payment for order #[order_nr] at [site_name]
. -
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
gateway_key:
(string)
Payment request gateway key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surname. (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 in UNIX Timestamp format.
Example:
1691482088
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
Example:
https://paysera.net/contact
-
name:
(string)
Merchant name
Example:
John Doe
-
address:
(string)
Merchant address
Example:
Street 12/2
-
email:
(string)
Merchant email
Example:
contact@paysera.net
-
phone:
(string)
Merchant phone
Example:
48123123123
-
other:
(string)
Other merchant contact data
Example:
Other contact info
-
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:
(object)
-
expected:
(string)
Expected personal code value.
Example:
personal code
-
expected:
(string)
-
personal_code:
(object)
-
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.
Example:
credit
-
card_brand:
(string)
Expected card brand value.
Example:
visa
-
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
- is_email_correct: required (boolean)
-
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": "PRAZaA4sd9l7ZzkDmJpYAyJDmupGWXch",
"contact_info": {
"contacts_url": "https://paysera.net/contact",
"name": "John Doe",
"address": "Street 12/2",
"email": "contact@paysera.net",
"phone": "+48123123123",
"other": "Other contact info"
},
"payer": {
"email": "payer@paysera.net"
},
"is_email_correct": true,
"authorization_url": "https://checkout-frontend.dev.docker/payment-request/PRAZaA4sd9l7ZzkDmJpYAyJDmupGWXch",
"price": {
"amount": "1.00",
"currency": "EUR"
},
"price_paid": {
"amount": "1.00",
"currency": "EUR"
},
"locale": "en",
"information_request": {
"personal_code": {
"expected": "personal code"
}
},
"card_data_restriction": {
"card_brand": "visa",
"card_type": "credit"
},
"business_id": "5T7SCNm5nGdHOTL_2cyCvG05OFRIRU28",
"order_id": "1",
"unique_identifier": "unique-identifier-123",
"valid_until": "1735689661",
"description": "RA34188074 Payment for order #1 at https://paysera.net/contact for New shiny business",
"method_key": "card",
"method_country": "LT",
"accept_url": "https://paysera.net/accept",
"cancel_url": "https://paysera.net/cancel",
"callback_url": "https://paysera.net/callback",
"affiliate_key": "affiliate-key-123",
"parameters": {
"version": "1.7"
},
"status": "new",
"gateway_key": "card",
"token_strategy": "required",
"created_at": 1696424518
}
HTTP status code 401
Missing or invalid authorization data
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: (string)
Example:
{
"error": "unauthorized",
"error_description": "No authorization data found"
}
HTTP status code 403
No rights to access resource
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: (string)
Example:
{
"error": "forbidden",
"error_description": "Access Denied."
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: (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: (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Secured by MAC
Headers
-
Authorization:
required (string)
The MAC token, eg 'MAC id="VRNBD1Ndr3pcyK9V", ts="1646164080", nonce="A8me4b2pILMczguEEWeTyCLCRFBCG806", mac="hntkmthK2D+Megq8gozJ8l6H/9aKHzp6IGdCR2ebxQI=", ext="body_hash=D1aS%2B9vdOYFHdI9RYsUSmqJSMglW3CD48Ql0tp8GpWk%3D"'
HTTP status code 401
Authentication failed (missing or invalid header)
HTTP status code 403
Access denied due to insufficient permissions
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 object)
Items: items
-
key:
required (string)
Payment method key
-
countries:
(array of string)
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 object)
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: (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: (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: (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Set payer email if it was not set during payment creation
put /payment-requests/{paymentRequestId}/set-missing-email
Set payer email if it was not set during payment creation
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
-
status:
(one of new, processing, authorized, captured, canceled, instantly_refunded)
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)
The actual amount paid by the customer
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Date in UNIX Timestamp format until it is possible to make payment. E.g. tickets have expiration date.
Example:
1691482088
-
locale:
(string)
Locale of payment request
-
description:
(string - maxLength: 255)
Payment request description.
Default description:
Payment for order #[order_nr] at [site_name]
. -
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
gateway_key:
(string)
Payment request gateway key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surname. (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 in UNIX Timestamp format.
Example:
1691482088
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
Example:
https://paysera.net/contact
-
name:
(string)
Merchant name
Example:
John Doe
-
address:
(string)
Merchant address
Example:
Street 12/2
-
email:
(string)
Merchant email
Example:
contact@paysera.net
-
phone:
(string)
Merchant phone
Example:
48123123123
-
other:
(string)
Other merchant contact data
Example:
Other contact info
-
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:
(object)
-
expected:
(string)
Expected personal code value.
Example:
personal code
-
expected:
(string)
-
personal_code:
(object)
-
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.
Example:
credit
-
card_brand:
(string)
Expected card brand value.
Example:
visa
-
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
- is_email_correct: required (boolean)
-
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": "PRAZaA4sd9l7ZzkDmJpYAyJDmupGWXch",
"contact_info": {
"contacts_url": "https://paysera.net/contact",
"name": "John Doe",
"address": "Street 12/2",
"email": "contact@paysera.net",
"phone": "+48123123123",
"other": "Other contact info"
},
"payer": {
"email": "payer@paysera.net"
},
"is_email_correct": true,
"authorization_url": "https://checkout-frontend.dev.docker/payment-request/PRAZaA4sd9l7ZzkDmJpYAyJDmupGWXch",
"price": {
"amount": "1.00",
"currency": "EUR"
},
"price_paid": {
"amount": "1.00",
"currency": "EUR"
},
"locale": "en",
"information_request": {
"personal_code": {
"expected": "personal code"
}
},
"card_data_restriction": {
"card_brand": "visa",
"card_type": "credit"
},
"business_id": "5T7SCNm5nGdHOTL_2cyCvG05OFRIRU28",
"order_id": "1",
"unique_identifier": "unique-identifier-123",
"valid_until": "1735689661",
"description": "RA34188074 Payment for order #1 at https://paysera.net/contact for New shiny business",
"method_key": "card",
"method_country": "LT",
"accept_url": "https://paysera.net/accept",
"cancel_url": "https://paysera.net/cancel",
"callback_url": "https://paysera.net/callback",
"affiliate_key": "affiliate-key-123",
"parameters": {
"version": "1.7"
},
"status": "new",
"gateway_key": "card",
"token_strategy": "required",
"created_at": 1696424518
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: object
Properties- error: required (string)
- error_description: (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: (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
MAC 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
-
status:
(one of new, processing, authorized, captured, canceled, instantly_refunded)
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)
The actual amount paid by the customer
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Date in UNIX Timestamp format until it is possible to make payment. E.g. tickets have expiration date.
Example:
1691482088
-
locale:
(string)
Locale of payment request
-
description:
(string - maxLength: 255)
Payment request description.
Default description:
Payment for order #[order_nr] at [site_name]
. -
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
gateway_key:
(string)
Payment request gateway key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surname. (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 in UNIX Timestamp format.
Example:
1691482088
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
Example:
https://paysera.net/contact
-
name:
(string)
Merchant name
Example:
John Doe
-
address:
(string)
Merchant address
Example:
Street 12/2
-
email:
(string)
Merchant email
Example:
contact@paysera.net
-
phone:
(string)
Merchant phone
Example:
48123123123
-
other:
(string)
Other merchant contact data
Example:
Other contact info
-
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:
(object)
-
expected:
(string)
Expected personal code value.
Example:
personal code
-
expected:
(string)
-
personal_code:
(object)
-
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.
Example:
credit
-
card_brand:
(string)
Expected card brand value.
Example:
visa
-
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
- is_email_correct: required (boolean)
-
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: (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: (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Secured by MAC
Headers
-
Authorization:
required (string)
The MAC token, eg 'MAC id="VRNBD1Ndr3pcyK9V", ts="1646164080", nonce="A8me4b2pILMczguEEWeTyCLCRFBCG806", mac="hntkmthK2D+Megq8gozJ8l6H/9aKHzp6IGdCR2ebxQI=", ext="body_hash=D1aS%2B9vdOYFHdI9RYsUSmqJSMglW3CD48Ql0tp8GpWk%3D"'
HTTP status code 401
Authentication failed (missing or invalid header)
HTTP status code 403
Access denied due to insufficient permissions
Capture authorized PaymentRequest
put /payment-requests/{paymentRequestId}/capture
Capture authorized PaymentRequest
MAC token
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
-
status:
(one of new, processing, authorized, captured, canceled, instantly_refunded)
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)
The actual amount paid by the customer
- amount: required (string)
- currency: required (string - minLength: 3 - maxLength: 3)
-
valid_until:
(integer)
Date in UNIX Timestamp format until it is possible to make payment. E.g. tickets have expiration date.
Example:
1691482088
-
locale:
(string)
Locale of payment request
-
description:
(string - maxLength: 255)
Payment request description.
Default description:
Payment for order #[order_nr] at [site_name]
. -
method_country:
(string)
Payment request method country.
-
method_key:
(string)
Payment request method key.
-
gateway_key:
(string)
Payment request gateway key.
-
payer:
(object)
-
name:
(string)
Customer first name. (only in response)
-
surname:
(string)
Customer surname. (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 in UNIX Timestamp format.
Example:
1691482088
-
contact_info:
(object)
-
contacts_url:
(string)
Merchant contacts URL
Example:
https://paysera.net/contact
-
name:
(string)
Merchant name
Example:
John Doe
-
address:
(string)
Merchant address
Example:
Street 12/2
-
email:
(string)
Merchant email
Example:
contact@paysera.net
-
phone:
(string)
Merchant phone
Example:
48123123123
-
other:
(string)
Other merchant contact data
Example:
Other contact info
-
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:
(object)
-
expected:
(string)
Expected personal code value.
Example:
personal code
-
expected:
(string)
-
personal_code:
(object)
-
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.
Example:
credit
-
card_brand:
(string)
Expected card brand value.
Example:
visa
-
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
- is_email_correct: required (boolean)
-
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: (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: (string)
Example:
{
"error": "internal_server_error",
"error_description": "Unexpected internal system error"
}
Secured by MAC
Headers
-
Authorization:
required (string)
The MAC token, eg 'MAC id="VRNBD1Ndr3pcyK9V", ts="1646164080", nonce="A8me4b2pILMczguEEWeTyCLCRFBCG806", mac="hntkmthK2D+Megq8gozJ8l6H/9aKHzp6IGdCR2ebxQI=", ext="body_hash=D1aS%2B9vdOYFHdI9RYsUSmqJSMglW3CD48Ql0tp8GpWk%3D"'
HTTP status code 401
Authentication failed (missing or invalid header)
HTTP status code 403
Access denied due to insufficient permissions