Create a payment
POST/v3/payments
To create a payment, you use a payment resource. It's a reference to the actual payment that happens at the payment gateway.
Request
Header Parameters
The Signature header is used to ensure the request’s body integrity and to confirm that its content has not changed.
Possible values: <= 45 characters
A unique identifier used to ensure idempotent behavior. If the business application request fails or you receive a timeout you can retry the request with the same Idempotency-Key to guarantee that only one business object is created.
The User-Agent request header contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent.
The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Can be set to */*
.
The Content-Type entity header is used to indicate the media type of the resource.
- application/json
Body
Array [
]
Possible values: <= 10 characters
, >= 100
and <= 100000000
A positive integer in the smallest currency unit between 1.00PLN and 1,000,000.00PLN.
Possible values: [PLN
, EUR
, USD
, GBP
, CZK
]
Default value: PLN
Important: Currently
EUR
,USD
,GBP
,CZK
currencies are supported only for card payments.If you are interested in processing card payments in foreign currencies, please contact us at support@paynow.pl
Possible values: <= 100 characters
Unique identifier given by Merchant to this payment request
Possible values: <= 255 characters
Payment description displayed in the web interface
Possible values: <= 1000 characters
The URL that the buyer will be redirected to, after making payment. This URL overrides return_url
value from PoS configuration
buyer
object
required
Information about the buyer
Possible values: <= 50 characters
Buyer's e-mail address
Possible values: <= 50 characters
Buyer's first name
Possible values: <= 50 characters
Buyer's last name
phone
object
Phone number with country calling code
Possible values: <= 5 characters
Must consist of 1-4 digits preceded by a plus (+) character
Possible values: <= 10 characters
address
object
Buyer's billing and shipping addresses. Required to initiate PayPo payment.
billing
object
Possible values: <= 100 characters
, >= 1
Possible values: <= 16 characters
Possible values: <= 16 characters
Possible values: <= 10 characters
, >= 1
, Value must match regular expression ^[A-Z0-9-_ ]+$
Possible values: >= 2 characters
and <= 100 characters
Possible values: <= 50 characters
Possible values: >= 2 characters
and <= 2 characters
Country code (ISO 3166-1 alfa-2)
shipping
object
Possible values: <= 100 characters
, >= 1
Possible values: <= 16 characters
Possible values: <= 16 characters
Possible values: <= 10 characters
, >= 1
, Value must match regular expression ^[A-Z0-9-_ ]+$
Possible values: >= 2 characters
and <= 100 characters
Possible values: <= 50 characters
Possible values: >= 2 characters
and <= 2 characters
Country code (ISO 3166-1 alfa-2)
Possible values: <= 35 characters
Default value: pl-PL
Buyer's language tag compliant with BCP47/RFC5646.
Possible values: <= 100 characters
Buyer's external system identifier
Fingerprint of Buyer’s device. See what should be included here
orderItems
object[]
List of order items
Possible values: <= 120 characters
Item`s name
Possible values: <= 120 characters
Producer`s name
Possible values: <= 1000 characters
Item`s category
Possible values: <= 10 characters
Quantity
Possible values: <= 10 characters
Single item price in the smallest currency unit
Possible values: >= 60
and <= 864000
Timeout for transaction execution [seconds]
Possible values: <= 30 characters
Payout account for Mass Collect, overriding default payout account; required only in Mass Collect payments
Responses
- 201
- 400
- 401
- 404
- 500
- 503
Created
- application/json
- Schema
- Example (from schema)
Schema
Address to redirect the buyer in case of authorizing payment on provider site
Unique ID of a payment generated by Paynow
Possible values: [NEW
, PENDING
, ERROR
]
Status of the payment right after submitting a payment request. More information you can find here.
{
"redirectUrl": "https://api.sandbox.paynow.pl/PBLX-123-435-213?token=......",
"paymentId": "PBLX-123-435-213"
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Error status code
errors
object[]
required
Possible values: [CONFLICT
, FORBIDDEN
, NOT_FOUND
, RATE_LIMIT_REACHED
, SYSTEM_TEMPORARILY_UNAVAILABLE
, UNAUTHORIZED
, VALIDATION_ERROR
, VERIFICATION_FAILED
, PAYMENT_METHOD_NOT_AVAILABLE
, PAYMENT_AMOUNT_TOO_SMALL
, PAYMENT_AMOUNT_TOO_LARGE
, IDEMPOTENCY_KEY_MISSING
, SIGNATURE_MISSING
]
Error type
Error description
{
"statusCode": 0,
"errors": [
{
"errorType": "CONFLICT",
"message": "string"
}
]
}
{
"statusCode": 400,
"errors": [
{
"errorType": "VALIDATION_ERROR",
"message": "Missing field XXX"
},
{
"errorType": "VALIDATION_ERROR",
"message": "Invalid format of field YYY"
}
]
}
Unauthorized, invalid or missing credentials
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
- UnauthorizedErrorDetails
]
Error status code
errors
object[]
required
oneOf
Possible values: [UNAUTHORIZED
]
Error type
Error description
{
"statusCode": 0,
"errors": [
{}
]
}
{
"statusCode": 401,
"errors": [
{
"errorType": "UNAUTHORIZED",
"message": "Unauthorized, invalid or missing credentials"
}
]
}
Not found
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Error status code
errors
object[]
required
Possible values: [NOT_FOUND
]
Error type
Error description
{
"statusCode": 0,
"errors": [
{
"errorType": "NOT_FOUND",
"message": "string"
}
]
}
{
"statusCode": 404,
"errors": [
{
"errorType": "NOT_FOUND",
"message": "Resource not found"
}
]
}
Internal server error
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Error status code
errors
object[]
required
Possible values: [INTERNAL_SERVER_ERROR
]
Error type
Error description
{
"statusCode": 0,
"errors": [
{
"errorType": "INTERNAL_SERVER_ERROR",
"message": "string"
}
]
}
{
"statusCode": 500,
"errors": [
{
"errorType": "INTERNAL_SERVER_ERROR",
"message": "Internal server error"
}
]
}
Service is temporarily unavailable
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Error status code
errors
object[]
required
Possible values: [SYSTEM_TEMPORARILY_UNAVAILABLE
]
Error type
Error description
{
"statusCode": 0,
"errors": [
{
"errorType": "SYSTEM_TEMPORARILY_UNAVAILABLE",
"message": "string"
}
]
}
{
"statusCode": 503,
"errors": [
{
"errorType": "SYSTEM_TEMPORARILY_UNAVAILABLE",
"message": "Service is temporarily unavailable"
}
]
}