Create Subscription

POST/ps/api/v1/public/subscriptions

Creates a new subscription against an existing plan. The subscription defines the recurring billing cycle for a customer based on the selected plan's pricing and frequency.

Requires Bearer token. Get token →

Request Body

NameTypeDescription
merchant_subscription_reference
stringrequired

Idempotency Key. Unique identifier of the merchant subscription reference. Duplicate requests with the same merchant_subscription_reference will return the existing subscription instead of creating a new one.

plan_id
stringrequired

Unique identifier for the subscription plan.

enable_notification
boolean

Indicates if notifications are enabled.

start_date
stringrequired

The ISO 8601 UTC Timestamp when the subscription starts.

end_date
stringrequired

The ISO 8601 UTC Timestamp when the subscription expires.

customer_id
stringrequired

Unique identifier of the customer in the Pine Labs Online database.

allowed_payment_methods
string[]

The type of payment methods you want to offer customers.

integration_mode
SEAMLESS | REDIRECTrequired

Type of integration.

SEAMLESSREDIRECT
merchant_metadata
object

Key-value pairs for additional information. Max 10 pairs, 256 chars each.

is_tpv_enabled
boolean

Indicates if Third-Party Validation (TPV) is enabled.

bank_account
object

Bank account details for Third-Party Validation (TPV).

account_number
stringnull

Bank account number.

name
stringnull

Name of Customer.

ifsc
stringnull

IFSC code of the bank account.

callback_url
string

URL to redirect customers to specific success or failure pages.

failure_callback_url
string

URL specifically used to redirect customers to a failure page.

Status Codes

201Subscription created successfully.
404
422Unprocessable Entity — validation failed or duplicate request.
500
Request
curl --request POST \
  --url https://pluraluat.v2.pinepg.in/ps/api/v1/public/subscriptions \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "merchant_subscription_reference": "f5d77ef9-fa11-4f58-a9f4-543e4a7022c5",
  "plan_id": "v1-pla-250612061639-aa-666Zge",
  "enable_notification": true,
  "start_date": "2025-06-12T06:22:21Z",
  "end_date": "2025-06-21T17:32:28Z",
  "customer_id": "cust-v1-250519171901-aa-dPF6mg",
  "allowed_payment_methods": [
    "UPI"
  ],
  "integration_mode": "REDIRECT",
  "merchant_metadata": {
    "key1": "DD",
    "key2": "XOF"
  },
  "is_tpv_enabled": false,
  "bank_account": {
    "account_number": "12345678912345",
    "name": "Kevin Bob",
    "ifsc": "HDFC0001234"
  },
  "callback_url": "www.google.com",
  "failure_callback_url": "www.example.com/failure"
}'

Run this request

New chat
Responses are generated using AI and may contain mistakes.
Hi! I'm Pine, your AI developer assistant. Ask me anything about Pine Labs APIs, integrations, or troubleshooting.

Tip: you can create a new chat with ⌘ + E