Merchant API

SBPay.me merchant API documentation

Authentication:

To access API, the X-Auth-Token and X-Merchant headers are mandatory. Additionally, certain methods may also require the X-Signature header, which is the HMAC (Hash-based Message Authentication Code) for the request body. The algorithm used for the HMAC can be specified by passing it as 'algo' in the request.

The X-Auth-Token header is the API key for the merchant and can be found in the merchant's account page.
The X-Merchant header is the merchant ID.

Subscription widget:

The subscription widget is a javascript widget that can be embedded in a merchant's website to allow customers to subscribe to the merchant's plans.

To see widget code and parameters please visit Widget documentation

SDK:

You can PHP SDK to integrate with our API. To see SDK documentation please visit SDK documentation

Servers:

SBPay.me API Server: https://app.sbpay.me/

payment

Approve order

POST /api/order/{id}/approve

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header
id string
Parameter in path

Request body: ApproveOrderRequestDTO
Response
Approves payment order. Returns empty response.

Example:
POST https://app.sbpay.me/api/order/1/approve HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256",
    "id": 1,
    "paymentMethod": "string",
    "transactionId": "string",
    "reason": "string",
    "zeroAmount": true
}

Cancel payment order

POST /api/order/{id}/cancel

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header
id string
Parameter in path

Request body: CancelOrderRequestDTO
Response
Cancels payment order. Returns empty response.

Example:
POST https://app.sbpay.me/api/order/1/cancel HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256",
    "id": 1,
    "reason": "string"
}

Initialize payment

Initializes payment and provides output containing details of subsequent actions.

POST /api/payment

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header

Response
Details of subsequent actions or error data.
InitPaymentResponseDTO

Example:
POST https://app.sbpay.me/api/payment HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "storePaymentMethod": true,
    "paymentMethodId": 1,
    "paymentSystem": "string",
    "referenceId": "string",
    "description": "string",
    "currency": "string",
    "lines": [
        {
            "name": "string",
            "description": "string",
            "qty": 1,
            "finalPrice": 0,
            "price": 0,
            "discounts": [
                {
                    "value": 0,
                    "type": "percentage"
                }
            ],
            "taxes": [
                {
                    "name": "string",
                    "rate": 0,
                    "inclusive": true,
                    "countryId": "string",
                    "stateId": "string",
                    "city": "string"
                }
            ],
            "periodStart": "2023-01-01T00:00:00+00:00",
            "periodEnd": "2023-01-01T00:00:00+00:00",
            "referenceId": "string",
            "referenceType": "string",
            "planPriceId": 1,
            "amount": 0
        }
    ],
    "amount": 0,
    "customer": null,
    "tags": null,
    "autoMakeInvoiceOnReceivePayment": true,
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256",
    "callbacks": null,
    "billingPeriod": null
}

Refund order

POST /api/order/{id}/refund

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header
id string
Parameter in path

Request body: RefundOrderRequestDTO
Response
Initialize refund for payment order. Returns empty response.

Example:
POST https://app.sbpay.me/api/order/1/refund HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256",
    "makeCreditNote": true,
    "id": 1,
    "reason": "string"
}

Customer payment methods

GET /api/customer/{referenceId}/payment-methods

Parameters

language string
Query GET parameter
X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
referenceId string
Parameter in path

Response
Returns customer's saved payment methods list
PaymentMethodDTO[]

Example:
GET https://app.sbpay.me/api/customer/1/payment-methods?language=string HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>

Initialize recurring payment with payment method

POST /api/payment-method/{id}/init-recurring-payment

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header
id string
Parameter in path

Response
Initializes recurring payment with saved customer's payment method. Returns empty response.

