Skip to main content
POST
/
contacts
/
{id}
/
payment-email
Link a payment email to a contact
curl --request POST \
  --url https://api.getfernand.com/contacts/{id}/payment-email \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "source": "STRIPE",
  "email": "billing@piedpiper.com"
}
'
{
  "subscription_status": "active",
  "subscription_start": "2023-11-07T05:31:56Z",
  "financials": {}
}
Associates a payment email from a payment processor (Stripe, Paddle, or Lemon Squeezy) with a contact. If the payment email differs from the contact’s primary email, it creates or updates the payment email link. The endpoint then either propagates existing financial data or triggers an asynchronous task to fetch and propagate financial information from the payment processor. Returns financial data immediately if available, otherwise returns empty response while processing continues in the background.

Authorizations

X-API-Key
string
header
required

Authenticate your account by including your secret key in API requests. You can manage your API keys in the Dashboard.

Authentication to the API is performed by using the HTTP Header X-API-Key.

Path Parameters

id
integer
required

ID of the contact to link the payment email to.

Body

application/json
source
enum<string>
required

Payment processor source (case-insensitive, will be converted to uppercase).

Available options:
STRIPE,
PADDLE,
LEMON
Example:

"STRIPE"

email
string<email>
required

Payment email address to link to the contact.

Example:

"billing@piedpiper.com"

Response

Payment email linked successfully with financial data returned.

subscription_status
enum<string> | null
Available options:
active,
past_due,
unpaid,
canceled,
churned,
incomplete,
trialing
subscription_start
string<date-time> | null
financials
object