Skip to main content

Create a payment

POST 

/v3/payments

Request to create a payment

Request​

Header Parameters

    Api-Key stringrequired

    Unique key used to authenticate API requests.

    Signature stringrequired

    The Signature header is used to ensure the request’s body integrity and to confirm that its content has not changed.

    Idempotency-Key stringrequired

    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.

    User-Agent string

    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.

    Accept stringrequired

    The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Can be set to */*.

    Content-Type stringrequired

    The Content-Type entity header is used to indicate the media type of the resource.

Body

required

Request body for payment request

    amount int64required

    A positive integer in the smallest currency unit between 1.00PLN and 1,000,000.00PLN.

    Possible values: <= 10 characters, >= 100 and <= 100000000

    currency Currency (string)

    Important: Currently EUR,USD,GBP 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: [PLN, EUR, USD, GBP]

    Default value: PLN
    externalId stringrequired

    Unique identifier given by Merchant to this payment request

    Possible values: <= 100 characters

    description stringrequired

    Payment description displayed in the web interface

    Possible values: <= 255 characters

    paymentMethodId integer

    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).

    cardFormBehaviour string

    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]

    Default value: REDIRECT

    tokenization

    object

    Card tokenization and recurring payment parameters.

    token string

    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.

    action stringrequired

    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]

    subscriptionId string

    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.

    authorizationCode string

    6-digit BLIK authorization code.

    continueUrl string

    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

    email emailrequired

    Buyer's e-mail address

    Possible values: <= 50 characters

    firstName string

    Buyer's first name

    Possible values: <= 50 characters

    lastName string

    Buyer's last name

    Possible values: <= 50 characters

    phone

    object

    Phone number with country calling code

    prefix stringrequired

    Must consist of 1-4 digits preceded by a plus (+) character

    Possible values: <= 5 characters

    number integerrequired

    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

    street string

    Possible values: <= 100 characters, >= 1

    houseNumber string

    Possible values: <= 16 characters

    apartmentNumber string

    Possible values: <= 16 characters

    zipcode string

    Possible values: <= 10 characters, >= 1, Value must match regular expression ^[A-Z0-9-_ ]+$

    city string

    Possible values: >= 2 characters and <= 100 characters

    county string

    Possible values: <= 50 characters

    country string

    Country code (ISO 3166-1 alfa-2)

    Possible values: >= 2 characters and <= 2 characters

    shipping

    object

    street string

    Possible values: <= 100 characters, >= 1

    houseNumber string

    Possible values: <= 16 characters

    apartmentNumber string

    Possible values: <= 16 characters

    zipcode string

    Possible values: <= 10 characters, >= 1, Value must match regular expression ^[A-Z0-9-_ ]+$

    city string

    Possible values: >= 2 characters and <= 100 characters

    county string

    Possible values: <= 50 characters

    country string

    Country code (ISO 3166-1 alfa-2)

    Possible values: >= 2 characters and <= 2 characters

    locale string

    Buyer's language tag compliant with BCP47/RFC5646.

    Possible values: <= 35 characters

    Default value: pl-PL
    externalId string

    Buyer's external system identifier

    Possible values: <= 100 characters

    deviceFingerprint string

    Fingerprint of Buyer’s device. See what should be included here

    ipAddress string

    Buyer's IP address

    Possible values: <= 150 characters

    userAgent string

    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.

  • Array [

  • name stringrequired

    Item's name (non-blank). Required for every item when orderItems is non-empty.

    Possible values: <= 120 characters

    producer string

    Producer's name (optional).

    Possible values: <= 120 characters

    category stringrequired

    Item's category (non-blank). Required for every item when orderItems is non-empty.

    Possible values: <= 1000 characters

    quantity int64required

    Item quantity (>= 1). Required for every item when orderItems is non-empty.

    Possible values: <= 10 characters, >= 1

    price int64

    Single item price in the smallest currency unit (>= 0, defaults to 0 if omitted).

    Possible values: <= 10 characters

    type string

    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]

    frequency string

    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]

  • ]

  • validityTime integer

    Timeout for transaction execution [seconds]. Default and maximum values depend on the payment method – see limits per payment method.

    Possible values: >= 60 and <= 864000

    payoutAccount string

    Payout account for Mass Collect, overriding default payout account; required only in Mass Collect payments

    Possible values: <= 30 characters

    voucherReservationId string

    Voucher reservation ID to make payment with voucher code.

    transfers

    object[]

    Sellers transfer list used only for Marketplace payments

  • Array [

  • sellerId stringrequired

    Seller ID

    Possible values: <= 15 characters

    externalId string

    Optional unique identifier given by Merchant to this transfer

    Possible values: <= 100 characters

    grossAmount int64required

    Transfer gross amount in the smallest currency unit

    Possible values: <= 10 characters, >= 1 and <= 100000000

    feeAmount int64required

    Marketplace transfer fee amount in the smallest currency unit. Must be lower than the gross amount

    Possible values: <= 10 characters, <= 100000000

  • ]

Responses​

Created

Schema

    redirectUrl string

    Address to redirect the buyer in case of authorizing payment on provider site

    widgetUrl string

    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)

    paymentId paymentIdrequired

    Unique ID of a payment generated by Paynow

    status string

    Status of the payment right after submitting a payment request. More information you can find here.

    Possible values: [NEW, PENDING, ERROR]

Loading...