<html lang="it-it" dir="ltr"><head></head><body># Pagamenti Ricorrenti - Endpoint API REST

 [Pagamenti Ricorrenti](https://easydigitaldownloads.com/downloads/recurring-payments/) estende l'[API RESTful esistente](https://easydigitaldownloads.com/docs/edd-api-reference/) integrata in Easy Digital Downloads. È possibile accedervi all'indirizzo

```
https://example.com/edd-api/subscriptions/?key=TUA_API_KEY&amp;token=TUO_API_TOKEN
```

 **Nota**: assicurati di sostituire *example.com* con il tuo indirizzo e i valori [chiave e token](https://easydigitaldownloads.com/docs/edd-rest-api-authentication/) con i tuoi.

 L'esempio sopra restituirà un elenco di tutte le sottoscrizioni esistenti nel negozio.

### Input

 L'API REST Pagamenti Ricorrenti accetta 3 opzioni oltre a chiave e token: `customer`, `number`, e `paged`.

#### Customer

 L'input per un cliente può essere un intero che rappresenta un ID cliente o un indirizzo email. L'URL risultante sarà simile a questo:

```
https://example.com/edd-api/subscriptions/?key=TUA_API_KEY&amp;token=TUO_API_TOKEN&amp;customer=2
```

 o

```
https://example.com/edd-api/subscriptions/?key=TUA_API_KEY&amp;token=TUO_API_TOKEN&amp;customer=user@example.com
```

#### Number

 L'opzione number accetta un intero e restituisce quel numero di risultati. Un esempio sarebbe:

```
https://example.com/edd-api/subscriptions/?key=TUA_API_KEY&amp;token=TUO_API_TOKEN&amp;number=5
```

#### Paged

 L'opzione paged ti consente di scegliere una porzione di un numero maggiore. Ad esempio, se hai 100 voci e usi number=10, potresti passare paged=2 e ottenere le righe 11-20. Sarebbe così:

```
https://example.com/edd-api/subscriptions/?key=TUA_API_KEY&amp;token=TUO_API_TOKEN&amp;number=10&amp;paged=2
```

### Output

 L'output per ogni sottoscrizione contiene tutte le informazioni su quella sottoscrizione, nonché sul cliente e su ogni pagamento di rinnovo (figlio). Inoltre, c'è un valore che indica il tempo impiegato per ottenere le informazioni per tutti i risultati. Esempio:

```
{
    "subscriptions": [
        {
            "info": {
                "u0000EDD_Subscriptionu0000subs_db": {
                    "table_name": "wp_edd_subscriptions",
                    "version": "1.0",
                    "primary_key": "id"
                },
                "id": "1",
                "customer_id": "2",
                "period": "month",
                "initial_amount": "50.00",
                "recurring_amount": "50.00",
                "bill_times": "0",
                "parent_payment_id": "87",
                "product_id": "85",
                "created": "2016-03-15 15:36:30",
                "expiration": "2016-04-15 23:59:59",
                "status": "active",
                "profile_id": "paypal-363e3cc178dab152bb59b958024bce75",
                "gateway": "paypal",
                "customer": {
                    "id": "2",
                    "purchase_count": "2",
                    "purchase_value": "20.000000",
                    "email": "support@easydigitaldownloads.com",
                    "name": "Jane Doe",
                    "date_created": "2016-03-07 22:33:44",
                    "payment_ids": "16",
                    "user_id": "3",
                    "notes": [

                    ]
                }
            },
            "payments": [
                {
                    "id": 106,
                    "amount": 10.36,
                    "date": "March 21, 2016",
                    "status": "Renewal"
                },
                {
                    "id": 105,
                    "amount": 10,
                    "date": "March 21, 2016",
                    "status": "Renewal"
                },
                {
                    "id": 104,
                    "amount": 10,
                    "date": "March 21, 2016",
                    "status": "Renewal"
                }
            ]
        }
    ],
    "request_speed": 0.076335906982422
}
```</body></html>