Options
All
  • Public
  • Public/Protected
  • All
Menu

The payment order object.

Hierarchy

  • PaymentOrder

Index

Properties

amount: number

The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK.

integer
currency: string

The currency of the payment.

description: string

The description of the payment order.

generatePaymentToken?: boolean

Generate a payment token with the paymentOrder. Used for one-click payments in the future.

generateRecurrenceToken?: boolean

Generate a recurrence token with the paymentOrder. Used for recurring payments, such as subscriptions.

language: string

The language of the payer.

The operation that the payment order is supposed to perform.

payeeInfo: { orderReference?: string; payeeId: string; payeeName?: string; payeeReference: string; productCategory?: string; subsite?: string }

The payeeInfo object, containing information about the payee (the recipient of the money). See payeeInfo for details.

Type declaration

  • Optional Readonly orderReference?: string

    The order reference should reflect the order reference found in the merchant’s systems.

    maxlen

    50

  • Readonly payeeId: string

    The ID of the payee, usually the merchant ID.

  • Optional Readonly payeeName?: string

    The name of the payee, usually the name of the merchant.

  • Readonly payeeReference: string

    A unique reference from the merchant system. It is set per operation to ensure an exactly-once delivery of a transactional operation. See payeeReference for details. In Invoice Payments payeeReference is used as an invoice/receipt number, if the receiptReference is not defined.

    maxlen

    30

  • Optional Readonly productCategory?: string

    A product category or number sent in from the payee/merchant. This is not validated by Swedbank Pay, but will be passed through the payment process and may be used in the settlement process.

  • Optional Readonly subsite?: string

    The subsite field can be used to perform split settlement on the payment. The subsites must be resolved with Swedbank Pay reconciliation before being used.

    maxlen

    40

The payer object containing information about the payer relevant for the payment order.

paymentToken?: string

The paymentToken to use to prefill the forms during checkout to make it "one click".

productName: "Checkout3"

Used to tag the payment as Checkout v3. Mandatory for Checkout v3, as you won’t get the operations in the response without submitting this field.

recurrenceToken?: string

Required when operation: Recur, use this recurrence token for a recurring payment.

urls: { callbackUrl?: string; cancelUrl?: string; completeUrl: string; hostUrls: readonly string[]; paymentUrl?: string; termsOfServiceUrl?: string }

The urls object, containing the URLs relevant for the payment order.

Type declaration

  • Optional Readonly callbackUrl?: string

    The URL to the API endpoint receiving POST requests on transaction activity related to the payment order. Read more about callbackUrl

  • Optional Readonly cancelUrl?: string

    The URL to redirect the payer to if the payment is cancelled, either by the payer or by the merchant trough an abort request of the payment or paymentorder.

  • Readonly completeUrl: string

    The URL that Swedbank Pay will redirect back to when the payer has completed his or her interactions with the payment. This does not indicate a successful payment, only that it has reached a final (complete) state. A GET request needs to be performed on the payment order to inspect it further. See completeUrl for details.

  • Readonly hostUrls: readonly string[]

    The array of URLs valid for embedding of Swedbank Pay Hosted Views.

  • Optional Readonly paymentUrl?: string

    For our Seamless Views, the field called paymentUrl will be used when the payer is redirected out of the Seamless View (the iframe). The payer is redirected out of frame when selecting the payment instrument.

    The URL should represent the page of where the Payment Order Seamless View was hosted originally, such as the checkout page, shopping cart page, or similar. Basically, paymentUrl should be set to the same URL as that of the page where the JavaScript for the Seamless View was added to in order to initiate the payment process.

    Please note that the paymentUrl must be able to invoke the same JavaScript URL from the same Payment Order as the one that initiated the payment process originally, so it should include some sort of state identifier in the URL. The state identifier is the ID of the order, shopping cart or similar that has the URL of the Payment stored.

  • Optional Readonly termsOfServiceUrl?: string

    The URL to the terms of service document which the payer must accept in order to complete the payment. **HTTPS is a requirement.

userAgent: string

The user agent of the payer. Should typically be set to the value of the User-Agent header sent by the payer’s web browser.

vatAmount: number

The payment’s VAT (Value Added Tax) amount, entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK. The vatAmount entered will not affect the amount shown on the payment page, which only shows the total amount. This field is used to specify how much of the total amount the VAT will be. Set to 0 (zero) if there is no VAT amount charged.

integer

Generated using TypeDoc