Create a payment
POST/v3/payments
Request to create a payment
Request
Header Parameters
Unique key used to authenticate API requests.
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
required
Request body for payment request
Array [
]
Array [
]
A positive integer in the smallest currency unit between 1.00PLN and 1,000,000.00PLN.
Possible values: <= 10 characters, >= 100 and <= 100000000
Important: Currently
EUR,USD,GBPcurrencies 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: [PLN, EUR, USD, GBP]
PLNUnique identifier given by Merchant to this payment request
Possible values: <= 100 characters
Payment description displayed in the web interface
Possible values: <= 255 characters
Unique identifier of the predefined payment method (e.g. 2202 for recurring card payments)
paymentMethodData
object
Additional data specific to the selected payment method. Provide either card or blik (never both in the same request).
card
object
Card payment method data (widget mode, one-click tokenization, or recurring card payments).
Controls how the card payment form is presented for one-time card payments (2002) and initial recurring CIT payments (2202) (REDIRECT redirects to the Paynow paywall; WIDGET returns widgetUrl for <iframe> embedding when Card White Label is enabled for the shop, or automatically falls back to REDIRECT and returns redirectUrl otherwise — requires continueUrl, buyer.ipAddress, and buyer.userAgent). Must not be provided for MIT (NEXT_CHARGE) or saved-card tokenized payments.
Possible values: [REDIRECT, WIDGET]
REDIRECTtokenization
object
Card tokenization and recurring payment parameters.
Saved card token. Required for subsequent recurring charges (NEXT_CHARGE) and White Label payments with a saved card; must not be provided for initial recurring payments (REGISTER_TOKEN_AND_CHARGE).
recurring
object
Recurring card payment configuration (used with paymentMethodId: 2202 and buyer.externalId). See Saved cards and subscriptions.
REGISTER_TOKEN_AND_CHARGE initiates the first payment (CIT) that registers the card token and creates a subscription; NEXT_CHARGE initiates a subsequent Merchant-Initiated Transaction (MIT).
Possible values: [REGISTER_TOKEN_AND_CHARGE, NEXT_CHARGE]
Active subscription identifier created after the initial CIT payment. Required when action is NEXT_CHARGE; must not be provided when action is REGISTER_TOKEN_AND_CHARGE.
blik
object
BLIK White Label payment data.
6-digit BLIK authorization code.
The URL that the buyer will be redirected to after making a payment. This URL overrides the return_url value from PoS configuration. Required when paymentMethodData.card.cardFormBehaviour is WIDGET.
Possible values: <= 1000 characters
buyer
object
required
Information about the buyer
Buyer's e-mail address
Possible values: <= 50 characters
Buyer's first name
Possible values: <= 50 characters
Buyer's last name
Possible values: <= 50 characters
phone
object
Phone number with country calling code
Must consist of 1-4 digits preceded by a plus (+) character
Possible values: <= 5 characters
Possible values: <= 10 characters
address
object
Buyer's billing and shipping addresses. Required to initiate a PayPo payment and the initial recurring card (CIT) 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
Country code (ISO 3166-1 alfa-2)
Possible values: >= 2 characters and <= 2 characters
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
Country code (ISO 3166-1 alfa-2)
Possible values: >= 2 characters and <= 2 characters
Buyer's language tag compliant with BCP47/RFC5646.
Possible values: <= 35 characters
pl-PLBuyer's external system identifier
Possible values: <= 100 characters
Fingerprint of Buyer’s device. See what should be included here
Buyer's IP address
Possible values: <= 150 characters
Buyer's user agent
Possible values: <= 1000 characters
orderItems
object[]
Optional list of order items. When non-empty, each item requires name, category, and quantity (>= 1), plus type and frequency when paymentMethodId is 2202 – see validation rules.
Item's name (non-blank). Required for every item when orderItems is non-empty.
Possible values: <= 120 characters
Producer's name (optional).
Possible values: <= 120 characters
Item's category (non-blank). Required for every item when orderItems is non-empty.
Possible values: <= 1000 characters
Item quantity (>= 1). Required for every item when orderItems is non-empty.
Possible values: <= 10 characters, >= 1
Single item price in the smallest currency unit (>= 0, defaults to 0 if omitted).
Possible values: <= 10 characters
Item type (case-sensitive, uppercase). Required when orderItems is non-empty and paymentMethodId is 2202; optional for other payment methods.
Possible values: [BUNDLE, DIGITAL, DIGITAL_SERVICE, DONATION, GIFT_CARD, PHYSICAL, SERVICE]
Billing frequency of the item (case-sensitive, uppercase). Required when orderItems is non-empty and paymentMethodId is 2202; optional for other payment methods.
Possible values: [ANNUAL, MONTHLY, QUARTERLY, WEEKLY]
Timeout for transaction execution [seconds]. Default and maximum values depend on the payment method – see limits per payment method.
Possible values: >= 60 and <= 864000
Payout account for Mass Collect, overriding default payout account; required only in Mass Collect payments
Possible values: <= 30 characters
Voucher reservation ID to make payment with voucher code.
transfers
object[]
Sellers transfer list used only for Marketplace payments
Seller ID
Possible values: <= 15 characters
Optional unique identifier given by Merchant to this transfer
Possible values: <= 100 characters
Transfer gross amount in the smallest currency unit
Possible values: <= 10 characters, >= 1 and <= 100000000
Marketplace transfer fee amount in the smallest currency unit. Must be lower than the gross amount
Possible values: <= 10 characters, <= 100000000
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
Address of the embedded card payment widget returned when paymentMethodData.card.cardFormBehaviour is set to WIDGET and Card White Label is enabled for the shop (redirectUrl is null in that case; if Card White Label is not enabled, Paynow automatically falls back to REDIRECT and returns redirectUrl instead)
Unique ID of a payment generated by Paynow
Status of the payment right after submitting a payment request. More information you can find here.
Possible values: [NEW, PENDING, ERROR]
{
"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 [
- PaymentErrorDetails
- BlikErrorDetails
]
Error status code
errors
object[]
required
oneOf
Error details
Error type
Possible values: [CONFLICT, FORBIDDEN, VALIDATION_ERROR, VERIFICATION_FAILED, IDEMPOTENCY_KEY_MISSING, SIGNATURE_MISSING, PAYMENT_METHOD_NOT_AVAILABLE, PAYMENT_AMOUNT_TOO_SMALL, PAYMENT_AMOUNT_TOO_LARGE, SELLER_NOT_FOUND, SELLER_CLOSED, INVALID_SUM_OF_PAYMENT_GROSS_AMOUNT, PAYMENT_FEE_AMOUNT_TOO_LARGE, INCONSISTENT_SUBSCRIPTION_DATA, INVALID_PAYMENT_TOKEN_STATUS, INVALID_SUBSCRIPTION_STATUS]
Error description
Object ID related to given error. Applies only to error types [SELLER_NOT_FOUND, SELLER_CLOSED]
Error details
Blik error type
Possible values: [AUTHORIZATION_CODE_INVALID, AUTHORIZATION_CODE_EXPIRED, AUTHORIZATION_CODE_USED]
Blik error description
{
"statusCode": 0,
"errors": [
{},
{}
]
}
{
"statusCode": 400,
"errors": [
{
"errorType": "VALIDATION_ERROR",
"message": "Missing field XXX"
},
{
"errorType": "SELLER_NOT_FOUND",
"message": "Seller not found",
"value": "SMA-U11-L41-GAA"
}
]
}
Unauthorized, invalid or missing credentials
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
- UnauthorizedErrorDetails
]
Error status code
errors
object[]
required
oneOf
Error details
Error type
Possible values: [UNAUTHORIZED]
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
Error type
Possible values: [NOT_FOUND]
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
Error type
Possible values: [INTERNAL_SERVER_ERROR]
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
Error type
Possible values: [SYSTEM_TEMPORARILY_UNAVAILABLE]
Error description
{
"statusCode": 0,
"errors": [
{
"errorType": "SYSTEM_TEMPORARILY_UNAVAILABLE",
"message": "string"
}
]
}
{
"statusCode": 503,
"errors": [
{
"errorType": "SYSTEM_TEMPORARILY_UNAVAILABLE",
"message": "Service is temporarily unavailable"
}
]
}