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

Request Body

{
    "subscriptionId": "133640f9-ac06-49fc-aa82-08bfe52ceb5e",
    "status": {
        "code": "105",
        "description": "INPROGRESS",
        "detail": "The subscription is in progress"
    },
    "creationDate": "2022-05-31T15:05:47.665+00:00",
    "nextPaymentDate": "2022-06-30T15:05:47.665+00:00",
    "payments": [
        {
            "externalId": "bb7d32e5-04da-4b8a-856f-8caf89d986ea",
            "internalId": "9977c353-ce00-48fd-b3ac-f685bce30895",
            "status": {
                "code": "103",
                "description": "APPROVED",
                "detail": "The payin was confirmed but not credited yet"
            }
        }
    ]
}

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.

{
    paymentMethod": {
"type": "CreditCard",
"code": "1000",
"flow": "DIRECT"
},
"externalId": "1662647310",
"country": "ARG",
"amount": 100.0,
"currency": "ARS",
"accountNumber": "032.032.00000015",
"conceptCode": "0001",
"comment": "subs test 1 del 7/9 xdia",
"merchant": {
"type": "INDIVIDUAL",
"name": "Obi Wan",
"lastname": "Kenobi",
"document": {
"type": "DNI",
"id": "12345678"
},
"userReference": "abc123",
"email": "obiwankenobi@starwars.com",
"phone": {
"countryCode": "54",
"areaCode": "11",
"number": "98789632"
},
"birthdate": "2000-01-01",
"nationality": "Argentinian",
"address": {
"street": "Charruas",
"number": "938",
"city": "Hurlingham",
"state": "state",
"country": "Argentina",
"zipCode": "1688",
"comment": "portero 801"
}
},
"payer": {
"type": "INDIVIDUAL",
"name": "Luke",
"lastname": "Skywalker",
"document": {
"id": "37993830",
"type": "DNI"
},
"email": "nic-midd@localpayment.com",
"phone": {
"countryCode": "1",
"areaCode": "11",
"number": "98789632"
},
"birthdate": "01/01/1990",
"nationality": "American",
"address": {
"street": "Siempre viva",
"number": "1234",
"city": "Springfield",
"state": "Ohio",
"country": "USA",
"zipCode": "1686",
"comment": "May the force be with you, always!"
}
},
"card": {
"name": "APRO",
"number": "4509953566233704",
"cvv": "123",
"expirationMonth": "11",
"expirationYear": "2025",
"installments": 1
},
"autoRecurring": {
"repetitions": 1,
"type": "day"
}
}'

Last updated