Documentation V3
  • Localpayment documentation V3
  • INTRODUCTION TO OUR SOLUTION
    • Intro to our Documentation
    • Intro to Payment Methods in Emerging Markets
    • Merchant Dashboard
      • Dashboard Navigation
      • Login
      • User Roles
      • Roles
      • Users
      • Whitelist your IPs
      • Whitelist your BINs
      • Setup your Webhooks
      • Reports
        • Balance
        • Projected Balance
        • Activity
        • Transaction Detail
        • FIDES Report
      • Virtual accounts
      • Refunds
        • Refund Bank Transfer
        • Refund Card Capture
        • Refund Cash
      • Chargeback
      • Internal Domestic Transfer
      • Internal Foreign Transfer
      • Currency Exchange
        • Create
      • Wire In
      • Wire Out
    • Intro to FX operations
    • Business definitions
      • Payins
      • Payouts
    • Onboarding & Integration
    • Postman Collection
  • ENVIRONMENTS
    • Environments
  • BEFORE A PAYMENT
    • Access Token
    • Validations
      • Document Validation
      • Bank Account Validation
      • Validate BIN
    • Holidays
    • Search Payment Method
    • Search Bank Codes
    • Cash Agents Geolocalization
    • Installments Plan Quote
    • Currency Exchange Quote
    • Billing Service
      • Create
        • Mexico
      • Check Billing status
      • Download Billing
  • REQUEST A PAYMENT
    • Payins
      • Bank Transfer
        • Direct debit
          • DEBIN (Argentina)
          • Transfiya (Colombia)
          • Wallet Fri (Guatemala)
        • Virtual Account
          • Mexico
            • Request Individual
            • Request Batch
            • Check Virtual account
            • Delete Virtual account
            • Enable or Disable Virtual Account
          • Brazil
            • Request Individual
            • Check Virtual account
            • Alias ​​configuration
          • Argentina
            • Request Individual
            • Request Batch
            • Check virtual account
            • Delete Virtual account
          • Refund Virtual Account
        • Online Reference Code Payments
          • Mexico
        • Refund Bank Transfer
        • Cancel
        • APMs
          • CODI (Mexico)
          • ETPAY (Chile)
          • Fintoc (Chile)
          • Boleto (Brazil)
          • PIX (Brazil)
            • Refund Pix
          • PSE (Colombia)
          • QR (Bolivia)
          • QR (Guatemala)
          • QR (Argentina)
          • QR (Perú)
      • Cash
        • Cash
          • APMs
            • Boleto (Brazil)
        • Cancel
        • Refund Cash
      • Debit Card
        • Capture
        • Refund Capture
      • Credit Card
        • Capture
        • Create Authorization
        • Capture Authorization
        • Cancel Authorization
        • Refund Capture
        • Installments
        • Save Cards
          • Save Card
          • Get Card
          • Delete Card
        • 3D-Secure
        • Validate card
        • Chargebacks
          • Notification
          • Send documentation
          • Close Chargeback
    • Payin Subscriptions
      • Create a subscription
      • Update subscription
      • Cancel
    • Payin Subscriptions Plan
      • Create subscription plan
      • Update subscription plan
      • Get subscription plan
    • Payouts
      • Search available banks
      • Create
        • Argentina
        • Bolivia
        • Brazil
        • Chile
        • Colombia
          • Colombia ACH
          • Colombia Transfiya
        • Costa Rica
        • Dominic Republic
        • Guatemala
        • Honduras
        • Mexico
        • Panama
        • Peru
        • Kenya
      • Manual Upload
        • Create Batch Upload
        • Batch Pending Authorization
        • Cancel Batch Pending Authorization
        • Batch Activity
      • Proof of Payment (POP)
      • Cancel
      • Commit payout
      • Attach documents
      • Ripplenet getway
    • Payouts Double Signature
      • Authorize
    • Checkout
      • Webcheckout
        • Credit Card
        • Debit Card
        • Cash
        • Bank Transfer
      • Link Payment
      • Frequent Items
      • Iframe
      • Smart Checkout/ iframe
      • Virtual Pos
      • Plugins
        • Magento
        • Shopify
        • Google Pay
        • WooCommerce
  • AFTER A PAYMENT
    • Check Status
    • Check Payment
    • Check Payment list
    • Check Subscription
    • Account Balance
      • Balance Reconciliation
      • Current Balance Amount
    • Withholding Certificates
    • Proof of Payment
    • RFI - Documentation
  • SETTLEMENT & EXCHANGE
    • Wire In
    • Wire Out
    • Currency Exchange Bulk
      • Quote
      • Bulk
      • Currency exchange - Front end
    • Internal Transfers
      • Internal Domestic Transfer
      • Internal Foreign Transfer
  • NOTIFICATIONS
    • Callbacks - Webhooks
      • Configurations
      • Payins
        • Payin Bank Transfer
        • PSE Colombia
        • Payin Virtual Account
        • Payin Cash
        • Payin Credit Card
        • Payin Debit Card
      • Payouts
    • SFTP- Email Reports
  • API REFERENCE GUIDE
    • Validation Error Codes
    • Transaction Type & Status
      • Payin
      • Subscriptions
      • Payout
      • Chargeback
      • Credit
      • Currency Exchange
      • Debit
      • Expenses
      • Internal Transfer
      • Recall
      • Refund
      • Return
      • Recurring Fee
      • Wire in
      • Wire out
    • Payout Methods + SLA
      • Latam
    • Payin Methods + SLA
      • Argentina
      • Bolivia
      • Brazil
      • Chile
      • Colombia
      • Dominican Republic
      • Guatemala
      • Mexico
      • Panama
      • Peru
    • Currency Codes
      • Latam
    • Country Codes
      • Latam
    • Bank codes
      • Latam
        • Argentina
        • Bolivia
        • Brazil
        • Chile
        • Colombia
        • Costa Rica
        • Dominican Republic
        • Guatemala
        • Honduras
        • Mexico
        • Panamá
        • Peru
    • Bank account validations
      • Latam
        • Argentina
        • Bolivia
        • Brazil
        • Chile
        • Colombia
        • Costa Rica
        • Dominican Republic
        • Guatemala
        • Mexico
        • Panama
        • Peru
    • Document Validations
      • Argentina
      • Bolivia
      • Brazil
      • Chile
      • Colombia
      • Costa Rica
      • Dominican Republic
      • El Salvador
      • Guatemala
      • Honduras
      • Mexico
      • Panama
      • Peru
    • Concept Codes
  • FLOWS AND CHARACTERISTICS
    • Account Currencies
    • Involved Parties
    • Payin Status Flow
      • Payins
        • Payin Status Flow - Card
        • Payin Status Flow - Bank
        • Payin Status Flow -Cash
      • Refund - Card
      • Refund - Cash & Bank
      • Chargeback
    • Payout Status Flow
      • Payout - Bank
      • Return
      • Recall
    • Payin Subscription Flow
      • Payins Subscription Status Flow - Card
    • Virtual Account Status Flow
    • Settlement Status Flow
      • Wire In
      • Wire Out
    • Payin Methods Flow
      • Argentina
      • Bolivia
      • Brazil
      • Chile
      • Colombia
      • Dominican Republic
      • Guatemala
      • Honduras
      • Mexico
      • Panama
      • Peru
  • HOLIDAYS
    • 2021
    • 2022
    • 2023
    • 2024
    • 2025
  • COMPLIANCE
    • Values
    • Prohibited Countries
    • Prohibited Business
    • Compliance Program Docs
    • Licenses
    • Terms & Conditions
  • GLOSSARY
    • Payments Explained
    • FAQ
  • PLUGINS
    • Magento
    • Shopify
    • Google Pay
    • WooCommerce
    • Ripplenet
