Skip to content

Latest commit

 

History

History
117 lines (84 loc) · 7.86 KB

File metadata and controls

117 lines (84 loc) · 7.86 KB

Transactions.Settlements

Overview

Available Operations

  • get - Get transaction settlement
  • list - List transaction settlements

get

Retrieve a specific settlement for a transaction by its unique identifier.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    merchant_account_id="default",
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    res = g_client.transactions.settlements.get(transaction_id="7099948d-7286-47e4-aad8-b68f7eb44591", settlement_id="b1e2c3d4-5678-1234-9abc-1234567890ab")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
transaction_id str ✔️ The unique identifier of the transaction. 7099948d-7286-47e4-aad8-b68f7eb44591
settlement_id str ✔️ The unique identifier of the settlement. b1e2c3d4-5678-1234-9abc-1234567890ab
merchant_account_id Optional[str] The ID of the merchant account to use for this request. default
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.Settlement

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*

list

List all settlements for a specific transaction.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    merchant_account_id="default",
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    res = g_client.transactions.settlements.list(transaction_id="7099948d-7286-47e4-aad8-b68f7eb44591")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
transaction_id str ✔️ The unique identifier of the transaction. 7099948d-7286-47e4-aad8-b68f7eb44591
merchant_account_id Optional[str] The ID of the merchant account to use for this request. default
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.Settlements

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*