Automated Billing
Billing API
Recurring Billing API methods enables us to manage billing plans.
Billing Endpoint: {{GatewayAPIURL}}/Billing/Plan
Billing Plan
New Billing Plan Request adds a new billing schedule to an existing customer or adds a new billing schedule for a new customer.
Request Field Description
KEY | FIELD STATUS | TYPE | VALUE | DESCRIPTION |
abid | Optional | numeric | Auto Generated e.g.123 | Billing ID |
customer_id | Mandatory | alphanumeric | “AUTO” for auto generated id’s starts from 100000 OR User Generated e.g. CID001 | The customer id is either system generated or user specific. Based on customer id, billing is processed for the customer. |
token | Mandatory | alphanumeric | Variable Length | Billing token generated by gateway |
plan_type | Mandatory | string | 1-Recurring 2- Installment 3 -One Time Schedule | The type of plan chosen for billing occurence |
schedule_type | Mandatory | string | D- DailyW- WeeklyM- MonthlyY- YearlyS- Scheduled Payment | The type of scheduled payments chosen on daily, weekly, monthly and yearly basis. |
start_date | Mandatory | string | Format- yyyy-mm-dd | The date when the payments start. Should be greater than the present date. |
end_date | Conditional | string | Format- yyyy-mm-dd | The date when the payments end. Required for recurring payments |
periodicity | Conditional | numeric | Value-1 to 10 | Depending on the plan type and schedule, the periodicity can be passed. It defines the interval between schedules. |
end_type | Mandatory | numeric | 0-One Time Schedule1-Until Cancelled2-Until Date3-No of Payment | How the plan should end.Until Cancelled,Until Certain number of payments or Until End Date |
no_of_payments | Conditional | numeric | Value-1 to 99 | Required for Installment plan type. Number of payments to be made for Installment Billing plan |
amount | Mandatory | numeric | Format 0 or 0.00 | The amount per occurrence/event of the bill. |
reference_id | Mandatory | string | varchar(50) | Any number that can be used as reference for the billing plan |
max_retry | Optional | numeric | Maximum No. of Attempts-10 | Number of retry attempts if a transaction fails at the time of execution |
name | Optional | string | Variable Length | Name of the customer |
active | Mandatory | boolean | true – Activefalse- Inactive (Default) | Depending on the Active and Inactive status, the transaction will be executed for occurence for the day. |
billing_mode | Optional | string | 0 – Manual1 – Auto (Default) | If this is set Manual, Billing sequence needs to be given for each event/occurence when the transaction should go through |
bill_day | Conditional | string | For schedule type weeklyBill Day – Select any day between Sunday to SaturdayFor schedule type monthly,yearlyBill Day – Select any day between 1 to 28 | Depending on the plan type and schedule, the Bill Day can be passed. |
email_receipt | Optional | boolean | true-activefalse-inactive | Indicator to send email receipt to customer based on any action. |
merchant_terminal_id | Optional | numeric | Terminal ID | Terminal ID of the merchant |
bill_sequence | ||||
amount | Conditional | numeric | Format 0 or 0.00 | Billing amount for the given sequence |
schedule_date | Conditional | string | Format- yyyy-mm-dd | Date for the specific occurrence of the bill |
reference_id | Conditional | string | varchar(50) | Any number that can be used as reference for the billing plan queue |
sequence_number | Conditional | numeric | Number of Sequence | Event number or the sequence number to identify a particular occurrence in a recurring bill |
additional_data | ||||
id | Optional | string | up to 2 Characters1 to 20 | Based on the selection on Custom User defined fields and id |
value | Optional | string | up to 255 Characters | Based on the selection on Custom User defined fields and values |
Response Field Description
KEY | TYPE | VALUE | DESCRIPTION | |
---|---|---|---|---|
result_code | string | 1 – Approved2- Declined3- Error | The overall status of the transaction. | |
result_sub_code | string | 000- Approval | Response sub code. | |
result_text | string | upto 100 characters APPROVAL, DECLINED | Description of the outcome of the transaction from First Data | |
transaction_datetime | numeric | Format: yyyyMMddTHHmmssZ | Date and Time of the transaction response | |
billing_plan | ||||
abid | numeric | Auto Generated e.g.123 | Billing ID | |
customer_id | alphanumeric | Can be AUTO Generated e.g. 100000ORUser Generated e.g. CID001 | The customer ID is either system generated or user specific. | |
token | string | numeric value generate by token generation process. | Token details from token table. | |
plan_type | numeric | 1-Recurring2- Installment3 -One Time Schedule | The type of billing plan selected. | |
schedule_type | string | D- DailyW- WeeklyM- MonthlyY- YearlyS- Scheduled Payment | The type of billing schedule selected | |
amount | string | Upto 2 decimal places | Billing amount | |
start_date | string | Format- yyyy-mm-dd | Start date of the billing plan | |
periodicity | numeric | Value-1 to 10 | Depending on the plan type and schedule, the periodicity can be passed. It defines the interval between schedules | |
end_type | string | 0- One Time Schedule1 – Until Cancelled2-Until Date3 – No of Payment | End type selected for the billing plan | |
no_of_payments | numeric | Value – 1 to 99 | Number of payments to be made in the installment plan | |
reference_id | string | varchar(50) | Any number that can be used as reference for the billing plan | |
name | string | Variable Length | Name of the customer | |
active | boolean | true – Activefalse- Inactive (Default) | Status of the billing plan | |
billing_mode | string | 0- Manual1- Auto | Sequence of manual billing schedule | |
max_retry | numeric | Maximum No. of Attempts-10 | Number of retry attempts if a transaction fails at the time of execution | |
bill_day | string | For schedule type weeklyBill Day – Select any day between Sunday to SaturdayFor schedule type monthly,yearlyBill Day – Select any day between 1 to 28 | Depending on the plan type and schedule, the bill day passed. | |
email_receipt | boolean | true-active false-inactive | Indicator to send email receipt to customer based on any action. | |
merchant_terminal_id | numeric | Terminal ID | Terminal ID of the merchant | |
bill_sequence | ||||
reference_id | Conditional | varchar(50) | Any number that can be used as reference for the billing plan | |
sequence_number | Conditional | Variable Value | Event number or the sequence number to identify a particular occurrence in a recurring bill | |
amount | Conditional | Format 0 or 0.00 | Billing amount for the given sequence | |
schedule_date | Conditional | Format- yyyy-mm-dd | Date for the specific occurrence of the bill |