Powered by GitBook
On this page
  • Post a update subscription
  • Update a subscription: Example request & response

Was this helpful?

  1. REQUEST A PAYMENT
  2. Payin Subscriptions

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

Name
Type
Description

Authorization*

String

Mandatory. JWT token in format Bearer eyJ0... . For more information about authentication, please refer to Authentication

Request Body

Name
Type
Description

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

{
    "externalId": "564b161a-76ba-4a84-b5cf-583f2df8c377",
    "internalId": "52425bbd-b68b-4abc-9480-5ae88d53adb3",
    "status": {
        "code": "107",
        "description": "APPROVED",
        "detail": "Update subscription success"
    },
    "errors": []
}

{
    "status": {
        "code": "400",
        "description": "ERROR",
        "detail": "Invalid operation"
    }
}

Update a subscription: Example request & response

Note that this request contains optional parameters and objects that can be updated in the subscription.


{
   "dateToUpdate": "2025-01-30",
   "amount": 16000.0,

   "autoRecurring": {
        "repetitions": "3",
        "type": "month",
        "trialDays": "0"
    },

   "retry": {
    "repetitions": 2,
    "intervalUnit": "day",
    "intervalValue": 1
  }
}

curl --location --request PATCH 'https://api.stage.localpayment.com/api/payin/subscriptions/564b161a-76ba-4a84-b5cf-583f2df8c377' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzM4MDY2MTk5LCJqdGkiOiIxZjc3MGQ5M2E0Yjg0NzNhOWIzZDJkYjlhZDIxOWNhZCIsInVzZXJfaWQiOjMwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjpmYWxzZSwicm9sZXMiOlsiQURNSU4iXSwiY291bnRyaWVzIjpbIkFMTCJdLCJjb21wYW55IjoiMDAwMSIsImNsaWVudF9jb2RlIjoiMDAwMSJ9.DaZ3Fm0z65WZEzuOKCJtNLVitRcR0xBQElPyiYs8kXI' \
--data '{
    "dateToUpdate": "2025-01-30",
    "amount": 16000.0,

   "autoRecurring": {
        "repetitions": "3",
        "type": "month",
        "trialDays": "0"
    },

   "retry": {
    "repetitions": 2,
    "intervalUnit": "day",
    "intervalValue": 1
  }
}'

{
    "externalId": "564b161a-76ba-4a84-b5cf-583f2df8c377",
    "internalId": "52425bbd-b68b-4abc-9480-5ae88d53adb3",
    "status": {
        "code": "107",
        "description": "APPROVED",
        "detail": "Update subscription success"
    },
    "errors": []
}
PreviousCreate a subscriptionNextCancel

Last updated 1 month ago

Was this helpful?