post https://api.gliderpay.com/glider/batch/v1/invoiceBatch.json/link
This API will allow you to start a Glider campaign or batch.
After calling the API: the recipient records will be validated, a unique URL will be generated for each valid recipient and returned in the API response
Requirements
A recipient record must contain the following values:
- account_number: user identifier
- amount: invoice amount value
Parameter | Description | Example |
---|---|---|
recipients | Object with the recipient records and their attributes | [ { "name": "John Doe", "account_number": "22222", "amount": 5000, "company_name": "Green Energy", "reference": "5353-XXXX", "discount": "75%", "custom1_label": "Due Date", "custom1_value": "10/10/2020", "planRate": 2.54, "planMaxTerm": 10 }, { "name": "Mark Blue", "account_number": "22111", "amount": 3500, "company_name": "Blue Gas", "reference": "5232-XXXX", "discount": "15%", "custom1_label": "Due Date", "custom1_value": "08/11/2020" } ] |
name | Glider campaign name (must be unique) | GLIDER Campaign 0003 |
handler | (optional) Agent ID to be stored for reporting as part of the campaign | Agent1 |
isInstalment | (optional, false by default) if true, the invoices created will provide the ability for the user to choose between "pay now" or a tailored payment plan | true |
portalTemplate | (optional) Payment Portal Introduction text (see above paragraph for more details) | <h2>{{name}}</h2><br>Your outstanding debt is managed by Glider.<br><br>Amount to pay<h3>{{amount}}</h3> |
expiryTime | (optional) Invoice TTL (in seconds) from the campaign scheduled time | 84600 |
planRate | (optional) Annual interest rate if the campaign allows instalments, in percent (e.g.: 3.5% => 3.5) | 3.5 |
planMaxTerm | (optional) Maximum length of the term (if max term period is not defined this value is intended in years) | 10 |
planMaxTermPeriod | (optional) Defines the period/unit of the above value planMaxTerm, values accepted: day, week, month, year | month |
This API request will return a successful response if at least one record in the CSV contains valid information.
Successful recipient records will be returned under the recipients
JSON object.
Incorrect records will be listed under the errors
JSON object, line and an error type will also be specified.
Successful responses will provide a batch identifier number batchId
that can be used to retrieve batch status via the Report API.