Hello everyone,
I’m a bit stuck with integrating subscription plans into my app. Could you please help?
Unfortunately, I can’t use Stripe (it would have been much easier). I am using a different payment gateway via an API.
I have several paid plans. They differ in price and duration. I have added each plan to Option Sets.
For the payment, I provide the amount and the description. In return, I receive the amount, the description, and the payment date.
{
"body": {
"type": "notification",
"event": "payment.succeeded",
"object": {
"id": "2dc4ba82-000f-5000-9000-13c2",
"status": "succeeded",
"amount": {
"value": "299.00",
"currency": "USD"
},
"income_amount": {
"value": "288.53",
"currency": "USD"
},
"description": "Starter",
"recipient": {
"account_id": "378602",
"gateway_id": "2238509"
},
"captured_at": "2024-05-01T20:32:15.518Z",
"created_at": "2024-05-01T20:32:02.299Z",
"test": true,
How can I match the data from the payment system’s response by the description of the plan in order to add the correct number of days to the duration of the plan? Like “captured_at”+days in option expiry value