Decrease the balance of a specific account with a debit offset
Body
Required
Body of request to create debit offset.
-
The ID associated to be with the line item for future requests. If not provided on line item creation, Canopy will generate this field.
Format should match the following pattern:
^(?!can_).*$
. -
The payment amount in cents.
Default value is
0
. -
The
Date-Time
that the debit offset is applicable to the account. Although the debit offset is created in Canopy today, it can actually be effective as of a date in the past. This should only be used for data migrations. -
Optional designation for which balance bucket the credit offset should be allocated to.
Values are
INTEREST
,DEFERRED_INTEREST
,PRINCIPAL
, orFEE
. -
External fields can be used to relate debit offsets created in Canopy to entities in your or any external system.
Not more than
100
elements.
curl \
-X POST https://sandbox-api.canopyservicing.com/accounts/31mNprzLd2bKl6koVna68ARM/line_items/debit_offsets \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"line_item_id":"li_0x1234","original_amount_cents":200,"effective_at":"2020-07-20T09:11:28+00:00","allocation":"INTEREST","external_fields":[{"key":"Globex Card Processing Account ID","value":"22445702-a389-431f-927d-07b8d0750787"}]}'
{
"line_item_id": "li_0x1234",
"original_amount_cents": 200,
"effective_at": "2020-07-20T09:11:28+00:00",
"allocation": "INTEREST",
"external_fields": [
{
"key": "Globex Card Processing Account ID",
"value": "22445702-a389-431f-927d-07b8d0750787"
}
]
}
{
"line_item_id": "li_0x1234",
"original_amount_cents": 200,
"effective_at": "2020-07-20T09:11:28+00:00",
"allocation": "INTEREST",
"external_fields": [
{
"key": "Globex Card Processing Account ID",
"value": "22445702-a389-431f-927d-07b8d0750787"
}
]
}
{
"account_id": 4,
"line_item_id": 2,
"effective_at": "2018-07-20T09:12:30+00:00",
"created_at": "2018-06-20T09:12:30+00:00",
"product_id": 1,
"line_item_summary": {
"original_amount_cents": 2484,
"balance_cents": 3600,
"principal_cents": 2400,
"interest_balance_cents": 1100,
"am_interest_balance_cents": 0,
"deferred_interest_balance_cents": 200,
"am_deferred_interest_balance_cents": 0,
"total_interest_paid_to_date_cents": -16
},
"merchant_data": {
"name": "string",
"id": "string",
"mcc_code": 42.0,
"phone_number": "string"
},
"issuer_processor_details": {
"lithic": {
"last_four": 3324,
"transaction_token": "33xd08bc-d100-488y-bb93-f8a1f081ff0e",
"card_token": "c6cd08bc-c524-48f5-b64d-f79ec0810df4"
}
},
"external_fields": [
{
"key": "Globex Card Processing Account ID",
"value": "22445702-a389-431f-927d-07b8d0750787"
}
],
"line_item_overview": {
"line_item_status": "VALID",
"line_item_type": "DEBIT_OFFSET",
"description": "Debit offset against the account"
}
}
{
"account_id": 4,
"line_item_id": 2,
"effective_at": "2018-07-20T09:12:30+00:00",
"created_at": "2018-06-20T09:12:30+00:00",
"product_id": 1,
"line_item_summary": {
"original_amount_cents": 2484,
"balance_cents": 3600,
"principal_cents": 2400,
"interest_balance_cents": 1100,
"am_interest_balance_cents": 0,
"deferred_interest_balance_cents": 200,
"am_deferred_interest_balance_cents": 0,
"total_interest_paid_to_date_cents": -16
},
"merchant_data": {
"name": "string",
"id": "string",
"mcc_code": 42.0,
"phone_number": "string"
},
"issuer_processor_details": {
"lithic": {
"last_four": 3324,
"transaction_token": "33xd08bc-d100-488y-bb93-f8a1f081ff0e",
"card_token": "c6cd08bc-c524-48f5-b64d-f79ec0810df4"
}
},
"external_fields": [
{
"key": "Globex Card Processing Account ID",
"value": "22445702-a389-431f-927d-07b8d0750787"
}
],
"line_item_overview": {
"line_item_status": "VALID",
"line_item_type": "DEBIT_OFFSET",
"description": "Debit offset against the account"
}
}