Example:
POST https://app.sbpay.me/api/payment-method/1/init-recurring-payment HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "paymentMethodId": 1,
    "setupLines": [
        {
            "name": "string",
            "description": "string",
            "qty": 1,
            "finalPrice": 0,
            "price": 0,
            "discounts": [
                {
                    "value": 0,
                    "type": "percentage"
                }
            ],
            "taxes": [
                {
                    "name": "string",
                    "rate": 0,
                    "inclusive": true,
                    "countryId": "string",
                    "stateId": "string",
                    "city": "string"
                }
            ],
            "periodStart": "2023-01-01T00:00:00+00:00",
            "periodEnd": "2023-01-01T00:00:00+00:00",
            "referenceId": "string",
            "referenceType": "string",
            "planPriceId": 1,
            "amount": 0
        }
    ],
    "storePaymentMethod": true,
    "paymentSystem": "string",
    "referenceId": "string",
    "description": "string",
    "currency": "string",
    "lines": [
        {
            "name": "string",
            "description": "string",
            "qty": 1,
            "finalPrice": 0,
            "price": 0,
            "discounts": [
                {
                    "value": 0,
                    "type": "percentage"
                }
            ],
            "taxes": [
                {
                    "name": "string",
                    "rate": 0,
                    "inclusive": true,
                    "countryId": "string",
                    "stateId": "string",
                    "city": "string"
                }
            ],
            "periodStart": "2023-01-01T00:00:00+00:00",
            "periodEnd": "2023-01-01T00:00:00+00:00",
            "referenceId": "string",
            "referenceType": "string",
            "planPriceId": 1,
            "amount": 0
        }
    ],
    "amount": 0,
    "customer": null,
    "tags": null,
    "autoMakeInvoiceOnReceivePayment": true,
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256",
    "period": 1,
    "periodType": "string",
    "numberOfCharges": 1,
    "chargeAttempts": 1,
    "attemptDelay": 1,
    "setupAmount": 0,
    "callbacks": null,
    "billingPeriod": null
}

Initialize payment with saved customer's payment method

POST /api/payment-method/{id}/rebill

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header
id string
Parameter in path

Request body: RebillSignedRequestDTO
Response
Initializes payment with saved customer's payment method. Returns empty response.

Example:
POST https://app.sbpay.me/api/payment-method/1/rebill HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "paymentMethodId": 1,
    "storePaymentMethod": true,
    "paymentSystem": "string",
    "referenceId": "string",
    "description": "string",
    "currency": "string",
    "lines": [
        {
            "name": "string",
            "description": "string",
            "qty": 1,
            "finalPrice": 0,
            "price": 0,
            "discounts": [
                {
                    "value": 0,
                    "type": "percentage"
                }
            ],
            "taxes": [
                {
                    "name": "string",
                    "rate": 0,
                    "inclusive": true,
                    "countryId": "string",
                    "stateId": "string",
                    "city": "string"
                }
            ],
            "periodStart": "2023-01-01T00:00:00+00:00",
            "periodEnd": "2023-01-01T00:00:00+00:00",
            "referenceId": "string",
            "referenceType": "string",
            "planPriceId": 1,
            "amount": 0
        }
    ],
    "amount": 0,
    "customer": null,
    "tags": null,
    "autoMakeInvoiceOnReceivePayment": true,
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256",
    "callbacks": null,
    "billingPeriod": null
}

Receive payment with saved payment method

POST /api/payment-method/{id}/rebill/{orderId}

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header
id string
Parameter in path
orderId string
Parameter in path

Response
Initializes payment with saved customer's payment method. Returns empty response.

Example:
POST https://app.sbpay.me/api/payment-method/1/rebill/1 HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "orderId": 1,
    "paymentMethodId": 1,
    "reason": "string",
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256"
}

Payment system list

GET /api/payment-system/detailed

Parameters

language string
Query GET parameter
X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header

Response
Returns detaled payment systens list
PaymentSystemStatusDTO[]

Example:
GET https://app.sbpay.me/api/payment-system/detailed?language=string HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>

Initialize recurring payment

POST /api/recurring-payment

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header

Response
Initializes recurring payment and provides output containing details of subsequent actions.
InitRecurringPaymentSignedRequestDTO

Example:
POST https://app.sbpay.me/api/recurring-payment HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "recurringProfileId": 1,
    "id": 1,
    "paymentMethodId": 1,
    "url": "string",
    "inline": true
}

subscription

Apply free subscription payment

POST /api/{project}/subscriptions/apply-free

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header
project string
Parameter in path

Response
Applies subscription for customer for free. Returns empty response in case of success

Example:
POST https://app.sbpay.me/api/1/subscriptions/apply-free HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "customer": null,
    "project": "string",
    "plan": "string",
    "subscriptionReferenceId": "string",
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256"
}

Get customer's subscriptions

GET /api/{project}/subscriptions/{customer}

Parameters

language string
Query GET parameter
X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
project string
Parameter in path
customer string
Parameter in path

Response
Returns customer's subscriptions list
PlanSubscriptionResponseDTO[]

Example:
GET https://app.sbpay.me/api/1/subscriptions/1?language=string HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>

