Lopay Partner API
  1. Webhook subscriptions
Lopay Partner API
  • Introduction
  • Environments
  • Authentication
  • Webhooks
  • Terminal ordering
  • Reporting
  • Errors
  • Getting started
  • Payment Links
    • List all payment links
      GET
    • Create a new payment link
      POST
    • Get existing payment link
      GET
    • Update existing payment link
      PATCH
    • Revoke an existing payment link
      DELETE
    • Send a payment link via email and/or SMS
      POST
  • Webhook subscriptions
    • Get login link for Lopay Partner Webhook Portal
      GET
    • List webhook subscriptions
      GET
    • Create webhook subscription
      POST
    • Update existing webhook subscription
      PUT
    • Remove an existing webhook subscription
      DELETE
  • Merchants
    • List all merchants
      GET
    • Register a new merchant
      POST
    • Get merchant details
      GET
    • Update merchant bank details for receiving payouts.
      PUT
    • Get merchant onboarding link
      GET
    • Create account session with permissions for the specified embedded components.
      POST
    • Get list of available hardware for given merchant to purchase
      GET
    • Order terminal hardware for the specified merchant.
      POST
  • Marketing Deeplinks
    • List all affiliate marketing deeplinks.
    • Create a new affiliate marketing deeplink.
  • Reports
    • List all statement activity
  • Customers
    • Temporarily store customer details
  • Subscription Plans
    • Create a new subscription plan
    • List all subscription plans
    • Get existing subscription plan
  • Subscriptions
    • Get existing subscription
  1. Webhook subscriptions

Create webhook subscription

Production Environment
https://api.lopay.com
Production Environment
https://api.lopay.com
POST
/api/1/partner/webhooks
Webhook subscriptions

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Body Params application/json
events
array[string]
required
Allowed values:
merchant.capabilities.updatedmerchant.payout.createdmerchant.payout.paidmerchant.payout.cancelledmerchant.payout.failedpayment.successpayment.failedpaymentLink.createdpaymentLink.updatedpaymentLink.revoked
url
string <uri>
required
merchantIds
array[string <uuid>] | null 
optional
<= 1 items
Examples
{
    "events": [
        "payment.success",
        "payment.failed"
    ],
    "url": "https://api.example/webhooks/lopay"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://api.lopay.com/api/1/partner/webhooks' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
    "events": [
        "payment.success",
        "payment.failed"
    ],
    "url": "https://api.example/webhooks/lopay"
}'

Responses

🟢201Created
application/json
Created response
Body
id
string 
required
events
array[string]
required
Allowed values:
merchant.capabilities.updatedmerchant.payout.createdmerchant.payout.paidmerchant.payout.cancelledmerchant.payout.failedpayment.successpayment.failedpaymentLink.createdpaymentLink.updatedpaymentLink.revoked
url
string <uri>
required
webhookSecretKey
string 
required
Example
{
    "id": "ep_1srOrx2ZWZBpBUvZwXKQmoEYgab",
    "events": [
        "payment.success",
        "payment.failed"
    ],
    "url": "https://api.example/webhooks/lopay",
    "webhookSecretKey": "whsec_YXDKaykd6oBK7J/hrFqstWuFfAxbVFSl"
}
🟠400Bad Request
🟠401Unauthorized
Modified at 2025-06-04 16:00:16
Previous
List webhook subscriptions
Next
Update existing webhook subscription
Built with