Payment and Refund Notification

🔒

Requires write_payment_info access scope.

This API allows third-party payment providers to asynchronously notify Shoplazza of the final result for both payments and refunds.
If Shoplazza does not receive a successful response (200 OK), the request should be retried.

  • For payments, notify the final payment result.
  • For refunds, notify the final refund result.

Both notifications share the same endpoint and request format, with differences only in the type and status values.

Request Headers

HeaderDescription
Access-TokenOAuth authorization token returned upon authentication.
Shoplazza-Shop-DomainSystem domain name assigned by Shoplazza.
Shoplazza-Hmac-Sha256The encrypted signature calculated using the signature method.
Content-TypeFixed as application/json.

Request Parameters

Key

Required

Type

Description

Example

app_id

Y

string

Payments app ID.

"12345"

payment_id

Y

string

Payment ID.

"7eb3fefb-6b43-4400-b40a-a2a0531364ae"

amount

Y

number

Order amount.

254.20

currency

Y

string

Currency type.

"CAD"

status

Y

string

Status of the transaction: - For payments:
   - paid (successful)
   - failed (failed)

  • For refunds:   
  • refund_success (successful)  
      - refund_failed (failed)

"failed"

transaction_no

Y

string

Third-party payment system order number.

"123456789"

type

Y

string

Type of notification:

  • "sale" for payment notifications
  • "refund" for refund notifications

"sale"

message

N

string

Payment failure message, required if payment fails.

"Charge invalid parameter"

error_code

Y

string

Error code (required when status is failed).

"charge_invalid_parameter"

test

Y

boolean

Indicates whether the request is in test mode.

false

extension

N

object

Custom extended fields.

{ "foo": "bar" }

timestamp

Y

string

ISO 8601 formatted timestamp.

"2021-09-01T18:32:20Z"

Response Explanation

Public Response Parameters

📘

Successful Response

KeyTypeDescriptionExample
HTTP Status CodenumberShoplazza returns 200 after receiving the request.200
Language
URL
Click Try It! to start a request and see the response here!