Create customer balance transaction
Creates an immutable balance transaction that updates the customer's balance and returns back the newly created transaction.
Path Parameters
Request Body required
Possible values: [increment
, decrement
]
An optional description that can be specified around this entry.
- 200
- 400
- 401
- 404
- 409
- 413
- 429
- 500
OK
Response Headers
Schema
A unique id for this transaction.
The creation time of this transaction.
The original value of the customer's balance prior to the transaction, in the customer's currency.
The new value of the customer's balance prior to the transaction, in the customer's currency.
The value of the amount changed in the transaction.
Possible values: [applied_to_invoice
, manual_adjustment
, prorated_refund
, revert_prorated_refund
, return_from_voiding
, credit_note_applied
, credit_note_voided
, overpayment_refund
]
An optional description provided for manual customer balance adjustments.
invoice object nullable
The Invoice id
Possible values: [increment
, decrement
]
credit_note object nullable
The id of the Credit note
{
"id": "cgZa3SXcsPTVyC4Y",
"created_at": "2022-05-01T07:01:31+00:00",
"starting_balance": "33.00",
"ending_balance": "22.00",
"amount": "11.00",
"action": "applied_to_invoice",
"description": "An optional description",
"invoice": {
"id": "gXcsPTVyC4YZa3Sc"
},
"type": "increment",
"credit_note": {
"id": "string"
}
}
Bad Request
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#400-constraint-violation
]
Possible values: [400
]
Possible values: [https://docs.withorb.com/reference/error-responses#400-duplicate-resource-creation
]
Possible values: [400
]
Possible values: [https://docs.withorb.com/reference/error-responses#400-request-validation-errors
]
Possible values: [400
]
{}
Unauthorized
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#401-authentication-error
]
Possible values: [401
]
{
"type": "https://docs.withorb.com/reference/error-responses#401-authentication-error",
"status": 401,
"detail": "string",
"title": "string"
}
Not Found
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#404-feature-not-available
]
Possible values: [400
]
Possible values: [https://docs.withorb.com/reference/error-responses#404-resource-not-found
]
Possible values: [404
]
Possible values: [https://docs.withorb.com/reference/error-responses#404-url-not-found
]
Possible values: [404
]
{}
Conflict
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#409-resource-conflict
]
Possible values: [409
]
{
"type": "https://docs.withorb.com/reference/error-responses#409-resource-conflict",
"status": 409,
"detail": "string",
"title": "string"
}
Request Entity Too Large
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#413-request-too-large
]
Possible values: [413
]
Possible values: [https://docs.withorb.com/reference/error-responses#413-resource-too-large
]
Possible values: [413
]
Possible values: [https://docs.withorb.com/reference/error-responses#413-too-many-results
]
Possible values: [413
]
{}
Too Many Requests
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#429-too-many-requests
]
Possible values: [429
]
{
"type": "https://docs.withorb.com/reference/error-responses#429-too-many-requests",
"status": 429,
"detail": "string",
"title": "string"
}
Internal Server Error
Response Headers
Schema
Possible values: [https://docs.withorb.com/reference/error-responses#500-internal-server-error
]
{
"type": "https://docs.withorb.com/reference/error-responses#500-internal-server-error",
"status": 0,
"detail": "string",
"title": "string"
}