Skip to content
payrocdevelopers

Share payment link

Browse API reference

POST/payment-links/{paymentLinkId}/sharing-eventssharePaymentLink

Use this method to email a payment link to a customer.

To email a payment link, you need its paymentLinkId. Our gateway returned the paymentLinkId in the response of the Create Payment Link method.

Note: If you don't have the paymentLinkId, use our List Payment Links method to search for the payment link.

In the request, you must provide the recipient's name and email address.

In the response, our gateway returns a sharingEventId, which you can use to List Payment Link Sharing Events.

Parameters

NameInTypeDescription
Idempotency-KeyRequiredheaderstring

Unique identifier that you generate for each request. You must use the UUID v4 format for the identifier. For more information about the idempotency key, go to Idempotency.

paymentLinkIdRequiredpathstring

Unique identifier that we assigned to the payment link.

Request body

application/json
  • emailobject
    Object that contains the information about a sharing event that the merchant sent by email.
    • merchantCopyboolean
      Indicates if we send a copy of the email to the merchant. By default, we don't send a copy to the merchant.
    • messagestring
      Message that the merchant sends with the payment link.≤ 1024 chars
    • recipientsobject[]required
      Array that contains the recipients of the payment link.
      • emailstringrequired
        Recipient's email address.6–128 chars
      • namestringrequired
        Recipient's name.1–48 chars
    • sharingMethodstringrequired
      Method that the merchant uses to share the payment link.email

Responses

Successful request. We return a polymorphic object that contains information about how the merchant shared a payment link.

201 Created · application/json
{
  "dateTime": "2024-07-02T15:30:00Z",
  "message": "Dear Sarah,\n\nYou can pay for your order via the link below.\n",
  "recipients": [
    {
      "email": "sarah.hopper@example.com",
      "name": "Sarah Hazel Hopper"
    }
  ],
  "sharingEventId": "GTZH5WVXK9",
  "sharingMethod": "email"
}
Response schema · 9 fields
  • emailobject
    Object that contains the information about a sharing event that the merchant sent by email.
    • dateTimestringdate-time
      Date and time that the merchant shared the link. Our gateway returns this value in the ISO 8601 format.
    • merchantCopyboolean
      Indicates if we send a copy of the email to the merchant. By default, we don't send a copy to the merchant.
    • messagestring
      Message that the merchant sends with the payment link.≤ 1024 chars
    • recipientsobject[]required
      Array that contains the recipients of the payment link.
      • emailstringrequired
        Recipient's email address.6–128 chars
      • namestringrequired
        Recipient's name.1–48 chars
    • sharingEventIdstring
      Unique identifier that we assigned to the sharing event.10–10 chars
    • sharingMethodstringrequired
      Method that the merchant uses to share the payment link.email

Used in workflows

Search documentation

API reference169
Guides118
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer