Create subscription plan
This service allows you to create subscription plans and then associate the plan ID with the creation of the subscriptions required by the customer.
Post a new subscription plan
POST
https://api.stage.localpayment.com/api/subscriptions/plan
Headers
Authorization*
String
Mandatory. JWT token in format Bearer eyJ0...
. For more information about authentication, please refer to Authentication
Request Body
name*
String
Mandatory. Plan name
description
String
Optional. Plan description
country*
String
amount*
String
Mandatory. Amount to charge to your end user.
currency*
String
Mandatory. The currency in which the amount is expressed. It could be A) the local currency of the selected country or B) the account's currency. If A), the amount will be charged to the customer's cash payment method. If B) and it differs from the local currency, the amount specified will be credited to your account and Localpayment will perform a Foreign Exchange operation to collect the amount expressed in local currency. In bimonetary countries, paymentMethod.code resolves possible ambiguity: the payment will be executed in the currency of that specific payment method network. e.i.: SPID (USD); SPEI (MXN)
accountNumber*
String
Mandatory. Your Localpayment account number in which the amount will be credited.
autoRecurring*
OBJECT
Mandatory. Subscription properties
autoRecurring.repetitions*
number
How many times this payment will be collected. *For recurrence on demand send the parameter with value=0
autoRecurring.type*
String
Defines the recurring interval unit. Valid values: day, month. *For recurrence on demand send the parameter with value=custom
Creating a subscription plan: Example request & response
Last updated
Was this helpful?