Assign a package charge
POST/v1/charges/package
Register a package charge: one billed package that groups several component charges already created under the same admission. Send the package identity (package_code, product_code, package_name, amount, quantity, currency) plus component_charge_codes - the list of (code, origin_event_id) pairs that the package absorbs.
Processing is asynchronous: the response is 202 with a Location header pointing at /v1/charges/package/status/{monitorId}. Calling it again for the same package returns the existing monitor rather than creating a duplicate.
component_charge_codes may not repeat the same (code, origin_event_id) pair - a duplicate is rejected with 422. The same code under a different origin_event_id is valid and is how a package spanning several events is expressed.
Request
Responses
- 202
- 400
- 401
- 403
- 422
- 500
Accepted - monitor created (or the existing one returned)
Response Headers
Package charge assignment monitor URL
Bad Request
Unauthorized
Forbidden
Validation error - e.g. duplicated component charge codes
Internal Server Error