Skip to main content
POST
Process Subscription Payment

Request Example of Subscription Creation

Key Points

Subscription Creation

  • This API enables the setup of subscription plans, allowing for automatic recurring payments. It supports various billing cycles and flexible configurations such as discounts and trial periods.

Subscription Configuration

  • Merchants can define custom plans, including: Plan Name and Description.
  • Cycle Type: Billing can be based on days, weeks, months, etc.
  • Cycle Interval: Defines the frequency of billing (e.g., every 2 days, every month).
  • Max Cycle Count: Sets the maximum number of billing cycles.
  • Trial Period: Option to offer a trial period before the subscription starts.
  • Discounts: Ability to apply discounts for a set number of billing cycles.

Flow diagram

Flow diagram image

Api Parameters

Authorizations

Authorization
string
header
required

API Key for Authorization. Format: 'Basic YOUR_API_KEY_HERE'

x-api-key
string
header
required

API Key specific to x-api-key.

Body

application/json

Payload for processing subscription payments.

amount
string
required

The transaction amount.

Maximum string length: 15
Example:

"1000"

currency
string
required

ISO currency code for the transaction (e.g., JPY).

Maximum string length: 3
Example:

"JPY"

card
object
required

Details of the card used for the payment.

payment_method
object
required

Payment method details.

merchant_id
string
required

Unique identifier of the merchant.

Maximum string length: 128
Example:

"< Merchant ID >"

billing_address
object
required

Details of the cardholder's billing address.

subscription
object
required

Details of the subscription being processed.

merchant_txn_ref
string

Unique merchant transaction reference ID.

Maximum string length: 45
Example:

"qwe"

customer_ip
string

IP address of the customer initiating the transaction.

Maximum string length: 45
Example:

"127.0.0.1"

return_url
object

A JSON object containing the return URLs. (This field is mandatory for 3DS transactions.)

shipping_address
object

Details of the cardholder's shipping address.

time_zone
string

Time zone of the transaction.

Maximum string length: 128
Example:

"Asia/Kuala_Lumpur"

Response

201 - application/json

Subscription payment processed successfully.

success
boolean

Indicates whether the transaction was successful.

Example:

true

status_code
integer

HTTP status code of the transaction.

Example:

201

is_live
boolean

Indicates whether the transaction was live or a test.

Example:

false

transaction_type
string

Type of transaction performed (e.g., CAPTURE).

Example:

"CAPTURE"

gateway_response
object

Response from the payment gateway.

merchant_details
object

Details about the merchant.

payment_details
object

Details of the payment transaction.

transaction_details
object

Details of the transaction.

risk-details
object

Risk assessment details.

subscription_details
object

Details of the subscription.