...
2.1 - El siguiente paso es solicitar el form de adhesión con el siguiente post usando el token obtenido previamente
Code Block | ||
---|---|---|
| ||
curl --location --request POST 'https://api.paypertic.com/suscripciones' \ --header 'Authorization: Bearer TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "type": "adhesion", "notification_url": "URL_SERVICIO_DE_NOTIFICACIONES ", "currency_id": "ARS", "detail": { "external_reference": "987987", "concept_id":"987", "concept_description":"Descripcion del concepto", "amount":0 }, "payer": { "name": "lucas prueba", "email": "lucasm@pagotic.com", "identification": { "type":"DNI_ARG", "number":"11222333", "country":"ARG" } } }' |
...
Donde deberá reemplazar el valor {ID} por un ID de adhesión en estado Active
Code Block | ||
---|---|---|
| ||
curl --location -g --request POST 'https://api.paypertic.com/suscripciones/cancelar/{ID}' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer TOKEN' \ --data-raw '{ "status_detail":"Detalle de la cancelación" }' |
...
Con cualquier otro estado, la solicitud será denegada.
Code Block | ||
---|---|---|
| ||
curl --location -g --request POST 'https://api.paypertic.com/pagos/cancelar/{ID}' \ --header 'Authorization: Bearer TOKEN' \ --header 'Cache-Control: no-cache' \ --header 'Content-Type: application/json' \ --data-raw '{ "status_detail":"Motivo de cancelación" }' |