fbpx
← back

Create Product Recurring API

URL Endpoint

Staging: https://api.sandbox.senangpay.my/recurring/product/create
Production: https://api.senangpay.my/recurring/product/create

 

A.Request Authorization Header(Basic Auth)

Username

Merchant Id (from senangpay Dashboard)

Password

{leave blank}

 

B. Request Parameters

Fields with * are compulsory

*name

Name of product

*price

Price of product (2 decimal format) e.g: 5.00

*code

Product Code

delivery_charge

Delivery charge for this product (2 decimal format)

e.g: 5.00

*description

Description of product

info_url

URL of product information

*sst

Input integer as below:

0   – 0% SST

5   – 5% SST

6   – 6% SST

10 – 10% SST

*display_address

Input integer as below:

0 Do not display address or item is self pickup

1 Display address for delivery

2 – Display option for delivery to address or self pickup

*recurring_type

Input string as below:

INSTALLMENT   – for installment recurring

SUBSCRIPTION – for subscription recurring

*frequency

Input integer as below:

1 – Monthly

2 – Quarterly

3 – Biannually

4 – Yearly

repitition

*compulsory for INSTALLMENT recurring_type

How many times the installment occurs

Input integer as range from:

1 to 12

billing_day

*compulsory for SUBSCRIPTION

recurring_type

Integer number 0 to 28

*this is to set which date that the charging occurred.

0 means first date as billing day

*hash

Sha256 hash with the below string

{secret key}{name}{price}{code}

customer_overwrite_price

*compulsory for SUBSCRIPTION recurring_type

Product price set by merchant will be replaced with 0.00. This setting will be permanent.

Input integer as below:

1 – allow customer to overwrite product price

0 – do not allow customer to overwrite product price

customer_set_date

*compulsory for SUBSCRIPTION recurring_type and MONTHLY frequency

This is only valid for monthly frequency. This setting is permanent.

Input integer as below:

1 – allow customer to overwrite product price

0 – do not allow customer to overwrite product price

start_payment

*compulsory for SUBSCRIPTION recurring_type and MONTHLY frequency

This is only valid for monthly frequency. This setting is permanent.

Input integer as below:

0 – Immediately

1 – After 1 Month

2 – After 2 Months

3 – After 3 Months

 

C. Response Parameters

result

0 – failed to create product

1 – successful create product

msg

Result description

recurring_id

Use this id for recurring API

(link to recurring API)