The Create Application Charge API is used to create a charge for an application within Shoplazza. This API is essential for developers implementing billing functionalities for their apps, ensuring that the charges match the pricing defined in the APP package settings.
This API is especially useful for:
Enabling app developers to implement billing workflows.
Redirecting users to a specified URL after payment.
Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field
Type
Example
Description
errors
Array
[ "file number error"]
A list of errors encountered during the request processing.
Field
Type
Example
Description
error
String
"page not found"
Indicates an error encountered during the process
Error Detail
Status Code
Message
Possible Reason
Example Response
400
Bad Request
Invalid input format or request structure (e.g., missing required fields or incorrect data types).
Bad Request
Unauthorized
The request is missing valid authentication credentials or the credentials provided are invalid.
Unauthorized
422
Unprocessable Entity
The application_charge.name field is either missing or an empty string in the request payload.
"Name is required"
return_url field is missing, malformed, or not a valid URL.
"ReturnUrl must be a valid URL"
The price field in your request might not match the pricing specified in your app’s package settings on Shoplazza.
"The chargetype configuration in the plan does not match with the listing, please check"
API Structure Overview
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!