Update subscription
Update service subscription and recurring payments. This service allows you to update your subscription data so that it does not lose continuity.
Post a update subscription
POST
https://api.stage.localpayment.com/api/payin/subscriptions/:externalId
Headers
Authorization*
String
Mandatory. JWT token in format Bearer eyJ0...
. For more information about authentication, please refer to Authentication
Request Body
amount
String
Mandatory. Amount to charge to your end user.
card
OBJECT
Party Object. Payer deb card data.
card.name
String
Mandatory. Cardholder name, as printed on the front of the debitcard.
card.expirationMonth
String
Mandatory. Card expiration month. Format MM.
card.cvv
String
Mandatory. Card Verification Value
card.number
number
Mandatory. Card number (PAN)
card.expirationYear
String
Mandatory. Card expiration year. Format YYYY
autoRecurring
OBJECT
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
autoRecurring.trialDays
number
Number of trial days of the subscription
discount
OBJECT
Apply discount to a subscription
discount.amount*
String
Amount to charge to your end user.
discount.period*
number
Period or number of payments to which the new amount will be charged. Allowed values:
>= 1<= 12 (if the subscription is in MONTH) >= 1<= 12 (if the subscription is in DAY)
retry
OBJECT
Optional. Party Object. Payin retry
retry.repetitions*
number
Number of times the charge will be retried
retry.intervalUnit*
String
The time unit in which retries will be executed. Allowed values: "day" and "hour"
retry.intervalValue*
number
Interval at which retries will be performed. Defines the number of time units between retries.
dateToUpdate
String
Optional field, applies only when the requested update is required to apply to a future date. Format: YYYY-MM-DD
suspension
OBJECT
Optional. Temporarily suspend subscription
suspension.dateToStart
date
Suspension start date. Format: yyyy-MM-dd'T'HH:mm:ss
suspension.dateToEnd
date
Suspension end date. Format: yyyy-MM-dd'T'HH:mm:ss
suspension.reason
String
Reason for suspension of subscription
status
String
Send this field only in the update request when you want to immediately activate a suspended subscription. Fixed value: ACTIVE
Update a subscription: Example request & response
Last updated
Was this helpful?