ChargeAfter Transactions API
The Transactions API from ChargeAfter — 2 operation(s) for transactions.
The Transactions API from ChargeAfter — 2 operation(s) for transactions.
openapi: 3.2.0
info:
title: Charge Transactions API
description: Welcome to ChargeAfter API reference! This API is implemented in a RESTful state of mind, it has straight-forward, resource-oriented endpoints, and produces standard HTTP response codes to communicate back the result of operations. To get started please contact ChargeAfter support to get your API keys, and get an access to your testing and live environments.
termsOfService: https://chargeafter.com/privacy-policy
contact:
name: Customer Support
email: support@chargeafter.com
version: 1.2.45+20181a21407d1df1b163085f2b159570f697241a
servers:
- url: https://api-sandbox.ca-dev.co
description: Sandbox Environment
- url: https://api.chargeafter.com
description: Production Environment
security:
- apiKey: []
tags:
- name: Transactions
paths:
/v2/post-sale/transactions/lookup:
get:
tags:
- Transactions
summary: Get transaction by merchantTransactionId
parameters:
- name: merchantTransactionId
in: query
description: The merchant transaction ID.
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/ChargeAfter.Postsale.WebApi.Contracts.Dtos.Transactions.TransactionDto'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
requestId:
type: string
example: Unique RequestId
message:
type: string
example: Message Describing The Error
'401':
description: Unauthorized
'404':
description: Transaction not found
'422':
description: Input Validation Error
content:
application/json:
schema:
type: object
properties:
requestId:
type: string
message:
type: string
errors:
type: array
items:
properties:
field:
type: string
validationState:
type: string
error:
type: string
example:
RequestId: Unique RequestId
Message: Input Validation Failure
Errors:
- Field: RequestField1
ValidationState: Invalid
Error: RequestField1 should be up to 150 characters, and can contain a-z, A-Z, _ characters.
'500':
description: General Server Error
content:
application/json:
schema:
properties:
requestId:
type: string
description: Associated request id
errors:
type: array
items:
type: object
properties:
code:
type: string
description: Error code
description:
type: string
description: Error description
example:
requestId: Unique RequestId
errors:
- code: '1000'
description: Unknown error occurred
/v2/post-sale/transactions/{id}:
get:
tags:
- Transactions
summary: Get transaction by Id
parameters:
- name: id
in: path
description: Transaction ID.
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/ChargeAfter.Postsale.WebApi.Contracts.Dtos.Transactions.TransactionDto'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties:
requestId:
type: string
example: Unique RequestId
message:
type: string
example: Message Describing The Error
'401':
description: Unauthorized
'404':
description: Transaction not found
'422':
description: Input Validation Error
content:
application/json:
schema:
type: object
properties:
requestId:
type: string
message:
type: string
errors:
type: array
items:
properties:
field:
type: string
validationState:
type: string
error:
type: string
example:
RequestId: Unique RequestId
Message: Input Validation Failure
Errors:
- Field: RequestField1
ValidationState: Invalid
Error: RequestField1 should be up to 150 characters, and can contain a-z, A-Z, _ characters.
'500':
description: General Server Error
content:
application/json:
schema:
properties:
requestId:
type: string
description: Associated request id
errors:
type: array
items:
type: object
properties:
code:
type: string
description: Error code
description:
type: string
description: Error description
example:
requestId: Unique RequestId
errors:
- code: '1000'
description: Unknown error occurred
components:
schemas:
ChargeAfter.Postsale.WebApi.Contracts.Dtos.Transactions.TransactionDto:
required:
- amount
- chargeId
- createdAt
- id
- lenderId
- merchantId
- state
- type
type: object
properties:
lenderId:
minLength: 1
type: string
merchantId:
minLength: 1
type: string
storeId:
type:
- string
- 'null'
id:
minLength: 1
type: string
chargeId:
minLength: 1
type: string
type:
allOf:
- $ref: '#/components/schemas/ChargeAfter.Postsale.WebApi.Contracts.Dtos.Transactions.TransactionType'
state:
allOf:
- $ref: '#/components/schemas/ChargeAfter.Libraries.Entities.TransactionState'
createdAt:
type: string
format: date-time
amount:
type: number
format: double
merchantTransactionId:
type:
- string
- 'null'
reconciliationId:
type: string
approvalCode:
type: string
scheduledExecutionTimestamp:
type:
- string
- 'null'
format: date-time
balanceId:
type: string
metadata:
type:
- object
- 'null'
additionalProperties:
type: string
additionalProperties: false
ChargeAfter.Postsale.WebApi.Contracts.Dtos.Transactions.TransactionType:
enum:
- Authorize
- Settle
- Refund
- Void
- Chargeback
- Reversal
type: string
ChargeAfter.Libraries.Entities.TransactionState:
enum:
- Scheduled
- Pending
- PendingConsumer
- PendingMerchant
- Accepted
- Completed
- Failed
type: string
securitySchemes:
apiKey:
type: apiKey
description: ChargeAfter API supports an API key based authentication, provided in the `apiKey` HTTP header.
name: Authorization
in: header