Pine LabsDOCS

Create SBMD-Enabled Subscription

POST/ps/public/subscriptions/sbmd

Endpoint used by CMS to create subscription with SBMD enabled

Requires Bearer token. Get token →

Header Parameters

FieldDetails
Request-Timestamp
stringdate-time

ISO 8601 UTC timestamp of the request. Used for idempotency and audit.

Request-ID
string

Use a global unique identifier [GUID] for the request.

Constraints
Minimum length: 1 characterMaximum length: 50 characters

Request Bodyrequired

FieldDetails
merchant_subscription_reference
stringrequired

Unique reference ID for the subscription provided by the merchant

Constraints
Minimum length: 1 character
customer_id
stringrequired

Unique identifier for the customer associated with the subscription

plan_details
objectrequired4 nested fields
callback_url
string

URL

expire_after
integer

duration after which subscription expires

Constraints
Minimum value: 1
terms_accepted
boolean

pending

Constraints
Default value: true
merchant_metadata
object

A key-value pair of merchant-specific metadata.

Constraints
Additional properties: string

Response

FieldDetails
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
stringdate-time

Subscription start timestamp

end_date
stringdate-time

Subscription end timestamp

plan_details
object4 nested fields
reserve_amount
integerrequired

Amount to be reserved

currency
stringrequired

Currency code for the subscription

Allowed values:
INRUSD
validity_days
integerrequired

Validity of the subscription in days

Constraints
Minimum value: 1Maximum value: 365
description
stringrequired

Description of the SBMD Plan

expires_at
stringdate-time
redirect_url
string

RedirectURL

Status Codes

200Success
400Bad Requet
500Internal Server Error
Run
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' \
  --header 'Request-ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  --header 'Request-Timestamp: 2024-10-01T10:30:00Z' \
  --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"
  }
}'
{
  "subscription_id": "sub_xyz789",
  "status": "ACTIVE",
  "plan_details": {
    "reserve_amount": 10000,
    "currency": "INR",
    "validity_days": 0,
    "description": "your_description"
  }
}