Rekurrent to‘lovlar
1. Create
POST /api/v1/recurrent-payments
Request Body
Name | Optional | Description |
|---|---|---|
cardToken | false | Tokenlashtirilgan karta. Faol va amal qiluvchi bo‘lishi shart. |
amount | false | Charge amount |
cronType | false | Defines recurrence frequency: |
startDate | false | (YYYY-MM-DD). Birinchi yechish rejalashtiriladigan sana |
endDate | true | (YYYY-MM-DD) Tugash sanasi. Undan keyin yechish amalga oshirilmaydi |
maxRetryCount | true | Yechish muvaffaqiyatsiz bo‘lganda takroriy urinishlar soni (masalan, mablag‘ yetarli bo‘lmaganda). |
description | true | Optional short description |
Request Body
{
"cardToken": "card token",
"amount": 100000,
"cronType": "MONTHLY",
"startDate": "2025-11-01",
"endDate": null,
"maxRetryCount": 3,
"description": ""
}Response Body
{
"id": 1,
"cardToken": "card token",
"amount": 100000,
"cronType": "MONTHLY",
"startDate": "2025-11-01",
"endDate": null,
"maxRetryCount": 3,
"description": "",
"nextRunDate": "2025-11-01T04:00:00Z",
"createdDate": "2025-10-28T14:00:00Z"
}
2. Get list
GET /api/v1/recurrent-payments
Request header
Field | Optional | Description |
|---|---|---|
Content-Type | false | application/json |
Request params
Field | Optional | Description |
|---|---|---|
page | true | Page. Default 0 |
size | true | Size |
cardToken | true | Card’s token |
from | true | From |
to | true | To |
Request sample
curl --location 'base_url/api/v1/recurrent-payments?page=0&size=1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token' \Response sample (HTTP 200)
{
"code": "SUCCESS",
"data": {
"pageNumber": 0,
"previous": false,
"next": false,
"size": 10,
"totalElements": 3,
"totalPages": 1,
"items": [
{
"id": 1,
"cardToken": "card token",
"amount": 100000,
"cronType": "MONTHLY",
"startDate": "2025-11-01",
"endDate": null,
"maxRetryCount": 3,
"description": "",
"nextRunDate": "2025-11-01T04:00:00Z",
"createdDate": "2025-10-28T14:00:00Z"
}
]
},
"timestamp": 1727115804488
}3. Get by id
GET /api/v1/recurrent-payments/{id}
Request header
Field | Optional | Description |
|---|---|---|
Content-Type | false | application/json |
Request sample
curl --location 'base_url/api/v1/recurrent-payments/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token' \Response sample (HTTP 200)
{
"code": "SUCCESS",
"data": {
"id": 1,
"cardToken": "card token",
"amount": 100000,
"cronType": "MONTHLY",
"startDate": "2025-11-01",
"endDate": null,
"maxRetryCount": 3,
"description": "",
"nextRunDate": "2025-11-01T04:00:00Z",
"createdDate": "2025-10-28T14:00:00Z"
},
"timestamp": 1758046087591
}4. Update
PATCH /api/v1/recurrent-payments/{id}
Request Body
Name | Optional | Description |
|---|---|---|
amount | false | Charge amount |
maxRetryCount | false | Yechish muvaffaqiyatsiz bo‘lganda takroriy urinishlar soni (masalan, mablag‘ yetarli bo‘lmaganda). |
description | true | Optional short description |
cardToken | false | Karta tokeni |
Request Body
{
"amount": 100000,
"maxRetryCount": 3,
"description": "",
"cardToken": "card token"
}Response Body
{
"id": "0a6ecad6-7ee1-4baa-8095-47bbda0fe6e2",
"cardToken": "card token",
"amount": 100000,
"cronType": "MONTHLY",
"startDate": "2025-11-01",
"endDate": null,
"maxRetryCount": 3,
"description": "",
"nextRunDate": "2025-11-01T04:00:00Z",
"createdDate": "2025-10-28T14:00:00Z"
}
5. Delete
DELETE /api/v1/recurrent-payments/{id}
Request header
Field | Optional | Description |
|---|---|---|
Content-Type | false | application/json |
Request sample
curl --location 'base_url/api/v1/recurrent-payments/7540fd88-66d8-4038-8b6c-61a418c0d58e' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token' \Response sample (HTTP 200)
{
"data": {
"message": "success.message"
},
"timestamp": 1751276143988
}6. Delete by token
POST /api/v1/recurrent-payments/delete-by-card-token
Request header
Field | Optional | Description |
|---|---|---|
Content-Type | false | application/json |
Request sample
curl --location 'baseUrl/api/v1/recurrent-payments/delete-by-card-token' \
--header 'Content-Type: application/json' \
--data '{
"cardToken": ""
}'Response sample (HTTP 200)
{
"data": {
"message": "success.message"
},
"timestamp": 1751276143988
}7. Get attempts by recurrent payment id
GET /api/v1/recurrent-payments/attempts/{id}
Request header
Field | Optional | Description |
|---|---|---|
Content-Type | false | application/json |
Request sample
curl --location 'base_url/api/v1/recurrent-payments/attempts/7540fd88-66d8-4038-8b6c-61a418c0d58e' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer token' \Response sample (HTTP 200)
{
"code": "SUCCESS",
"data": [
{
"createdDate": "2025-10-25",
"attempts": [
{
"amount": 100000,
"operationStatus": "FAILED",
"operationId": "947f59de-6645-4352-966f-2211816eef2e"
},
{
"amount": 100000,
"operationStatus": "SUCCESS",
"operationId": "947f59de-6645-4352-966f-2211816eef2e"
}
]
},
{
"createdDate": "2025-10-26",
"attempts": [
{
"amount": 100000,
"operationStatus": "FAILED",
"operationId": "947f59de-6645-4352-966f-2211816eef2e"
},
{
"amount": 100000,
"operationStatus": "FAILED",
"operationId": "947f59de-6645-4352-966f-2211816eef2e"
}
]
},
{
"createdDate": "2025-10-27",
"attempts": [
{
"amount": 100000,
"operationStatus": "SUCCESS",
"operationId": "947f59de-6645-4352-966f-2211816eef2e"
}
]
}
],
"timestamp": 1752838693794
}