# PoweredBy API - Charge Authorizations 2.3.3

Authorization and events APIs for partner integration

## Changelog

### v2.3.3
- `account_reference` takes only an `ExternalCustomer::` (ECI) reference; removed `ExternalAccount::` (EAI) references, which are not supported, from the descriptions and examples

### v2.3.2
- Renamed the settlement event operation id from `recordeSettlementEvent` to `recordSettlementEvent` to fix a typo; the endpoint itself is unchanged

### v2.3.1
- Added `57` (transaction not permitted) to the `AuthAdviceResponseCodes` enum; it was already listed in the code table

### v2.3.0
- Make merchant id optional on all charge endpoints
  - Merchant id might not be available for some merchants from processor
- Remove `ATM` auth type on auth advice endpoint
  - Spending requests with MCC `6011` or `6010` will be automatically defined as request type `ATM`
  - Removing this type on the auth advice endpoint creates parity with auth event endpoint
  - This change aligns with precedent with how spending requests of type `DONATION` are created

### v2.2.0
- Changed auth event decline reasons from open string to list of enum values
  - This will support the ability to translate text to users based on language of preference in activity history
  - Updated examples to align with changes
- Renamed authorization advice schema objects to provide more explicit separation between advice and events
- Separated auth and event types into separate schema objects to support cleaner code generation and follow style guidelines
- Separated `merchant_location` into `merchant_state_code` and `merchant_city` fields to align with recon changes
- Change name of `merchant_country` to `merchant_country_code` to better indicate the expectation to use the ISO-3166-1 country code

### v2.1.0
- General
  - Changed `tran_type` attribute on auth request endpoint to `auth_type` to avoid confusion with transaction information in new `SpendingRuleEval` entity.
  - Updated auth request payload
    - Removed suggested auth code (not used)
    - Changed network attribute from required to optional
    - Changed incremental_auth attribute from required to optional
    - Changed partial_supported attribute from required to optional
- Spending Rule Evaluation Sets
  - Objective: provide details of rule evaluation for an authorization request
  - Changes:
    - Added `SpendingRuleEval` and `SpendingRule` entities
    - Added `rule_eval_set` to the response for an auhtorization request
    - Updated example payloads to reflect new rule evaluation set in response

### v2.0.0
- Baseline new major version off v1.0.9
- Removed fields from auth request and events that are no longer applicable
- Standardized naming and use of `tran_id` and `original_auth_id` attributes
- Cleaned up response codes to be more consistent across auth and event responses
- Change event requests to use common `Merchant` entity
- Changed some unneccessary fields to optional
- Standardized naming of currency code across request and event endpoints
- Removed location information as required fields for the `Merchant` entity
- Removed balance attributes on requests and events
- Add currency code to the authorization response
- Add request and response examples for auth advice, auth event, and settlement event endpoints
- Define a common `Currency` type with format constraints
- Changed `account_id` to `account_reference` to clearly indicate use of a GLUD to reference a program account for a child

## Servers

- https://{env}.{partner}.gl-tech.io/api/v2

## Operations

### Authorization

- [POST /charge/auth/authorization](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/operations/getAuthorizationAdvice): Authorization Advice

### Events

- [POST /charge/event/authorization](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/operations/recordAuthorizationEvent): Authorization Event
- [POST /charge/event/settlement](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/operations/recordSettlementEvent): Settlement Event

## Schemas

- [Account](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/Account)
- [Amount](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/Amount)
- [AuthAdviceRequest](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/AuthAdviceRequest)
- [AuthAdviceResponse](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/AuthAdviceResponse)
- [AuthAdviceResponseCodes](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/AuthAdviceResponseCodes)
- [AuthAdviceTypes](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/AuthAdviceTypes)
- [AuthEventRequest](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/AuthEventRequest)
- [AuthEventTypes](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/AuthEventTypes)
- [Currency](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/Currency)
- [DeclineReasonCodes](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/DeclineReasonCodes)
- [EventResponse](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/EventResponse)
- [EventResponseCodes](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/EventResponseCodes)
- [ExceptionPayload](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/ExceptionPayload)
- [Merchant](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/Merchant)
- [SettlementEventRequest](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/SettlementEventRequest)
- [SettlementEventTypes](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/SettlementEventTypes)
- [SpendingRule](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/SpendingRule)
- [SpendingRuleEval](https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/md/v2/Charge%20Authorization%20API.json/schemas/SpendingRuleEval)

Bundled OpenAPI file: https://apis.poweredby.partners.gl-tech.io/api/v1/published/Partnerships/GL-POWEREDBY-API/bundle/v2/Charge%20Authorization%20API.json
