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
| Method | URL |
|---|---|
| POST | https://api.payorc.com/subscriptions/v1/send_mail |
Please use the test credentials for sandbox testing.
Authentication
Include the following headers in every request:
| Header | Type | Description |
|---|---|---|
merchant-key | String | Your merchant key |
merchant-secret | String | Your 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.
| Field | Type | Required | Description |
|---|---|---|---|
data_id | String | Yes | Encrypted plan identifier from Plan List or create-plan response. |
email | String | Conditional | Comma-separated emails for new/external recipients (max 40). At least one of email or client_email is required. |
client_email | String | Conditional | Comma-separated emails for existing subscribers on your account (max 40). Must match a subscriber already in the system. |
subject | String | Yes | Email subject. Min 3, max 200 characters. Required on every send-mail request. |
plan_description | String | Yes | Plan description in the email body. Max 250 characters. Use "" if none. |
billing_frequency | Object | Yes | Same shape as create-plan. |
billing_frequency.frequency | String | Yes | daily, weekly, monthly, or yearly. |
billing_frequency.interval | Number | Yes | Billing interval. Min 1. |
installment_amount | Object | Yes | Installment amount object. |
installment_amount.currency | String | Yes | 3-letter currency code. |
installment_amount.value | Number | Yes | Installment amount. Min 1. |
terms | Object | Yes | Plan terms (same rules as create-plan). |
terms.unlimited | String | Yes | yes or no. |
terms.value | Number | Conditional | Required when terms.unlimited is no. |
terms.discount_term | Number | No | Discount term number. |
terms.discount_amount | Number | No | Discount amount. |
initial_payment_amount | Number | Yes | Initial payment amount. Min 1. |
final_payment_amount | Number | Yes | Final payment amount. Min 1. |
shipping_fee | Number | Yes | Shipping fee. Min 0. |
convenience_fee | Number | Yes | Convenience fee. Min 0. |
start_date | String | Yes | Plan start. Format: YYYY-MM-DD HH:mm. |
expiry_date | String | No | Plan expiry. Format: YYYY-MM-DD HH:mm. Must be after start if set. |
note | String | Yes | Additional 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)
| Field | Type | Description |
|---|---|---|
message | String | Human-readable status message |
status | String | success or error |
code | String | Status 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.