Create a Payment Links

​

Creates a payment link.

Body
required
application/json

Request parameters for creating a new payment link.

  • Request parameters for creating a new payment link.

    • amount
      Type: integerFormat: int64
      required

      Amount charged in smallest currency unit

    • currency
      Type: string · CurrencyCode
      required

      ISO 4217 currency codes (alpha3) supported for payments

    • after_completion
      Type: object · AfterCompletion

      After completion behavior for the Checkout Session.

    • billing_address_collection
      Type: string · BillingAddressCollectionenum

      Specify whether Checkout should collect the customer's billing address. Defaults to auto.

      values
      • auto

        Checkout will only collect the billing address when necessary.

      • required

        Checkout will always collect the customer's billing address.

    • client_customer_id
      Type: string | null

      An identifier of the customer in the merchant's system. Used to associate the Checkout and corresponding payments created from the Checkout. Required for SEPA payments - this will ensure that your customer is given a virtual iban that is unique to them and will enable Paypercut to reconcile the payment.

    • client_reference_id
      Type: string | null

      A free-form reference from the merchant's system. Typically used to identify the checkout in the merchant's system. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems.

    • description
      Type: string | null

      A free-form reference to describe the checkout

    • expires_at
      Type: stringFormat: date-time

      Expiry time for the payment link. After this time, the payment link will no longer be available for payment. Defaults to 24h after creation.

    • line_items
      Type: array object[] · LineItem[]

      Details about the products sold or services provided

    • livemode
      Type: boolean

      Has the value true if the object exists in live mode or the value false if the object exists in test mode.

    • mode
      Type: string · CheckoutSessionModeenum

      The mode of the Checkout Session.

      values
      • payment

        Standard one-time payment.

      • setup

        Set up a payment method for future use.

      • subscription

        Coming soon. Not available yet.

      • bnpl

        Buy now, pay later.

    • on_behalf_of
      Type: string
      max length:  
      100

      The account on behalf of which to charge.

    • payment_method_configuration
      Type: string | null

      Reference to the payment method configuration for the types that customers can use.

    • redirect_url
      Type: string | null
      max length:  
      1000

      URL to which the customer should be sent after the payment. Any payment results will use this URL.

    • restrictions
      Type: object · PaymentLinkRestrictions

      Settings that restrict the usage of a payment link.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/payment-links
curl https://api.paypercut.io/v1/payment-links \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "amount": 2000,
  "on_behalf_of": "",
  "payment_method_configuration": null,
  "expires_at": "",
  "line_items": [
    {
      "quantity": 2,
      "price_data": {
        "active": true,
        "billing_scheme": "per_unit",
        "created": 1,
        "currency": "",
        "livemode": true,
        "lookup_key": null,
        "product": "01K755J9SV2364REVHB915Z2FW",
        "product_data": {
          "active": true,
          "name": "",
          "description": "",
          "unit_label": "",
          "id": ""
        },
        "recurring": {
          "interval": "day",
          "interval_count": 1,
          "meter": null,
          "usage_type": "licensed"
        },
        "type": "one_time",
        "unit_amount": null,
        "unit_amount_decimal": null,
        "id": ""
      },
      "metadata": {
        "additionalProperty": ""
      }
    }
  ],
  "redirect_url": null,
  "client_reference_id": null,
  "client_customer_id": null,
  "description": null,
  "livemode": true,
  "after_completion": {
    "type": "redirect",
    "redirect": {
      "url": ""
    },
    "hosted": {
      "custom_message": ""
    }
  },
  "mode": "payment",
  "restrictions": {
    "completed_sessions": {
      "count": 1,
      "limit": 1
    }
  },
  "billing_address_collection": "auto",
  "currency": "EUR"
}'
{
  "id": "string",
  "url": "string",
  "billing_address_collection": "auto"
}

Payment Link created successfully.

  • Account Setup
  • External Accounts
  • Identity
  • Checkouts
  • Payment Links
  • Payments
  • Products
  • Billing
  • Customers
  • Access
  • Reporting
  • Events
logologo
Dashboard Docs API Reference BNPL API Reference