PayOrc
Subscription Plan

Send Subscription Plan Email

Send subscription plan details to customers via email with customizable recipients, subject, and plan information.

Send Subscription Plan Email

Version: 3.0.0

Generate an API Key for the Subscription channel before making requests.

Use this endpoint to send subscription plan details to customers via email. You can specify the recipient email addresses, CC recipients, subject line, and include the full plan details in the email body. This is useful for sharing plan information with potential subscribers.

Endpoint

MethodURL
POSThttps://api.payorc.com/subscriptions/v1/send_mail

Please use the test credentials for sandbox testing.

Authentication

Include the following headers in every request:

HeaderTypeDescription
merchant-keyStringYour merchant key
merchant-secretStringYour merchant secret

All API requests must be made over HTTPS. Requests made over plain HTTP will be rejected.

Request Body

Send plan details plus recipient information. Amount fields must be numbers. The plan must be Active and not expired.

FieldTypeRequiredDescription
data_idStringYesEncrypted plan identifier from Plan List or create-plan response.
emailStringConditionalComma-separated emails for new/external recipients (max 40). At least one of email or client_email is required.
client_emailStringConditionalComma-separated emails for existing subscribers on your account (max 40). Must match a subscriber already in the system.
subjectStringYesEmail subject. Min 3, max 200 characters. Required on every send-mail request.
plan_descriptionStringYesPlan description in the email body. Max 250 characters. Use "" if none.
billing_frequencyObjectYesSame shape as create-plan.
billing_frequency.frequencyStringYesdaily, weekly, monthly, or yearly.
billing_frequency.intervalNumberYesBilling interval. Min 1.
installment_amountObjectYesInstallment amount object.
installment_amount.currencyStringYes3-letter currency code.
installment_amount.valueNumberYesInstallment amount. Min 1.
termsObjectYesPlan terms (same rules as create-plan).
terms.unlimitedStringYesyes or no.
terms.valueNumberConditionalRequired when terms.unlimited is no.
terms.discount_termNumberNoDiscount term number.
terms.discount_amountNumberNoDiscount amount.
initial_payment_amountNumberYesInitial payment amount. Min 1.
final_payment_amountNumberYesFinal payment amount. Min 1.
shipping_feeNumberYesShipping fee. Min 0.
convenience_feeNumberYesConvenience fee. Min 0.
start_dateStringYesPlan start. Format: YYYY-MM-DD HH:mm.
expiry_dateStringNoPlan expiry. Format: YYYY-MM-DD HH:mm. Must be after start if set.
noteStringYesAdditional note in the email. Max 250 characters. Use "" if none.

Recipients: Provide at least one of email or client_email. Use email for prospects or new addresses; use client_email only for emails that already exist as subscribers on your merchant account. If client_email is set, subject is required (same as when email is set).

Response (200 OK)

FieldTypeDescription
messageStringHuman-readable status message
statusStringsuccess or error
codeStringStatus code (00 for success)

Code Examples

curl -X POST https://api.payorc.com/subscriptions/v1/send_mail \
  -H "Content-Type: application/json" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET" \
  -d '{
    "data_id": "ak80VjZGeURhT2hSM",
    "client_email": "",
    "email": "[email protected]",
    "subject": "subscription plan",
    "plan_description": "",
    "billing_frequency": {
        "frequency": "daily",
        "interval": 1
    },
    "installment_amount": {
        "currency": "AED",
        "value": 200
    },
    "terms": {
        "unlimited": "no",
        "value": 1,
        "discount_term": 1,
        "discount_amount": 90.5
    },
    "initial_payment_amount": 100,
    "final_payment_amount": 90,
    "shipping_fee": 30,
    "convenience_fee": 10,
    "start_date": "2027-01-15 10:00",
    "expiry_date": "2027-06-15 23:59",
    "note": ""
}'

Example Response

{
    "message": "Mail sent successfully",
    "status": "success",
    "code": "00"
}

Emails are sent asynchronously. The 200 OK response indicates the request was accepted, not that the email was delivered. Check your email service logs for delivery status.

On this page