Overview
The base URLs for each environment are as follows:
| Environment | Base URL |
|---|---|
Sandbox (UAT) |
https://api.staging.pipevest.com/v1 |
Production |
https://api.pipevest.com/v1 |
What’s available today
Section titled “What’s available today”The Client API surface that is live today is:
| Resource | Endpoints |
|---|---|
| Authentication | POST /v1/oauth/token, POST /v1/oauth/revoke, GET /v1/oauth/me |
| Customers | POST /v1/customers, GET /v1/customers, GET /v1/customers/{id}, PATCH /v1/customers/{id} |
| Payments | GET /v1/payment/status/{orderId} |
The USSD API adds POST /v1/ussd/session and POST /v1/ussd/process.
Authenticating endpoints
Section titled “Authenticating endpoints”All endpoints (except the token exchange itself) are authenticated with an OAuth 2.0 client-credentials bearer token. A clientId and clientSecret are exchanged for a short-lived token, which is then sent on every request together with your x-client-id.
Access Token Request
Send a JSON body to POST /v1/oauth/token. Returns HTTP 200.
curl --request POST \ --url https://api.staging.pipevest.com/v1/oauth/token \ --header 'Content-Type: application/json' \ --data '{"clientId": "<client-id>", "clientSecret": "<client-secret>"}'Authenticate Requests with Token
curl --request GET \ --url https://api.staging.pipevest.com/v1/customers \ --header 'Authorization: Bearer <access-token>' \ --header 'x-client-id: <client-id>'