Skip to content

Authentication

API Access

Paymega API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Public API

Address: api.paymega.io/public-api

Public API queries use live or test Public Keys. Find them in the Account setting → Integration

Private API

Address: api.paymega.io

Use the Account ID as Login (Username) and API key as Password. You can also find them in the commerce Account settings → Integration

BasicAuth Standard: Authorization = Basic base64(username:password)

  curl -X POST \
    api.paymega.io/payment-invoices \
    -H 'Accept: */*' \
    -H 'Authorization: Basic Y29tYV92VDZMRFUwVHhPeG1iT290OkJlTlZRQ2hLcFV2RUxac3gwVmVpbnRaUmNlSmFWSWdrZVY2N1NvOVB0Wnc=' \
    -d '{...}'