Skip to main content
POST
/
payment-links
{
  "paymentLinkId": "j47ac10b-58cc-4372-a567-0e02b2c3d479",
  "url": "https://checkout.yourapp.com/pay/j47ac10b-58cc-4372-a567-0e02b2c3d479",
  "status": "ACTIVE",
  "description": "Pay your monthly subscription",
  "paymentId": "k47ac10b-58cc-4372-a567-0e02b2c3d479",
  "expiresAt": "2024-12-31T23:59:59Z",
  "completedAt": "2024-01-15T14:30:00Z",
  "createdAt": "2024-01-15T10:00:00Z",
  "updatedAt": "2024-01-15T10:00:00Z",
  "metadata": {}
}

Authorizations

X-API-Key
string
header
required

An API key that grants access to the Connect API. You can create and manage API keys in the portal.

Headers

X-Idempotency-Key
string

A unique key to ensure idempotency of requests. If a request with the same key has already been processed, the same result will be returned. The key must be unique for each distinct operation. Keys are expired after 24 hours, but we recommend using a new key for each request.

Modified requests with the same idempotency keys are rejected with a 409 Conflict status code.

Maximum length: 256

Body

application/json

Payment link creation request.

Request to create a new payment link for processing payment for an order or invoice. Either orderId or invoiceId must be provided, not both.

orderId
string

The unique identifier of the order to create a payment link for. Either orderId or invoiceId must be provided, not both.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

invoiceId
string

The unique identifier of the invoice to create a payment link for. Either orderId or invoiceId must be provided, not both.

Example:

"123e4567-e89b-12d3-a456-426614174000"

paymentProfileId
string

You can add the previously saved payment method to prefill in the payment details.

Example:

"6ba7b810-9dad-11d1-80b4-00c04fd430c8"

savePaymentProfile
boolean

Whether to save the payment profile for future use. Only applicable if the customer is authenticated or for the initial order. Defaults to false.

Example:

true

setAsDefaultPaymentProfile
boolean

Whether to set the payment method as the default for future payments. Only applicable if savePaymentProfile is true and the customer is authenticated or for the initial order. Defaults to false.

Example:

false

description
string

Optional description to display on the payment page.

Example:

"Payment for Telness mobile subscription"

returnUrl
string<uri>

URL to redirect customers to after successful payment.

Example:

"https://your-domain.com/success"

cancelUrl
string<uri>

URL to redirect customers to if they cancel the payment.

Example:

"https://your-domain.com/cancel"

metadata
object

A set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format.

Response

Payment link created successfully.

A hosted payment link created from a payment intent that can be shared with customers.

Unique identifier for the payment link.

Example:

"j47ac10b-58cc-4372-a567-0e02b2c3d479"

url
string<uri>
required

The shareable URL for the payment link.

Example:

"https://checkout.yourapp.com/pay/j47ac10b-58cc-4372-a567-0e02b2c3d479"

status
enum<string>
required

Current status of the payment link.

Available options:
ACTIVE,
EXPIRED,
COMPLETED,
CANCELLED
createdAt
string<date-time>
required

When the payment link was created.

Example:

"2024-01-15T10:00:00Z"

updatedAt
string<date-time>
required

When the payment link was last updated.

Example:

"2024-01-15T10:00:00Z"

description
string

Optional description for the payment link.

Example:

"Pay your monthly subscription"

paymentId
string

ID of the completed payment (if status is completed).

Example:

"k47ac10b-58cc-4372-a567-0e02b2c3d479"

expiresAt
string<date-time>

When the payment link expires.

Example:

"2024-12-31T23:59:59Z"

completedAt
string<date-time>

When the payment was completed (if status is completed).

Example:

"2024-01-15T14:30:00Z"

metadata
object

A set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format.

I