Create Subscription
Changed onpost/v3/plans/{plan-id}/subscriptions
Request
- Base URLhttps://gateway-154.netpaydev.com/gateway-ecommerce
- URLhttps://gateway-154.netpaydev.com/gateway-ecommerce/v3/plans/{plan-id}/subscriptions
- Authnone required
Path parameters
plan-idstring required
Identificador del plan
Headers
Content-Typestring
application/json
Authorizationstring
SecretKey
Request body
Response
200
Example response
{
"id": "wX3yqRmYta8zShXsnRSvfAZ_L56yBj",
"plan": {
"id": "c2I31g9mwBjtuH8OireaxDsety78!f",
"name": "Colegiatura Semestral Universidad",
"amount": 750,
"currency": "MXN",
"interval": "MONTHLY",
"frecuency": 1,
"expiryCount": 6,
"active": 1,
"dayStartPayment": 1,
"identifier": "planid-colegiatura-0002",
"selfRenewal": 1,
"selfRetries": 1,
"clientId": 57,
"createdAt": "2021-11-22T21:34:19.000+0000",
"updatedAt": "2021-11-22T21:34:19.000+0000",
"fixed": true,
"planType": "Fixed",
"periodInDays": 365,
"dayOfWeek": "MONDAY"
},
"client": {
"id": "Ba1HD5NuXvFHM0X6PU4wc4q3VZ2!K=",
"name": "John Doe",
"firstName": "John",
"lastName": "Doe",
"phone": "5555555555",
"email": "accept@netpay.com.mx",
"identifier": "clientid-np-2000",
"originationClientId": 57,
"paymentSources": [
{
"paymentSource": "token_YWfPrNEARhAdCaJgdeXTQjiwcQKGPxDYWnTsTIUW",
"sourceType": "card",
"createdAt": "2021-11-19T23:49:37.000+0000",
"updatedAt": "2021-11-19T23:49:37.000+0000"
}
],
"subscriptions": [
{
"plan": {
"id": "c2I31g9mwBjtuH8OireaxDsety78!f",
"name": "Colegiatura Semestral Universidad",
"amount": 750,
"currency": "MXN",
"interval": "MONTHLY",
"frecuency": 1,
"expiryCount": 6,
"active": true,
"selfRetries": true,
"selfRenewal": true,
"dayStartPayment": 1,
"identifier": "planid-colegiatura-0002",
"createdAt": "2021-11-22T21:34:19.000+0000",
"subscriptions": [
{
"id": "Ba1HD5NuXvFHM0X6PU4wc4q3VZ2!K=",
"name": "John Doe",
"phone": "5555555555",
"email": "accept@netpay.com.mx",
"firstName": "John",
"lastName": "Doe",
"createdAt": "2021-11-19T23:49:37.000+0000",
"identifier": "clientid-np-2000"
}
]
},
"id": "wX3yqRmYta8zShXsnRSvfAZ_L56yBj"
}
],
"createdAt": "2021-11-19T23:49:37.000+0000",
"updatedAt": "2021-11-19T23:49:37.000+0000"
},
"cardToken": {
"id": 17628,
"token": "token_YWfPrNEARhAdCaJgdeXTQjiwcQKGPxDYWnTsTIUW",
"expYear": "26",
"expMonth": "12",
"lastFourDigits": "0002",
"cardHolderName": "Kevin Arellano",
"brand": "visa",
"deviceFingerPrint": "CZnEqKcmnYzVybMQrBlAjPwLrlEovvPwpNpBzVNClmQUOZ",
"ipAddress": "177.227.65.90",
"createdAt": "2021-11-19T23:47:23.000+0000",
"updatedAt": "2021-11-19T23:47:23.000+0000",
"clientId": 57,
"cardBrand": "visa",
"typeCard": "001",
"tokenWithOutPrefix": "YWfPrNEARhAdCaJgdeXTQjiwcQKGPxDYWnTsTIUW"
},
"status": "A",
"billingStart": "2021-12-30",
"billingEnd": "2022-06-30",
"expiryCount": 6,
"selfRenewal": 1,
"selfRetries": 1,
"amount": 750,
"createdAt": "2021-11-22T21:35:52.686+0000",
"updatedAt": "2021-11-22T21:35:52.686+0000",
"deviceFingerprintID": "0",
"merchantReferenceCode": "0",
"autocalculateBillingEnd": true,
"finalAmount": 750
}Changes
- info
endpoint added
- info