# One API

> API reference, version 1.0. Source: https://hub.ozow.com/api-reference/one-api/

Ozow OneAPI encompassing all REST API integrations possible with Ozow.

## Servers

- `https://one.ozow.com/v1` - Production
- `https://stagingone.ozow.com/v1` - Staging

## Authentication

- `Authentication` (oauth2)
  - Token URL: `https://one.ozow.com/v1/token`
  - Scope `payments`: Allows for all payment and transaction functionality, such as retrieving data and making payment requests.
  - Scope `payouts`: Allows for all payout specific functionality.
  - Scope `refunds`: Allows for initiating refunds and retrieving refund data.
  - Scope `settlements`: Allows for retrieving settlement information.
  - Scope `subscriptions`: Allows for creating and managing recurring payment subscriptions.
  - Scope `webhooks`: Allows for management of webhook endpoints.

## Operations

### Authentication

- `POST /token` - Generate Authentication Token

### Bank account

- `POST /bankaccount/verify` - Bank Account Verification

### Payments

- `GET /paymentmethods` - Get Payment Methods
- `GET /regions` - Get Regions
- `POST /payments` - Request Payment
- `GET /payments` - List Payments
- `GET /payments/{id}` - Get Payment Status by Id
- `POST /payments/{id}/cancel` - Cancel Payment Request
- `GET /payments/{id}/transactions` - List Transactions for Payment
- `POST /payments/{id}/transactions` - Request Transaction for Payment

### Refunds

- `GET /refunds` - List Refunds
- `POST /refunds` - Request Refunds
- `GET /refunds/{id}` - Get Refund
- `POST /refunds/{id}/cancel` - Cancel Refund
- `GET /refunds/{id}/notifications` - Get Refund Notifications
- `POST /refunds/{id}/notifications/resend` - Resend Refund Notifications

### Settlements

- `GET /settlements` - List Settlements
- `GET /settlements/{id}` - Get Settlement
- `GET /settlements/{id}/lineitems` - List Settlement Line Items

### Subscriptions

- `POST /subscriptions` - Create Subscription
- `GET /subscriptions` - List Subscriptions
- `GET /subscriptions/{subscriptionId}` - Get Subscription by Id
- `POST /subscriptions/{subscriptionId}/transactions` - Create Subscription Transaction
- `GET /subscriptions/{subscriptionId}/transactions` - List Subscription Transactions
- `POST /subscriptions/{subscriptionId}/cancel` - Cancel Subscription

### Transactions

- `POST /transactions` - Request Transaction
- `GET /transactions` - List Transactions
- `GET /transactions/{id}` - Get Transaction Status by Id
- `POST /transactions/{id}` - Process Transaction Step
- `POST /transactions/{id}/refunds` - Request Refund
- `GET /transactions/{id}/refunds` - Get Refunds
- `GET /transactions/{id}/notifications` - Get Transaction Notifications
- `POST /transactions/{id}/notifications/resend` - Resend Transaction Notifications

### Webhooks management

- `GET /webhooks` - List Webhook Subscriptions
- `POST /webhooks` - Create Webhook Subscription
- `GET /webhooks/{id}` - Get Webhook Subscription
- `PUT /webhooks/{id}` - Update Webhook Subscription
- `DELETE /webhooks/{id}` - Delete Webhook Subscription
- `POST /webhooks/{id}/replay` - Replay Failed Messages
- `GET /webhooks/{id}/secret` - Get Webhook Secret

## Webhooks

Sent by Ozow to your notification URL.

- Transaction completed
- Refund completed
- Subscription consent approved
- Subscription consent not approved
- Subscription collection succeeded
- Subscription collection failed
- Subscription completed
- Subscription cancelled
- Subscription expired
