Pine LabsDOCS

Create subscription with SBMD enabled

POST/ps/public/subscriptions/sbmd

Endpoint used by CMS to create subscription with SBMD enabled

Requires Bearer token. Get token →

Request Body

NameTypeDescription
merchant_subscription_reference
stringrequired

Unique reference ID for the subscription provided by the merchant

customer_id
stringrequired

Unique identifier for the customer associated with the subscription

plan_details
objectrequired
reserve_amount
integerrequired

Amount to be reserved

currency
INR | USDrequired

Currency code for the subscription

INRUSD
validity_days
integerrequired

Validity of the subscription in days

description
stringrequired

Description of the SBMD Plan

callback_url
string

URL

expire_after
integer

duration after which subscription expires

terms_accepted
boolean

pending

merchant_metadata
object

A key-value pair of merchant-specific metadata.

Response

NameTypeDescription
subscription_id
string

Unique identifier for the created subscription

order_id
string

order_id for the created order

customer_id
string

customer_id passed

status
string

Current status of the subscription after creation

start_date
string

Subscription start timestamp

end_date
string

Subscription end timestamp

plan_details
object
reserve_amount
integerrequired

Amount to be reserved

currency
INR | USDrequired

Currency code for the subscription

INRUSD
validity_days
integerrequired

Validity of the subscription in days

description
stringrequired

Description of the SBMD Plan

expires_at
string
redirect_url
string

RedirectURL

Status Codes

200Success
400Bad Requet
500Internal Server Error
Request
curl --request POST \
  --url https://pluraluat.v2.pinepg.in/ps/public/subscriptions/sbmd \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "merchant_subscription_reference": "sub_ref_12345",
  "customer_id": "cust_abc123",
  "plan_details": {
    "reserve_amount": 10000,
    "currency": "INR",
    "validity_days": 0,
    "description": "your_description"
  },
  "merchant_metadata": {
    "key1": "DD",
    "key2": "XOF"
  }
}'

Run this request

200 OK
{
  "subscription_id": "sub_xyz789",
  "status": "ACTIVE",
  "plan_details": {
    "reserve_amount": 10000,
    "currency": "INR",
    "validity_days": 0,
    "description": "your_description"
  }
}