Skip to main content

API Integration

Payment Links use the HUB2 API. The available endpoints are listed in the following documentation:

API Payment Links

Authentication

Your integration uses the same HUB2 API keys for authentication. The key must have the following permissions:
  • Api.payment_intent_create: create and close payment links
  • Api.payment_intent_read: retrieve and list payment links

Permissions configuration

API Endpoints

  • POST /payment-links: create a payment link and define the accepted payment methods and providers. The payment intent and the payment are created as the customer goes through the payment page. Example:
  • type defaults to single_use (one successful payment). Use multi_use to accept several payments, optionally capped with maximumPayments.
  • When expirationDate is omitted or already in the past, the link expires 15 minutes after creation.
  • successUrl and failureUrl must use the https scheme.
  • PATCH /payment-links/{id}/close: close a payment link before it expires
  • GET /payment-links: list the payment links you created
  • GET /payment-links/{id}: retrieve a payment link with its payment attempts

Webhooks

Payment links use the same webhooks as payments. If you have already configured webhooks for payments, no additional step is required. Otherwise, see:

Webhooks Integration Guide