Get list of plans

GET /api/{project}/plans

Parameters

language string
Query GET parameter
Preffered language to display plan names in
currency string
Query GET parameter
Preferred currency to display prices in
X-Merchant string
Parameter in header
Merchant ID
X-Auth-Token string
Parameter in header
Merchant API Auth token
project string
Parameter in path

Response
Returns list of active plans plans
PlanResponseDTO[]

Example:
GET https://app.sbpay.me/api/1/plans?language=string&currency=string HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>

Make subscription payment

POST /api/{project}/subscriptions

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header
project string
Parameter in path

Response
Initializes subscription payment and provides output containing details of subsequent actions.
SubscriptionPaymentResponseDTO

Example:
POST https://app.sbpay.me/api/1/subscriptions HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "from": "2023-01-01T00:00:00+00:00",
    "trialDays": 1,
    "autoMakeInvoice": true,
    "items": [
        {
            "priceId": 1,
            "qty": 1,
            "discounts": [
                {
                    "value": 0,
                    "type": "percentage"
                }
            ],
            "taxes": [
                {
                    "name": "string",
                    "rate": 0,
                    "inclusive": true,
                    "countryId": "string",
                    "stateId": "string",
                    "city": "string"
                }
            ]
        }
    ],
    "customer": null,
    "paymentSystem": "string",
    "paymentMethodId": 1,
    "recurring": true,
    "subscriptionId": 1,
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256",
    "referenceId": "string",
    "autoTaxes": true,
    "callbacks": null,
    "language": "string",
    "description": "string",
    "tags": null,
    "project": "string",
    "customerReferenceId": "string",
    "updateBillingInfo": true
}

Update subscription payment

PUT /api/{project}/subscriptions/{id}

Parameters

X-Merchant string
Parameter in header
X-Auth-Token string
Parameter in header
X-Signature string
Parameter in header
project string
Parameter in path
id string
Parameter in path

Response
Updates subscription and provides output containing details of subsequent actions.
SubscriptionPaymentResponseDTO

Example:
PUT https://app.sbpay.me/api/1/subscriptions/1 HTTP/1.1
Host: app.sbpay.me
Accept: application/json
Content-Type: application/json
X-Merchant: <string>
X-Auth-Token: <string>
X-Signature: <string>

{
    "subscriptionId": 1,
    "items": [
        {
            "priceId": 1,
            "qty": 1,
            "discounts": [
                {
                    "value": 0,
                    "type": "percentage"
                }
            ],
            "taxes": [
                {
                    "name": "string",
                    "rate": 0,
                    "inclusive": true,
                    "countryId": "string",
                    "stateId": "string",
                    "city": "string"
                }
            ]
        }
    ],
    "customer": null,
    "paymentSystem": "string",
    "paymentMethodId": 1,
    "recurring": true,
    "timestamp": "2023-01-01T00:00:00+00:00",
    "algo": "sha256",
    "from": "2023-01-01T00:00:00+00:00",
    "to": "2023-01-01T00:00:00+00:00",
    "updateBillingInfo": true,
    "referenceId": "string",
    "autoTaxes": true,
    "callbacks": null,
    "language": "string",
    "description": "string",
    "tags": null,
    "project": "string",
    "customerReferenceId": "string"
}

types

ApproveOrderRequestDTO

Parameters
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
id
type: integer
paymentMethod
type: string
transactionId
type: string nullable: true
reason
type: string nullable: true
zeroAmount
type: boolean

CancelOrderRequestDTO

Parameters
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
id
type: integer
reason
type: string nullable: true

InitPaymentSignedRequestDTO - Init payment request

Initialize payment request. Signature is required

Parameters
storePaymentMethod - Store payment method
type: boolean
paymentMethodId - Payment method id
type: integer nullable: true
paymentSystem - Predefined payment system
type: string nullable: true
referenceId - Reference id in external application
type: string
description - Description
type: string nullable: true
currency - Currency
type: string
lines - List of lines
type: array
amount - Amount to pay
type: number
customer - Customer
nullable: true
tags - Array of tags
type: array
autoMakeInvoiceOnReceivePayment - Automatically make invoice on receive payment
type: boolean
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
callbacks
nullable: true
billingPeriod
nullable: true

InitPaymentResponseDTO - Init payment response

Result of init payment request

Parameters
id - Order id
type: integer
paymentMethodId - Payment method id
type: integer nullable: true
url - Redirect url/Inline data url
type: string
inline
type: boolean

