Create Subscription

Use this API to creates a subscription against the plan.

Environment

Use our UAT environment endpoint for testing and for integration utilize our production endpoint.

EnvironmentEndpoints
User Acceptance Testing [UAT]https://pluraluat.v2.pinepg.in/ps/api/v1/public/subscriptions
Production [PROD]https://api.pluralpay.in/ps/api/v1/public/subscriptions
Body Params
string
required

Unique identifier of the merchant subscription reference entered while creating a suscription.

  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 1234567890

string
required

Unique identifier for the subscription plan in the Pine Labs Online database.

Example: v1-plan-4405071524-aa-qlAtAf

Note: The plan should be in an active state.

boolean

Indicates if notifications are enabled.

Example: true

Possible values:

  • true: Webhook notification will be sent to the configured webhook URL.
  • false: Webhook notification will not be sent to the configured webhook URL.

string
required

The ISO 8601 UTC Timestamp is the date when the subscription plan is active and available for use.

Example: 2022-02-01T17:32:28Z

Note: On ignoring this field plan start date will be considered as start date

string
required

The ISO 8601 UTC Timestamp is the date when the subscription plan expires and can no longer be used for new subscriptions.

Example: 2022-09-21T17:32:28Z

Note:

  • On ignoring this field, the plan will be on Active state unless there is a manual update.
  • For one-time, the end date should be within 60 days from the start date.

string
required

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

  • Minimum length: 1 character.
  • Maximum length: 19 characters.
Example: 123456

Refer to our Customers documentation to learn more.

string

The type of payment methods you want to offer customers.

Accepted value:

  • UPI
Example: UPI

string
required

The integration mode for the subscription.Accepted values:

  • SEAMLESS
  • REDIRECT
Example: SEAMLESS

merchant_metadata
object

An object of key-value pair that can be used to store additional information.

Example: "key1": "DD"

boolean

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

Example: true

Refer to our Third Party Validations documentation to learn more.

bank_account
object

Mandatory only when is_tpv_enabled is true.

An object that contains bank account details.

string

Use this URL to redirect your customers to specific success or failure pages based on the order or product details.

Example: https://sample-callback-url>/td>

string

The URL specifically used to redirect customers to a failure page based on the order or product details. Example: https://sample-failure-callback-url

Note:

  • If the failure_callback_url is not provided, customers will be redirected to the callback_url for both successful and failed transactions.
  • If the failure_callback_url is provided, the callback_url will be used exclusively for successful transactions, while the failure_callback_url will be used for failed transactions.
  • If neither URL is provided, the default URL configured during merchant onboarding will be used.

Headers
string
Defaults to application/json

The type of content included in the HTTP message body.

Possible value: application/json.

string
required
Defaults to Bearer

The HTTP header where you can include your secret token for authentication.

Example: Bearer <access_token>

Note: Use the access token generated using our Generate Token API.

string

Use ISO 8601 UTC Timestamp, to create a timestamp when the generate token is requested.

Example: 2024-07-09T07:57:08.022Z

string

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

  • Minimum: 1 characters.
  • Maximum: 50 characters
Example: c17ce30f-f88e-4f81-ada1-c3b4909ed235

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
Ask AI
Assistant
Order Lifecycle
Refunds
Settlements
Checkout
Dashboard
International Payments
How do I implement webhook notifications for payment status updates, and what's the recommended way to verify webhook authenticity?
How do I integrate Pine Labs payment gateway with my React Native mobile app and what are the required API credentials?
Can I customize the payment UI for card transactions, and what parameters can I pass to modify the checkout experience for my customers?
Assistant