# Ripple Collections (alpha)

The Ripple Collection APIs are used to manage collections, manage payment channels, manage partners and settlements.
## API Environments
The Ripple Collection APIs offers the following environments:
| <div style="width:90px">Environment</div>  | Base URL                      | Description                               |
| ------------------------------------------ | ----------------------------- | ----------------------------------------- |
| Sandbox                                    | `https://docs.ripple.com/products/collections/_mock/api/collections` | Sandbox environment with mock data which does not require auth.|
| UAT                                       | `https://api.test.ripple.com` | UAT environment with simulated transactions. |
| Production                                 | `https://api.ripple.com`      | Production environment                    |

For guides on API authentication, idempotency, and webhook verification, see the sidebar. 

Version: 0.0.1

## Servers

```
https://api.test.ripple.com
```

```
https://api.ripple.com
```

## Security

### Bearer

Type: http
Scheme: bearer
Bearer Format: JWT

## Download OpenAPI description

 - [Ripple Collections (alpha)](https://docs.ripple.com/_bundle/@l10n/pt-BR/products/collections/@v0/api/collections.yaml)

## Authentication

 - [POST /v2/oauth/token](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/authentication/authenticate.md): Request an access token for authentication with Ripple APIs. You need to request a token for the environment you want to authenticate with. **Note**: The length of the access token isn't fixed, hence
 - [GET /v2/oauth/token/test](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/authentication/testauthtoken.md): Test if an access token can be used for authentication with Ripple APIs and how much time remains on it.
## Collection Links

 - [GET /v0/collections/links](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/collection-links/listcollections.md): Retrieves a list of collections, filterable by query parameters.
 - [POST /v0/collections/links](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/collection-links/createcollection.md): Creates a new payment link for a collection.
 - [GET /v0/collections/links/{collection_id}](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/collection-links/getcollectionbyid.md): Retrieves the details of a specific collection by its ID.
 - [POST /v0/collections/links/cancel](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/collection-links/cancelcollection.md): API to cancel a payment collection.
## Collection Channels

 - [GET /v0/collections/channels](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/collection-channels/listchannels.md): Retrieves a list of channels, filterable by query parameters.
 - [POST /v0/collections/channels](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/collection-channels/createchannel.md): Creates a new payment channel between payer and beneficiary.
 - [GET /v0/collections/channels/{channel_id}](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/collection-channels/getchannelbyid.md): Retrieves the details of a specific channel by its ID.
## Partners

 - [GET /v0/collections/partners](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/partners/listpartners.md): Retrieves a list of partners, filterable by ID or type.
 - [POST /v0/collections/partners](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/partners/createpartner.md): This API allows users to add new parties who can transact.
 - [GET /v0/collections/partners/{partner_id}](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/partners/getpartnerbyid.md): This API allows users to retrieve a specific partner by their ID.
 - [PUT /v0/collections/partners/{partner_id}](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/partners/updatepartner.md): API to update a partner to use in collections API.
## Settlements

 - [GET /v0/collections/settlements](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/settlements/listsettlements.md): API to fetch first party payouts (settlements).
 - [GET /v0/collections/settlements/{settlement_id}](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/settlements/getsettlementbyid.md): API to fetch a first party payout (settlement to our customer).
## Transactions

 - [GET /v0/collections/transactions](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/transactions/listtransactions.md): API to fetch transactions across collections links or channels (transactions).
 - [GET /v0/collections/transactions/{transaction_id}](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/transactions/gettransactionbyid.md): API to fetch a transaction (payment from a payer to beneficiary)
## Webhooks

 - [GET /v0/collections/webhooks](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/webhooks/listwebhooks.md)
 - [POST /v0/collections/webhooks](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/webhooks/createwebhooks.md): Creates one webhook per event type supplied.
 - [GET /v0/collections/webhooks/{webhook_id}](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/webhooks/getwebhook.md)
 - [PUT /v0/collections/webhooks/{webhook_id}](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/webhooks/updatewebhook.md)
 - [DELETE /v0/collections/webhooks/{webhook_id}](https://docs.ripple.com/pt-br/products/collections/v0/api/collections/webhooks/deletewebhook.md)
