Skip to content

Store payments API

Generated from api/openapi.public.yaml, the same spec the API serves. Try these operations in the API console; errors are Problem Details.

GET /api/v1/workspaces/{workspaceId}/payments/paypoint

Whether the store’s own PayPoint key is saved (never the key) and the wallets customers may pay with.

Operation id getStorePayPoint
Authentication A secret key (sk_live_… or sk_test_…), an SDK session token (sdk_…), or a secret partner key for one of the partner’s stores.
Permission (key scope) payments:manage
Plan feature commerce.payments
Name In Type Required Description
workspaceId path string yes Workspace id (UUID)
Status Description Body
200 OK application/json: StorePayPointBody
default Error application/problem+json: Problem
Terminal window
curl -X GET "https://api.nexafone.so/api/v1/workspaces/{workspaceId}/payments/paypoint" \
-H "Authorization: Bearer $NEXAFON_SECRET_KEY"

PUT /api/v1/workspaces/{workspaceId}/payments/paypoint

Replaces any saved key. The key is write-only: no response, now or later, contains more than its last four characters. The workspace’s owners and payment managers are told. A dashboard session needs a sign-in within the last 10 minutes; otherwise it answers 401 reauthentication_required. An SDK session is refused with 403 dashboard_sign_in_required.

Operation id saveStorePayPointKey
Authentication A secret key (sk_live_… or sk_test_…), an SDK session token (sdk_…), or a secret partner key for one of the partner’s stores.
Permission (key scope) payments:manage
Plan feature commerce.payments
Name In Type Required Description
workspaceId path string yes Workspace id (UUID)

application/json: StorePayPointKeyBody

Field Type Required Description
apiKey string yes The store’s own PayPoint API key. It is stored encrypted and never returned. (min length 1, max length 512)
merchantId string yes The store’s PayPoint merchant id (min length 1, max length 100, pattern ^[A-Za-z0-9_.-]+$)
Status Description Body
200 OK application/json: StorePayPointKeySavedBody
401 Unauthorized application/problem+json: Problem
422 Unprocessable Entity application/problem+json: Problem
500 Internal Server Error application/problem+json: Problem
503 Service Unavailable application/problem+json: Problem
Terminal window
curl -X PUT "https://api.nexafone.so/api/v1/workspaces/{workspaceId}/payments/paypoint" \
-H "Authorization: Bearer $NEXAFON_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKey":"string","merchantId":"string"}'

DELETE /api/v1/workspaces/{workspaceId}/payments/paypoint

The workspace’s owners and payment managers are told. A dashboard session needs a sign-in within the last 10 minutes; otherwise it answers 401 reauthentication_required. An SDK session is refused with 403 dashboard_sign_in_required.

Operation id deleteStorePayPointKey
Authentication A secret key (sk_live_… or sk_test_…), an SDK session token (sdk_…), or a secret partner key for one of the partner’s stores.
Permission (key scope) payments:manage
Plan feature commerce.payments
Name In Type Required Description
workspaceId path string yes Workspace id (UUID)
Status Description Body
204 No Content
401 Unauthorized application/problem+json: Problem
404 Not Found application/problem+json: Problem
422 Unprocessable Entity application/problem+json: Problem
500 Internal Server Error application/problem+json: Problem
Terminal window
curl -X DELETE "https://api.nexafone.so/api/v1/workspaces/{workspaceId}/payments/paypoint" \
-H "Authorization: Bearer $NEXAFON_SECRET_KEY"

Check the store’s PayPoint key with PayPoint

Section titled “Check the store’s PayPoint key with PayPoint”

POST /api/v1/workspaces/{workspaceId}/payments/paypoint/test

Asks PayPoint whether it accepts the saved key, without charging anyone.

Operation id testStorePayPointKey
Authentication A secret key (sk_live_… or sk_test_…), an SDK session token (sdk_…), or a secret partner key for one of the partner’s stores.
Permission (key scope) payments:manage
Plan feature commerce.payments
Name In Type Required Description
workspaceId path string yes Workspace id (UUID)
Status Description Body
200 OK application/json: StorePayPointKeyTestBody
404 Not Found application/problem+json: Problem
422 Unprocessable Entity application/problem+json: Problem
500 Internal Server Error application/problem+json: Problem
503 Service Unavailable application/problem+json: Problem
Terminal window
curl -X POST "https://api.nexafone.so/api/v1/workspaces/{workspaceId}/payments/paypoint/test" \
-H "Authorization: Bearer $NEXAFON_SECRET_KEY"

Choose the wallets customers may pay the store with

Section titled “Choose the wallets customers may pay the store with”

PUT /api/v1/workspaces/{workspaceId}/payments/paypoint/wallets

A dashboard session needs a sign-in within the last 10 minutes; otherwise it answers 401 reauthentication_required. An SDK session is refused with 403 dashboard_sign_in_required.

Operation id setStorePayPointWallets
Authentication A secret key (sk_live_… or sk_test_…), an SDK session token (sdk_…), or a secret partner key for one of the partner’s stores.
Permission (key scope) payments:manage
Plan feature commerce.payments
Name In Type Required Description
workspaceId path string yes Workspace id (UUID)

application/json: StorePayPointWalletsBody

Field Type Required Description
wallets array of "evc_plus" | "zaad" | "sahal" | "jeeb" | "edahab" | "premier_wallet" yes The wallets customers may pay with in the WhatsApp checkout (max 6 items)
Status Description Body
200 OK application/json: StorePayPointBody
401 Unauthorized application/problem+json: Problem
422 Unprocessable Entity application/problem+json: Problem
500 Internal Server Error application/problem+json: Problem
Terminal window
curl -X PUT "https://api.nexafone.so/api/v1/workspaces/{workspaceId}/payments/paypoint/wallets" \
-H "Authorization: Bearer $NEXAFON_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"wallets":["evc_plus"]}'