Shoplazza Billing API API
The Billing API API from Shoplazza — 10 operation(s) for billing api.
The Billing API API from Shoplazza — 10 operation(s) for billing api.
openapi: 3.1.0
info:
title: SPZ Admin Access Billing API API
version: '2022.01'
servers:
- url: https://{subdomain}.myshoplaza.com
variables:
subdomain:
default: developer
security:
- sec0: []
tags:
- name: Billing API
description: ''
paths:
/openapi/2022-01/payments_apps/complete_callbacks:
post:
tags:
- Billing API
summary: Complete Payment
description: ''
operationId: payment-session
parameters:
- name: Access-Token
in: header
description: Oauth's Access Token
required: true
schema:
type: string
- name: Shoplazza-Shop-Domain
in: header
description: Shoplazza's store domain
required: true
schema:
type: string
- name: Shoplazza-Hmac-Sha256
in: header
description: the hmac signature for this request
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
required:
- app_id
- payment_id
- amount
- currency
- transaction_no
- type
- test
- status
- timestamp
properties:
app_id:
type: string
description: Payment App's ID
payment_id:
type: string
description: Payment ID
amount:
type: number
description: Order's total price
format: float
currency:
type: string
description: Three-letter ISO 4217 currency code
transaction_no:
type: string
description: Payment App's transaction number for reference
type:
type: string
description: Either `sale` or `authorization`. If you support payment authorization, then this value is set based on the merchant's configuration. If you don't support separate authorization and capture, then the value is always `sale`. For sale transactions, you need to capture the funds instantly with this request. For authorization transactions, you must place a hold on the funds and capture them later when Shoplazza sends a capture request.
test:
type: boolean
description: Indicates whether the payment is in test or live mode. Refer to Test mode for more information.
status:
type: string
description: Payment status from Payment App
enum:
- paid
- failed
extension:
type: object
description: Customize object from Payment App
properties: {}
timestamp:
type: string
description: 'ISO-8601 format timestamp, eg: `2021-09-01T18:32:20Z`'
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{ "redirect_url": "https://developer.myshoplaza.com/products/test_product" }'
schema:
type: object
properties:
redirect_url:
type: string
example: https://developer.myshoplaza.com/products/test_product
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
security: []
/openapi/2022-01/payments_apps/notify_callbacks:
post:
tags:
- Billing API
summary: Notify Payment
description: ''
operationId: notify-payment
parameters:
- name: Access-Token
in: header
description: Oauth's Access Token
required: true
schema:
type: string
- name: Shoplazza-Shop-Domain
in: header
description: Shoplazza's store domain
required: true
schema:
type: string
- name: Shoplazza-Hmac-Sha256
in: header
description: the hmac signature for this request
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
required:
- app_id
- payment_id
- amount
- status
- currency
- transaction_no
- type
- test
- timestamp
properties:
app_id:
type: string
description: Payment App's ID
payment_id:
type: string
description: Payment ID
amount:
type: number
description: Order's total price
format: float
status:
type: string
description: Payment status from Payment App
enum:
- paid
- failed
currency:
type: string
description: Three-letter ISO 4217 currency code
transaction_no:
type: string
description: Payment App's transaction number for reference
type:
type: string
description: Either `sale` or `authorization`. If you support payment authorization, then this value is set based on the merchant's configuration. If you don't support separate authorization and capture, then the value is always `sale`. For sale transactions, you need to capture the funds instantly with this request. For authorization transactions, you must place a hold on the funds and capture them later when Shoplazza sends a capture request.
message:
type: string
description: fail reason describe here while payment fail
error_code:
type: string
description: payment error code from Payment App
test:
type: boolean
description: Indicates whether the payment is in test or live mode. Refer to Test mode for more information.
extension:
type: object
description: Customize object from Payment App
properties: {}
timestamp:
type: string
description: 'ISO-8601 format timestamp, eg: `2021-09-01T18:32:20Z`'
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
security: []
/openapi/2022-01/application_charges:
post:
tags:
- Billing API
summary: Create application charge
description: Create application charge
operationId: creates-an-application-charge
requestBody:
content:
application/json:
schema:
type: object
properties:
application_charge:
type: object
required:
- name
- price
properties:
name:
type: string
description: The application charge name.
price:
type: string
description: The price of the application charge.
return_url:
type: string
description: The URL where the merchant is redirected after accepting a charge.
test:
type: boolean
description: Whether the application charge is a test transaction.
examples:
Request Example:
value:
application_charge:
name: test
price: '2000'
return_url: https://shoplazza.com
test: false
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"id\": \"675931192\",\n \"name\": \"Super Duper Expensive action\",\n \"price\": \"100.00\",\n \"return_url\": \"http://test.myshoplaza.com\",\n \"status\": \"pending\",\n \"test\": false,\n \"created_at\": \"2022-06-27T08:48:27Z\",\n \"updated_at\": \"2022-12-27T08:47:27Z\"\n}"
schema:
type: object
properties:
id:
type: string
example: '675931192'
name:
type: string
example: Super Duper Expensive action
price:
type: string
example: '100.00'
confirm_url:
type: string
example: https://{subdomain}.myshoplaza.com/admin/smart_apps/angora/app_store/charges/s1deCNrkHePwO3HDDZb_zfWJAge07nzNckPyfM_Hvp0/356714323462063172/recurring/confirm?signature=69c827b70e05c772d7b8d3472b4b2fe2
return_url:
type: string
example: http://test.myshoplaza.com
status:
type: string
example: pending
test:
type: boolean
example: false
default: true
created_at:
type: string
example: '2022-06-27T08:48:27Z'
updated_at:
type: string
example: '2022-12-27T08:47:27Z'
'422':
description: '422'
content:
application/json:
examples:
Result:
value: "{\n\t\"errors\":[\"The chargetype configuration in the plan does not match with the listing, please check \"]\n}"
schema:
type: object
properties:
errors:
type: array
items:
type: string
example: 'The chargetype configuration in the plan does not match with the listing, please check '
deprecated: false
get:
tags:
- Billing API
summary: Get Application Charge List
description: get application charge list
operationId: application-charge-list
parameters:
- name: per_page
in: query
schema:
type: integer
format: int32
default: 10
- name: since_id
in: query
description: Restrict results to after the specified ID.
schema:
type: string
- name: charges_status
in: query
description: 'Filter charges by charges status, separated by comma, for example: `pending,accepted,declined,active,expired,frozen,cancelled,paid_failed,paying`'
schema:
type: string
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"count\": 1,\n \"application_charges\": [\n {\n \"id\": \"196935770592782247\",\n \"application_id\": \"Cg5za12Pp3pwNA9Zw3t4Up5PFQGBsgYW_dyqs8wsiBg\",\n \"name\": \"one time charge\",\n \"price\": \"200\",\n \"confirm_url\": \"https://test.dev.myshoplaza.com/admin/smart_apps/angora/app_store/charges/Cg5za12Pp3pwNA9Zw3t4Up5PFQGBsgYW_dyqs8wsiBg/196935770592782247/one-time/confirm?signature=a636857cb3ed214c67026905d31c9f51\",\n \"return_url\": \"https://www.myshoplazza.com\",\n \"status\": \"active\",\n \"test\": false,\n \"created_at\": \"2022-12-26T10:32:27Z\",\n \"updated_at\": \"2022-12-26T10:32:38Z\"\n }\n ]\n}"
schema:
type: object
properties:
count:
type: integer
example: 1
default: 0
application_charges:
type: array
items:
type: object
properties:
id:
type: string
example: '196935770592782247'
application_id:
type: string
example: Cg5za12Pp3pwNA9Zw3t4Up5PFQGBsgYW_dyqs8wsiBg
name:
type: string
example: one time charge
price:
type: string
example: '200'
confirm_url:
type: string
example: https://test.dev.myshoplaza.com/admin/smart_apps/angora/app_store/charges/Cg5za12Pp3pwNA9Zw3t4Up5PFQGBsgYW_dyqs8wsiBg/196935770592782247/one-time/confirm?signature=a636857cb3ed214c67026905d31c9f51
return_url:
type: string
example: https://www.myshoplazza.com
status:
type: string
example: active
test:
type: boolean
example: false
default: true
created_at:
type: string
example: '2022-12-26T10:32:27Z'
updated_at:
type: string
example: '2022-12-26T10:32:38Z'
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
/openapi/2022-01/application_charges/{charge_id}:
get:
tags:
- Billing API
summary: Get Application Charge Detail
description: get application charge detail
operationId: get-application-charge-detail
parameters:
- name: charge_id
in: path
description: the application charge id
schema:
type: string
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"application_charge\": {\n \"id\": \"19693577059278247\",\n \"application_id\": \"Cg5za12Pp3pwNA9Zw3t4Up5PFQGBsgYW_dyqs8wsiBg\",\n \"name\": \"one time charge\",\n \"price\": \"200\",\n \"confirm_url\": \"https://test.dev.myshoplaza.com/admin/smart_apps/angora/app_store/charges/Cg5za12Pp3pwNA9Zw3t4Up5PFQGBsgYW_dyqs8wsiBg/196935770592782247/one-time/confirm?signature=a636857cb3ed214c67026905d31c9f51\",\n \"return_url\": \"https://www.myshoplazza.com\",\n \"status\": \"active\",\n \"test\": false,\n \"created_at\": \"2022-12-26T10:32:27Z\",\n \"updated_at\": \"2022-12-26T10:32:38Z\"\n }\n}"
schema:
type: object
properties:
application_charge:
type: object
properties:
id:
type: string
example: '19693577059278247'
application_id:
type: string
example: Cg5za12Pp3pwNA9Zw3t4Up5PFQGBsgYW_dyqs8wsiBg
name:
type: string
example: one time charge
price:
type: string
example: '200'
confirm_url:
type: string
example: https://test.dev.myshoplaza.com/admin/smart_apps/angora/app_store/charges/Cg5za12Pp3pwNA9Zw3t4Up5PFQGBsgYW_dyqs8wsiBg/196935770592782247/one-time/confirm?signature=a636857cb3ed214c67026905d31c9f51
return_url:
type: string
example: https://www.myshoplazza.com
status:
type: string
example: active
test:
type: boolean
example: false
default: true
created_at:
type: string
example: '2022-12-26T10:32:27Z'
updated_at:
type: string
example: '2022-12-26T10:32:38Z'
'404':
description: '404'
content:
application/json:
examples:
Result:
value: "{\n\t\"errors\":[\"record not found\"]\n}"
schema:
type: object
properties:
errors:
type: array
items:
type: string
example: record not found
deprecated: false
/openapi/2022-01/recurring_application_charges:
post:
tags:
- Billing API
summary: Create Recurring Aplication Charge
description: create recurring application charge
operationId: create-recurring-aplication-charge
requestBody:
content:
application/json:
schema:
type: object
properties:
recurring_application_charge:
type: object
required:
- name
- price
- return_url
properties:
name:
type: string
description: The recurring application charge name.
price:
type: string
description: The price of the recurring application charge.
return_url:
type: string
description: The URL where the merchant is redirected after accepting a charge.
trial_days:
type: integer
description: The number of days that the customer is eligible for a free trial.
format: int32
capped_amount:
type: string
description: The limit a customer can be charged for usage based billing. If this property is provided, then you must also provide the terms property. See usage charges for more information.
terms:
type: string
description: The terms and conditions of usage based billing charges. Must be present in order to create usage charges, for example when the capped_amount property is provided. Presented to the merchant when they approve an app's usage charges.
test:
type: boolean
description: Whether the application charge is a test transaction.
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"id\": \"197305863545821979\",\n \"name\": \"Super Duper Plan\",\n \"price\": \"10.00\",\n \"status\": \"pending\",\n \"return_url\": \"http://test.myshoplazza.com/\",\n \"billing_on\": null,\n \"created_at\": \"2022-10-03T12:52:58Z\",\n \"updated_at\": \"2022-10-03T12:52:58Z\",\n \"test\": true,\n \"capped_amount\": \"0\",\n \"terms\": \"\",\n \"activated_on\": null,\n \"cancelled_on\": null,\n \"trial_days\": 0,\n \"trial_ends_on\": null,\n \"confirmation_url\": \"https://test.myshoplaza.com/admin/smart_apps/angora/app_store/charges/JRmYDxJEutAwkQFpaw8PDRfPIrgUBpJOJZYaOKg3kPU/197305863545821979/recurring/confirm?signature=eba7691fe062b6fa9357398a115d4e01\"\n }"
schema:
type: object
properties:
id:
type: string
example: '197305863545821979'
name:
type: string
example: Super Duper Plan
price:
type: string
example: '10.00'
status:
type: string
example: pending
return_url:
type: string
example: http://test.myshoplazza.com/
billing_on: {}
created_at:
type: string
example: '2022-10-03T12:52:58Z'
updated_at:
type: string
example: '2022-10-03T12:52:58Z'
test:
type: boolean
example: true
default: true
capped_amount:
type: string
example: '0'
terms:
type: string
example: ''
activated_on: {}
cancelled_on: {}
trial_days:
type: integer
example: 0
default: 0
trial_ends_on: {}
confirmation_url:
type: string
example: https://test.myshoplaza.com/admin/smart_apps/angora/app_store/charges/JRmYDxJEutAwkQFpaw8PDRfPIrgUBpJOJZYaOKg3kPU/197305863545821979/recurring/confirm?signature=eba7691fe062b6fa9357398a115d4e01
'422':
description: '422'
content:
application/json:
examples:
Result:
value: "{\n\t\"errors\":[\"The chargetype configuration in the plan does not match with the listing, please check\"]\n}"
schema:
type: object
properties:
errors:
type: array
items:
type: string
example: The chargetype configuration in the plan does not match with the listing, please check
deprecated: false
get:
tags:
- Billing API
summary: Get Recurring Application Charge List
description: get recurring application charge list
operationId: get-recurring-application-charge-list
parameters:
- name: per_page
in: query
schema:
type: integer
format: int32
default: 10
- name: since_id
in: query
description: Restrict results to after the specified ID.
schema:
type: string
- name: charges_status
in: query
description: 'Filter charges by charges status, separated by comma, for example: `pending,accepted,declined,active,expired,frozen,cancelled,paid_failed,paying`'
schema:
type: string
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"count\": 1,\n \"recurring_application_charges\": [{\n \"id\": \"197305863545821979\",\n \"name\": \"Super Duper Plan\",\n \"price\": \"10.00\",\n \"status\": \"pending\",\n \"return_url\": \"http://test.myshoplazza.com/\",\n \"billing_on\": null,\n \"created_at\": \"2022-10-03T12:52:58Z\",\n \"updated_at\": \"2022-10-03T12:52:58Z\",\n \"test\": true,\n \"activated_on\": null,\n \"cancelled_on\": null,\n \"trial_days\": 0,\n \"trial_ends_on\": null,\n \"confirmation_url\": \"https://test.myshoplaza.com/admin/smart_apps/angora/app_store/charges/JRmYDxJEutAwkQFpaw8PDRfPIrgUBpJOJZYaOKg3kPU/197305863545821979/recurring/confirm?signature=eba7691fe062b6fa9357398a115d4e01\"\n }]\n}"
schema:
type: object
properties:
count:
type: integer
example: 1
default: 0
recurring_application_charges:
type: array
items:
type: object
properties:
id:
type: string
example: '197305863545821979'
name:
type: string
example: Super Duper Plan
price:
type: string
example: '10.00'
status:
type: string
example: pending
return_url:
type: string
example: http://test.myshoplazza.com/
billing_on: {}
created_at:
type: string
example: '2022-10-03T12:52:58Z'
updated_at:
type: string
example: '2022-10-03T12:52:58Z'
test:
type: boolean
example: true
default: true
activated_on: {}
cancelled_on: {}
trial_days:
type: integer
example: 0
default: 0
trial_ends_on: {}
confirmation_url:
type: string
example: https://test.myshoplaza.com/admin/smart_apps/angora/app_store/charges/JRmYDxJEutAwkQFpaw8PDRfPIrgUBpJOJZYaOKg3kPU/197305863545821979/recurring/confirm?signature=eba7691fe062b6fa9357398a115d4e01
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
/openapi/2022-01/recurring_application_charges/{charge_id}:
get:
tags:
- Billing API
summary: Get Recurring Application Charge
description: get rucurring application charge
operationId: get-recurring-application-charge
parameters:
- name: charge_id
in: path
schema:
type: string
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"recurring_application_charges\": {\n \"id\": \"197305863545821979\",\n \"name\": \"Super Duper Plan\",\n \"price\": \"10.00\",\n \"status\": \"pending\",\n \"return_url\": \"http://test.myshoplazza.com/\",\n \"billing_on\": null,\n \"created_at\": \"2022-10-03T12:52:58Z\",\n \"updated_at\": \"2022-10-03T12:52:58Z\",\n \"test\": true,\n \"activated_on\": null,\n \"cancelled_on\": null,\n \"trial_days\": 0,\n \"trial_ends_on\": null,\n \"confirmation_url\": \"https://test.myshoplaza.com/admin/smart_apps/angora/app_store/charges/JRmYDxJEutAwkQFpaw8PDRfPIrgUBpJOJZYaOKg3kPU/197305863545821979/recurring/confirm?signature=eba7691fe062b6fa9357398a115d4e01\"\n }\n}"
schema:
type: object
properties:
recurring_application_charges:
type: object
properties:
id:
type: string
example: '197305863545821979'
name:
type: string
example: Super Duper Plan
price:
type: string
example: '10.00'
status:
type: string
example: pending
return_url:
type: string
example: http://test.myshoplazza.com/
billing_on: {}
created_at:
type: string
example: '2022-10-03T12:52:58Z'
updated_at:
type: string
example: '2022-10-03T12:52:58Z'
test:
type: boolean
example: true
default: true
activated_on: {}
cancelled_on: {}
trial_days:
type: integer
example: 0
default: 0
trial_ends_on: {}
confirmation_url:
type: string
example: https://test.myshoplaza.com/admin/smart_apps/angora/app_store/charges/JRmYDxJEutAwkQFpaw8PDRfPIrgUBpJOJZYaOKg3kPU/197305863545821979/recurring/confirm?signature=eba7691fe062b6fa9357398a115d4e01
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
delete:
tags:
- Billing API
summary: Cancel Recurring Application Charge
description: cancel recurring application charge
operationId: cancel-recurring-application-charge
parameters:
- name: charge_id
in: path
schema:
type: string
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'404':
description: '404'
content:
application/json:
examples:
Result:
value: "{\n\t\"errors\":[\"record not found\"]\n}"
schema:
type: object
properties:
errors:
type: array
items:
type: string
example: record not found
deprecated: false
/openapi/2022-01/orders/{id}/payment/success:
post:
tags:
- Billing API
summary: Order Payment Success
description: ''
operationId: order-payment-success
parameters:
- name: id
in: path
description: Order's ID
schema:
type: string
required: true
requestBody:
content:
application/json:
schema:
type: object
properties:
billing_address:
type: object
properties:
first_name:
type: string
# --- truncated at 32 KB (77 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/shoplazza/refs/heads/main/openapi/shoplazza-billing-api-api-openapi.yml