# Create Bulk Payment Request

> POST `/secure/bulkpaymentrequests/create`
> Part of the Payments API reference. Source: https://hub.ozow.com/api-reference/payments-api/post-secure-bulkpaymentrequests-create/

Server: `https://api.ozow.com` (Production)

Other environments: `https://stagingapi.ozow.com` (Staging)

Submit up to 5000 payment requests as one job. The response says only whether the job was accepted. The payment links and the per-request results are sent to the notification URL in the request once the job finishes.

## Authentication

- `BearerToken` (HTTP bearer)
  - The token generated by the `Get API token` operation. The same token is used for every request until it expires.

## Request body

**application/json**

- `jobReference` (string, required, max length 100) - The merchant reference for the job/batch of payment requests to be created.
- `notifyUrl` (string, uri, required, max length 150) - The URL where the results for the job will be posted to after the job has been processed.
- `compressedData` (string, required) - A GZIP compressed JSON string of the array of payment request records. Each element carries the fields of a [payment request link](openapi:payments-api#schema/PaymentRequestLink); the result notification adds the outcome fields to each record it sends back. **To compress:** build the JSON array, encode it as UTF-8 bytes, GZIP those bytes, then base64 the compressed bytes. **To decompress what you receive:** base64 decode to bytes, GZIP decompress, then read the bytes as UTF-8.

**application/xml**

`BulkPaymentRequest`, the same schema listed in full earlier in this document. Its own page: https://hub.ozow.com/api-reference/payments-api/schemas/bulk-payment-request.md

## Responses

### 200 OK

**application/json**

- `jobId` (string, uuid, required) - The identifier for the job created to process the bulk payment requests. No identifier is returned if there was an error creating the job or if the request submitted failed the initial validation.
- `jobReference` (string, required, max length 100) - The merchant reference for the job/batch that was passed in the create request.
- `errors` (array of string) - Validation errors for the request.

**application/xml**

`BulkPaymentResponse`, the same schema listed in full earlier in this document. Its own page: https://hub.ozow.com/api-reference/payments-api/schemas/bulk-payment-response.md

### 400 Bad Request. The operation could not be carried out. The body is a message rather than a structured error.

string

Example (example 1):

```json
There was an error processing your request
```

### 401 Unauthorized. The `ApiKey` header is missing or does not match the site, or for a `Secure` operation the bearer token is missing, expired or invalid.

string

Example (example 1):

```json
API key is missing or invalid.
```
