Create a subscription
Recurring payment collection service. This service allows you to collect payments every 30 days, from the date the payments were posted and repeated as many times as specified.
Last updated
Recurring payment collection service. This service allows you to collect payments every 30 days, from the date the payments were posted and repeated as many times as specified.
Last updated
POST
https://api.stage.localpayment.com /api/payin/subscriptions
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Note that this request is very similar to PayIn request. Using this service is equivalent to executing an scheduled PayIn request every 30 days. The main difference between payloads is the autoRecurring
party object describe in the "body" section below.
Authorization*
String
Mandatory. JWT token in format Bearer eyJ0...
. For more information about authentication, please refer to Authentication
paymentMethod*
OBJECT
Manatory.Payment method type. Possible values: DebitCard
, CreditCard
paymentMethod.type*
String
Payment method type. Possible values: DebitCard
, CreditCard
.
paymentMethod.code*
String
Mandatory. Select among the codes available in each country for a payin BankTransfer payment type. NOTE: payment method code might affect the collection currency in bimonetary countries. For more info, see the side note on currency
field.
paymentMethod.flow*
String
Mandatory. The payment method data could be embeded in the API request (DIRECT)
or collected via an aditional form or plugin (REDIRECT)
. Currently, only DIRECT
flow is allowed.
externalId*
String
Mandatory. An ID that is meaningful to you and your system. It must be unique and alphanumeric, no characters allowed.
country*
String
Mandatory. Your end user's country (i.e. country in which the payment will be processed), in ISO format. Please refer to Country Codes for a full list of supported countries.
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.
conceptCode
String
Mandatory. Choose the suitable concept code from our Concept Code List. Based on our experience, the most usual are 0039 (remittances) and 0040 (corporate payments).
comment
String
Optional. A comment related to the transaction. It should be something meaningful to your business.
exchangeRateToken
String
Optional. Token provided by the Foreign Exchange service in order to use an upfront agreed exchange rate.
payer*
OBJECT
Mandatory. Party Object. Information related to the payer.
payer.type*
String
Mandatory. Possible values: COMPANY
, INDIVIDUAL
name*
String
Mandatory. Individual first name / company name
lastName
String
Mandatory for individuals / Ignored for companies.
document*
OBJECT
Mandatory.Party Object. Valid identity document.
document.type*
String
Mandatory. Document types. Check the regonized document type list per country
document.id*
String
Mandatory. Identity document Id. Usually numbers or combination of numbers and letters.
userReference
String
Optional. Username or id in your platform.
email*
String
Mandatory.
phone
OBJECT
Optional. Party Object. Contact phone number
phone.countryCode
String
Optional.
phone.areaCode
String
Optional
phone.number
String
Optional
birthdate
String
Optional. Individual birthdate / company incorporation date. ISO 8601 format (YYYY-MM-DD)
nationality
String
Optional
address
OBJECT
Optional. Party Object. Contact address
address.street
String
Optional
address.number
String
Optional
address.city
String
Optional
address.state
String
Optional
address.country
String
Optional
address.zipCode
String
Optional. Zip code / Postal code
address.comment
String
Optional. Additional info, such as floor or apartment number.
intermediaries
array
Optional. Array of Party objects. It represents others parties in the payment chain because of the end user is not your direct customer. Take into account the array sequence: your client should be the first element, the client of your client should be the second and so on, until there are no more intermediaries.
device
OBJECT
Optional.
device.id
String
Optional. Android / iPhone device ID. Can be blank for other device types such as PC / Mac.
device.ip
String
Optional. Device IP address
device.browser
String
Optional. Browser
metaData
OBJECT
Optional. Unstructured object to record any metadata meaningful to you.
commercialData
OBJECT
Optional. Party Object. Extra information related to the goods or services traded.
lastName
String
Optional only for INDIVIDUAL type
/ Ignored for COMPANY.
name
String
Optional. Individual first name / company name
merchant
OBJECT
Optional. Party Object.
merchant.type
String
Optional. Possible values: COMPANY
, INDIVIDUAL
document.type
String
Optional. Document types. Check the regonized document type list per country
phone.countryCode
String
Optional.
phone
OBJECT
Optional. Party Object. Contact phone number
String
Optional.
userReference
String
Optional. Username or id in your platform.
document.id
String
Optional. Identity document id. Usually numbers or combination of numbers and letters.
document
OBJECT
Optional. Party Object. Valid identity document.
address
OBJECT
Optional. Party Object. Contact address
nationality
String
Optional.
birthdate
String
Optional. Individual birthdate / company incorporation date. ISO 8601 format (YYYY-MM-DD).
phone.number
String
Optional.
phone.areaCode
String
Optional.
address.comment
String
Optional. Additional info, such as floor or apartment number.
address.city
String
Optional.
address.number
String
Optional.
address.street
String
Optional.
address.zipCode
String
Optional. Zip code / Postal code
address.country
String
Optional.
address.state
String
Optional.
card*
OBJECT
Mandatory. 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.ccvv*
Mandatory. Card Verification Value
card.number*
String
Mandatory. Card number (BAN)
card.expirationYear*
String
Mandatory. Card expiration year. Format YYYY
item.id
String
Optional. Item ID
invoice
String
Optional. Invoice reference
item
array
Optional. List of sold items
items.quantity
number
Optional. Item quantity
items.categoryId
String
Optional. Item category
items.pictureUrl
String
Optional. URL pointing to an item picture
items.description
String
Optional. Item description
item.title
String
Optional. Item title
items.unitPrice
number
Optional. Unit price
shipments.city
String
Optional. City
shipments.number
String
Optional. Number address
shipments.street
String
Optional. Street address
shipments
array
Optional. List of shipping addresses
shipments.country
String
Optional. State/Province
shipments.state
String
Optional. State/ProvinceShipping country
shipments.comment
String
Optional. Additional info
shipments.zipCode
String
Optional. Zip code
beneficiary
OBJECT
Optional
type*
String
Specifies the subscription category. Valid values: SOFTWARE, STREAMING, CONTENT, PRODUCTS, MEMBERSHIP.
autoRecurring*
OBJECT
Mandatory. Subscription properties
autoRecurring.repetitions*
number
How many times this payment will be collected.
autoRecurring.type*
String
Defines the recurring interval unit. Valid values: day, month.