Introduction

Authentication

Test cards

Establishments

Users

Customers

Cards

Payment links

Error codes

Payment Split

Products

Discount Coupons

Sales

Signatures

Webhooks

Financial


On this page:


POST Add customer to plan

https://api.premepay.com/v1/stores/{storeId}/subscriptions

Learn how to manage your existing subscription plans.

By having a Subscription Plan registered, you will be able to manage users associated with this Subscription Plan. Adding your consumer to a subscription plan, updating a subscription and performing a subscription deletion are some of the management possibilities. The Subscription Plan contemplates the national and international markets.

<aside> 💡 Do you already have a Subscription Plan? You will be able to enroll users in Subscription Plans once you have an existing Subscription Plan.

</aside>

Using the above route you can add a subscription to a payment plan. Remember that this action will only be valid when you have a registered subscription plan. For International Plans, the "currency" element must be inserted in the body of the requisition.

When creating a Subscription in a Plan, the first charge will be made immediately for the respective indicated payment method, that is, for subscriptions created using a credit card, the first initial charge will be made based on the indicated amount, with the next ones being carried out according to the indicated frequency. For cases where the Signature was created using Boleto or Pix payment methods, it will be sent to the Customer, also following the indicated frequency.

Parameters List

Parameter Type Description Required
fingerprint string User session unique identifier No
includeFeeTransfer boolean Indicates whether fees should be passed on to the consumer No
planId integer Plan identifier Yes
customerId integer Consumer identifier Yes
currency string Alpha code of the currency to be processed. Example: "GBP", "USD", "CAD” Yes (for International Plans)
payment object Payment information Yes
type string Type of payment Yes
credit Credit card
boleto Bank Slip (Boleto Bancário)
pix Pix
cardId integer Card identifier Required if type is credit
splits array<object> Split No
splitRuleId Required if there are associated Splits
metadata dictionary<key, value> Used to save miscellaneous information in dictionary format <key, value> No
daysBetweenRetries integer Number of days between billing retries No
maxRetries integer Maximum number of retries No

Status related to Subscription

Status Meaning
active Active
canceled Canceled
pending Pending

Request example

This is an example of what your request to add a subscription to a subscription plan might look like.

Responses

If your request has invalid creation parameters - for example, specifying an invalid field or value - you may receive an error response. Below is the complete list of possible error responses:


Related Content

<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/52c5ff42-e8bf-45d3-81d1-b6e05786a688/POST.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/52c5ff42-e8bf-45d3-81d1-b6e05786a688/POST.png" width="40px" /> POST - Create plan

</aside>

<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e3aeb85f-a7e2-40f4-b805-7e883e3d72e2/DELETE.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e3aeb85f-a7e2-40f4-b805-7e883e3d72e2/DELETE.png" width="40px" /> DELETE - Delete plan customer

</aside>