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.
Post a new subscription
POST
https://api.stage.localpayment.com /api/payin/subscriptions
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Mandatory. JWT token in format |
Request Body
Name | Type | Description |
---|---|---|
paymentMethod* | OBJECT | Manatory.Payment method type. Possible values: |
paymentMethod.type* | String | Payment method type. Possible values: |
paymentMethod.code* | String | |
paymentMethod.flow* | String | Mandatory. The payment method data could be embeded in the API request ( |
externalId* | String | Mandatory. An ID that is meaningful to you and your system. It must be unique and alphanumeric, no characters allowed. |
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. |
conceptCode | String | |
comment | String | Optional. A comment related to the transaction. It should be something meaningful to your business. |
exchangeRateToken | String | |
payer* | OBJECT | Mandatory. Party Object. Information related to the payer. |
payer.type* | String | Mandatory. Possible values: |
name* | String | Mandatory. Individual first name / company name |
lastName | String | Mandatory for individuals / Ignored for companies. |
document* | OBJECT | |
document.type* | String | |
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 |
name | String | Optional. Individual first name / company name |
merchant | OBJECT | Optional. Party Object. |
merchant.type | String | Optional. Possible values: |
document.type | String | |
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 | |
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 |
card.ccvv* | Mandatory. Card Verification Value | |
card.number* | String | Mandatory. Card number (BAN) |
card.expirationYear* | String | Mandatory. Card expiration year. Format |
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. |
Creating a subscription: Example request & response
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.
Last updated