Base URL
All requests go over HTTPS to this base. Plain HTTP calls are rejected.
https://api.nexet.io/v1The version is part of the path. A new major version is only released for a breaking change; new fields are added without changing the version.
Developers
A predictable REST API: plural resources, JSON in and out, amounts in the currency's smallest unit and explicit errors.
Reference still being aligned with the implementation: confirm every signature with the technical team before relying on it in production. Remove this notice once the documentation is approved.
All requests go over HTTPS to this base. Plain HTTP calls are rejected.
https://api.nexet.io/v1The version is part of the path. A new major version is only released for a breaking change; new fields are added without changing the version.
Authentication uses your secret key with HTTP basic auth: the key is the username, the password stays empty.
curl https://api.nexet.io/v1/payments \
-u sk_test_4dLm…:Every creation endpoint accepts an Idempotency-Key header. Replaying the same key returns the original response instead of creating a second object: no double payment on a network retry.
-H "Idempotency-Key: ord-1042"Errors use standard HTTP codes and return an error object describing the cause. Pass the request identifier on to support.
{
"error": {
"type": "card_declined",
"code": "insufficient_funds",
"message": "The card has insufficient funds.",
"request_id": "req_8Kd92mLp"
}
}| Code | type | Meaning |
|---|---|---|
| 400 | invalid_request | Missing or invalid parameter. |
| 401 | authentication_error | API key missing, invalid or revoked. |
| 402 | card_declined | Payment declined by the card issuer. |
| 404 | not_found | The requested resource does not exist. |
| 409 | idempotency_conflict | Idempotency key reused with a different body. |
| 429 | rate_limit | Too many requests: retry with increasing backoff. |
| 500 | api_error | Incident on the Nexet Pay side. The request can be replayed. |
Lists are cursor-paginated: limit sets the page size, starting_after resumes after the given identifier. The response indicates whether more items remain.
GET /v1/payments?limit=50&starting_after=pay_3jF8dK2mCollect, retrieve, capture and refund a payment.
| POST | /v1/payments | Create a payment (immediate capture or authorisation). |
| GET | /v1/payments/{id} | Retrieve a payment and its status. |
| GET | /v1/payments | List payments, with status and date filters. |
| POST | /v1/payments/{id}/capture | Capture all or part of an authorisation. |
| POST | /v1/payments/{id}/refunds | Refund a payment, in full or in part. |
Create shareable payment links, with a fixed or open amount.
| POST | /v1/payment_links | Create a payment link and its QR code. |
| GET | /v1/payment_links/{id} | Retrieve a link and its payment counter. |
| GET | /v1/payment_links | List payment links. |
| POST | /v1/payment_links/{id}/deactivate | Deactivate a link before its expiry date. |
Define plans and manage the subscription lifecycle.
| POST | /v1/plans | Create a subscription plan (amount, frequency, trial). |
| POST | /v1/subscriptions | Subscribe a customer to a plan. |
| GET | /v1/subscriptions/{id} | Retrieve a subscription and its current cycle. |
| POST | /v1/subscriptions/{id}/cancel | Cancel a subscription, immediately or at period end. |
Issue invoices and track their payment.
| POST | /v1/invoices | Create an invoice with its line items and VAT. |
| POST | /v1/invoices/{id}/send | Email the invoice with its payment button. |
| GET | /v1/invoices/{id} | Retrieve an invoice and its payment status. |
| GET | /v1/invoices | List invoices. |
Store your customers and their tokenised payment methods.
| POST | /v1/customers | Create a customer and store their payment methods. |
| GET | /v1/customers/{id} | Retrieve a customer. |
| GET | /v1/customers | List customers. |
Declare an endpoint URL from your merchant space: every event is POSTed there, with exponential retries until acknowledged (2xx response).
Each request carries a Nexet-Signature header with the timestamp and an HMAC signature of the body. Verify it before processing the event, and reject timestamps that are too old.
Nexet-Signature: t=1786982400,v1=5f2c…The sandbox is free and unlimited. Simulation cards let you trigger each scenario with no real movement of funds.
| Scenario | Expected result |
|---|---|
| Payment accepted | succeeded status, simulated settlement. |
| 3-D Secure authentication required | requires_action status, then 3DS redirect. |
| Card declined | card_declined error with the decline reason. |
The full list of test cards and their decline codes is available in your merchant space, under Test environment.
Describe your use case: our technical team replies within one business day.
Contact the technical team