PayEz API Documentation

1. Authentication

1.1 Requesting an Access Token

Description:

This endpoint allows a user to obtain an access token by providing valid login credentials.

URL:

POST /v1/auth/login

Request Body:

{
  "username": "user@example.com",
  "password": "securepassword"
}

Response:

{
  "access_token": "jwt_access_token",
  "refresh_token": "jwt_refresh_token"
}

2. Credit Card Payments

2.1 Process a Payment

Description:

This endpoint processes a credit card payment.

URL:

POST /v1/payments/cc

Request Body:

{
  "card_number": "4111111111111111",
  "expiration_date": "12/25",
  "cvv": "123",
  "amount": 100.00,
  "currency": "USD"
}

Response:

{
  "transaction_id": "txn_12345",
  "status": "approved"
}

2.2 Void a Payment

Description:

This endpoint voids a previously authorized credit card transaction.

URL:

POST /v1/payments/cc/void

2.3 Refund a Payment

Description:

This endpoint processes a refund for a completed credit card transaction.

URL:

POST /v1/payments/cc/refund

3. ACH Transactions

3.1 Initiate ACH Payment

Description:

This endpoint initiates an ACH transfer.

URL:

POST /v1/payments/ach

3.2 Cancel ACH Payment

Description:

This endpoint cancels a pending ACH transfer.

URL:

POST /v1/payments/ach/cancel

3.3 Refund ACH Payment

Description:

This endpoint refunds a completed ACH transaction.

URL:

POST /v1/payments/ach/refund

4. Vault (Tokenized Payment Storage)

4.1 Store Payment Information

Description:

This endpoint securely stores payment information and returns a token for future use.

URL:

POST /v1/vault/store

5. Transaction Status

5.1 Check Transaction Status

Description:

This endpoint retrieves the status of a payment transaction.

URL:

GET /v1/transactions/{transaction_id}