RefundOrderRequestDTO

Parameters
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
makeCreditNote
type: boolean
id
type: integer
reason
type: string nullable: true

PaymentMethodDTO

Parameters
id - Payment method id
type: integer
createdDatetime - Creates date and time
type: string
deletedDatetime - Delete date and time
type: string nullable: true
paymentSystem - Payment system
type: string
paymentSystemReferenceId - Reference id
type: string nullable: true
transactionId - Initial transaction id
type: string nullable: true
name - Payment method name
type: string nullable: true
customer - Customer
nullable: true
status - Payment method status
type: string
paymentSystemDetails - Payment system details
nullable: true

DisablePaymentMethodRequestDTO

Parameters
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
id
type: integer
reason
type: string nullable: true

InitRecurringProfileWithPaymentMethodSignedRequestDTO

Parameters
paymentMethodId - Payment method id
type: integer nullable: true
setupLines - Setup payment lines (required if setupAmount is not null)
type: array
storePaymentMethod - Store payment method
type: boolean
paymentSystem - Predefined payment system
type: string nullable: true
referenceId - Reference id in external application
type: string
description - Description
type: string nullable: true
currency - Currency
type: string
lines - List of lines
type: array
amount - Amount to pay
type: number
customer - Customer
nullable: true
tags - Array of tags
type: array
autoMakeInvoiceOnReceivePayment - Automatically make invoice on receive payment
type: boolean
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
period
type: integer
periodType
type: string
numberOfCharges
type: integer nullable: true
chargeAttempts
type: integer
attemptDelay
type: integer
setupAmount
type: number nullable: true
callbacks
nullable: true
billingPeriod
nullable: true

RebillSignedRequestDTO

Parameters
paymentMethodId - Payment method id
type: integer nullable: true
storePaymentMethod - Store payment method
type: boolean
paymentSystem - Predefined payment system
type: string nullable: true
referenceId - Reference id in external application
type: string
description - Description
type: string nullable: true
currency - Currency
type: string
lines - List of lines
type: array
amount - Amount to pay
type: number
customer - Customer
nullable: true
tags - Array of tags
type: array
autoMakeInvoiceOnReceivePayment - Automatically make invoice on receive payment
type: boolean
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
callbacks
nullable: true
billingPeriod
nullable: true

ReceivePaymentWithPaymentMethodRequestDTO

Parameters
orderId - Order id
type: integer
paymentMethodId - Payemnt method id
type: integer
reason - Reason, comment
type: string nullable: true
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string

PaymentSystemStatusDTO

Parameters
paymentSystem - Payment system name
type: string
active
type: boolean

CancelRecurringProfileRequestDTO

Parameters
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
id
type: integer
reason
type: string nullable: true

InitRecurringPaymentResponseDTO

Parameters
recurringProfileId - Recurring profile id
type: integer
id
type: integer
paymentMethodId
type: integer nullable: true
url
type: string
inline
type: boolean

InitRecurringPaymentSignedRequestDTO

Parameters
setupLines - Setup payment lines (required if setupAmount is not null)
type: array
storePaymentMethod - Store payment method
type: boolean
paymentMethodId - Payment method id
type: integer nullable: true
paymentSystem - Predefined payment system
type: string nullable: true
referenceId - Reference id in external application
type: string
description - Description
type: string nullable: true
currency - Currency
type: string
lines - List of lines
type: array
amount - Amount to pay
type: number
customer - Customer
nullable: true
tags - Array of tags
type: array
autoMakeInvoiceOnReceivePayment - Automatically make invoice on receive payment
type: boolean
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
period
type: integer
periodType
type: string
numberOfCharges
type: integer nullable: true
chargeAttempts
type: integer
attemptDelay
type: integer
setupAmount
type: number nullable: true
callbacks
nullable: true
billingPeriod
nullable: true

ApplySubscriptionRequestDTO

Parameters
customer
type: CustomerRequestDTO
project - Subscription project
type: string
plan - Subscription plan
type: string
subscriptionReferenceId - Reference id
type: string nullable: true
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string

PlanSubscriptionResponseDTO

Parameters
id - Subscription id
type: integer
periodFrom - Period from
type: string nullable: true
periodTo - Period to
type: string nullable: true
recurringProfileId - Recurring profile id
type: integer nullable: true
recurringProfileStatus - Recurring profile status
type: string nullable: true
recurringProfileAmount - Recurring profile amount
type: number nullable: true
recurringProfileCurrency - Recurring profile currency
type: string nullable: true
nextPaymentDate - Recurring profile status
type: string nullable: true
createdDateTime - Created date and time
type: string
items - Subscription items
type: array
attributes - Subscription attributes
type: array
period - Subscription period
type: integer nullable: true
periodType - Subscription period type
type: string nullable: true
paymentMethodName - Payment method name
type: string nullable: true
paymentSystem - Payment system
type: string nullable: true
paymentMethodId - Payment method id
type: integer nullable: true
current
type: boolean
trial
type: boolean
free
type: boolean

PlanResponseDTO

Parameters
id - Plan id
type: integer
code - Plan code
type: string nullable: true
type - Plan type
type: string
status - Plan current status
type: string
title - Title (depending on requested language or default language or first translation)
type: string
description - Description (depending on requested language or default language or first translation)
type: string
translations - Translations list
type: array
prices - Prices list
type: array
trialPeriod - Trial period
type: integer nullable: true
trialPeriodType - Trial period type
type: string nullable: true
trialAllowed - Trial is allowed
type: boolean
additions - Additions
type: array
attributes - Plan attributes
type: array
flexibleCount - Flexible count (applied only for products and addons)
type: boolean
visible - Is visible plan
type: boolean
free - Plan is free
type: boolean
freeTrial - Plan supports free trial
type: boolean

SignedMakeSubscriptionPaymentRequestDTO

Parameters
from - Predefined subscription date from
type: string nullable: true
autoMakeInvoice - Auto make invoice after payment
type: boolean
items - Plan items
type: array
customer
type: CustomerRequestDTO
paymentSystem - Payment system
The payment system or payment method must be set or recurring profile of updated subscription must be active type: string nullable: true
paymentMethodId - Payment method
The payment system or payment method must be set or recurring profile of updated subscription must be active type: integer nullable: true
recurring - Init recurring profile if possible
type: boolean
subscriptionId - Subscription id
type: integer nullable: true
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
referenceId
type: string nullable: true
autoTaxes
type: boolean
callbacks
nullable: true
language
type: string nullable: true
description
type: string nullable: true
tags - Applied tags
type: array
project
type: string
customerReferenceId - Return customer reference id
type: string nullable: true
updateBillingInfo - Update should not update items
type: boolean

SubscriptionPaymentResponseDTO

Parameters
subscriptionId - Subscription id
type: integer
orderId - Order id
type: integer nullable: true
paymentMethodId - Payment method id
type: integer nullable: true
recurringProfileId - Recurring profile id
type: integer nullable: true
payment - Payment data (in case payment is required)
nullable: true

SignedUpdateSubscriptionPaymentRequestDTO

Parameters
subscriptionId - Subscription id
type: integer nullable: true
items - Plan items
type: array
customer
type: CustomerRequestDTO
paymentSystem - Payment system
The payment system or payment method must be set or recurring profile of updated subscription must be active type: string nullable: true
paymentMethodId - Payment method
The payment system or payment method must be set or recurring profile of updated subscription must be active type: integer nullable: true
recurring - Init recurring profile if possible
type: boolean
timestamp - Time stamp
type: string
algo - Algorithm for checksum
type: string
from
type: string nullable: true
to
type: string nullable: true
updateBillingInfo - Update should not update items
type: boolean
referenceId
type: string nullable: true
autoTaxes
type: boolean
callbacks
nullable: true
language
type: string nullable: true
description
type: string nullable: true
tags - Applied tags
type: array
project
type: string
customerReferenceId - Return customer reference id
type: string nullable: true

InitPaymentRequestLineDTO - Payment line

Init payment request line

Parameters
name - Line name
type: string
description - Line description
type: string nullable: true
qty - Qty
type: integer
finalPrice - Price
type: number nullable: true
price - Price without VAT
type: number
discounts - Discounts list
type: array
taxes - Taxes
type: array
periodStart - Billing period start
type: string nullable: true
periodEnd - Billing period end
type: string nullable: true
referenceId - Line reference id
type: string nullable: true
referenceType - Line reference type
type: string nullable: true
planPriceId - Plan price id
type: integer nullable: true
amount - Return amount
type: number

CustomerRequestDTO

Parameters
referenceId - Customer reference id
type: string
name - Customer name
type: string
payerName - Customer payer name
type: string nullable: true
email - Customer email
type: string nullable: true
phone - Customer phone
type: string nullable: true
countryId - Country id
type: string nullable: true
stateId - State id
type: string nullable: true
city - City
type: string nullable: true
taxNumber - Tax number
type: string nullable: true
address - Customer address
type: string nullable: true
zip - Customer zip
type: string nullable: true
language - Customer language
type: string nullable: true
customFields - Custom fields list
type: array

InitPaymentCallbackInfoRequestDTO

Parameters
returnUrl - Return url
type: string
successUrl - Notification url on payment success
type: string
failureUrl - Notification url on payment fail
type: string
cancelUrl - Notification url on payment cancelled
type: string

BillingPeriodRequestDTO

Parameters
periodStart - Period start
type: string
periodEnd - Period end
type: string

CustomerDTO

Parameters
id - Customer id
type: integer
referenceId - Customer reference id
type: string
name - Customer id
type: string
email - Custimer email
type: string nullable: true
phone - Customer phone number
type: string nullable: true
countryId - Country id
type: string nullable: true
taxNumber - Vat number
type: string nullable: true
address - Address
type: string nullable: true
zip - Zip
type: string nullable: true
customFields - Custom fields
type: array

PaymentSystemStatusDTO2

Parameters
paymentSystem - Payment system
type: string
active
type: boolean
recurringSupported
type: boolean
rebillingSupported
type: boolean
refundSupported
type: boolean

InitRecurringPaymentCallbackInfoRequestDTO

Parameters
recurringProfileStatusUrl - Recurring profile status notification url
type: string
returnUrl
type: string
successUrl
type: string
failureUrl
type: string
cancelUrl
type: string

PlanSubscriptionItemResponseDTO

Parameters
price
type: PlanPriceResponseDTO
plan
type: PlanResponseDTO
qty - Qty
type: integer

PlanSubscriptionAttributeValueResponseDTO

Parameters
translations - Translations
type: array
value - Attribute value
type: string|int|bool|null
isUnlimited - Int value is unlimited
type: boolean nullable: true
id
type: integer
code
type: string nullable: true
title
type: string
description
type: string
type
type: string
position
type: integer
period
type: integer nullable: true
periodType
type: string nullable: true
visible
type: boolean

PlanTranslationResponseDTO

Parameters
title
type: string
description
type: string
language
type: string

PlanPriceResponseDTO

Parameters
id - Id
type: integer
price - Price
type: number
currency - Currency
type: string
periodType - Period type
type: string nullable: true
period - Period
type: integer nullable: true

PlanAttributeResponseDTO

Parameters
id - Attribute Id
type: integer
code - Attribute code
type: string
title - Attribute name
type: string
description - Attribute description
type: string
type - Attribute type (string, bool, ...)
type: string
position - Attribute position
type: integer
translations - Translations list
type: array

SubscriptionPaymentItemRequestDTO

Parameters
priceId - Price id
type: integer
qty - Qty
type: integer
discounts - Discounts list
type: array
taxes - Taxes
type: array

InitSubscriptionCallbacksDTO

Parameters
returnUrl - Return url
type: string nullable: true
successUrl - Notification url on payment success
type: string nullable: true
failureUrl - Notification url on payment fail
type: string nullable: true
cancelUrl - Notification url on payment cancelled
type: string nullable: true
recurringProfileStatusUrl - Recurring profile status URL callback (only for recurring payments)
type: string nullable: true
subscriptionInfoUrl - Callback URL to notify changes in subscription
type: string nullable: true

PaymentResponseDTO

Parameters
url - Payment page url
type: string
inline - Is inline
type: boolean

LineDiscountRequestDTO

Parameters
value - Discount value
type: number
type - Discount type
type: string

TaxRequestDTO

Parameters
name - Tax name
type: string
rate - Tax rate
type: number
inclusive - Inclusive tax.
An inclusive tax already included in price, while exclusive tax is added to price. type: boolean
countryId - Country id
type: string nullable: true
stateId - State id
type: string nullable: true
city - City
type: string nullable: true

CustomerCustomFieldRequestDTO

Parameters
name - Custom field name
type: string
value - Custom field value
type: string

CustomerCustomFieldDTO

Parameters
name - Custom field name
type: string
value - Custom field value
type: string

PlanAttributeTranslationResponseDTO

Parameters
title
type: string
description
type: string
language
type: string