Skip to content

Move payment transaction approval and update to settlement and add settlement payout read methods - #350

Merged
tuncaserhat merged 3 commits into
masterfrom
settlement-payout-apis
Nov 27, 2026
Merged

tuncaserhat merged 3 commits into
masterfrom
settlement-payout-apis

Conversation

@tuncaserhat

Copy link
Copy Markdown
Member

Summary

Payment transaction approval and update move to the settlement adapter, and the settlement reporting adapter gets read methods for the new payout model. Payout data is removed from payment responses; read it from the new payout methods instead.

Migration guide: https://developer.craftgate.io/migration/settlement-payout

 PaymentAdapter
-  approvePaymentTransactions(ApprovePaymentTransactionsRequest)
-  disapprovePaymentTransactions(DisapprovePaymentTransactionsRequest)
-  updatePaymentTransaction(UpdatePaymentTransactionRequest): PaymentTransactionResponse

 SettlementAdapter
+  approvePaymentTransactions(ApprovePaymentTransactionsRequest): PaymentTransactionApprovalListResponse
+  disapprovePaymentTransactions(DisapprovePaymentTransactionsRequest): PaymentTransactionApprovalListResponse
+  updatePaymentTransaction(UpdatePaymentTransactionRequest): PaymentTxPayoutResponse

 SettlementReportingAdapter
+  retrievePaymentTransactionPayout(Long paymentTransactionId): PaymentTxPayoutResponse
+  searchPaymentTransactionPayouts(SearchPaymentTransactionPayoutsRequest): PaymentTxPayoutListResponse
-  searchPayoutCompletedTransactions(SearchPayoutCompletedTransactionsRequest): PayoutCompletedTransactionListResponse
+  searchPayoutCompletedItems(SearchPayoutCompletedItemsRequest): PayoutCompletedItemListResponse
-  retrievePayoutDetails(Long id): PayoutDetailResponse
+  retrieveSettlementRow(Long settlementRowId): SettlementRowResponse

Models:

  • New: PaymentTxPayoutResponse, PaymentTxPayoutListResponse, PayoutItem, PayoutCompletedItem (replaces PayoutCompletedTransaction), PayoutCompletedItemListResponse, SettlementRowResponse, SettlementRowItem, SearchPaymentTransactionPayoutsRequest, SearchPayoutCompletedItemsRequest (replaces SearchPayoutCompletedTransactionsRequest).
  • New enums: PayoutApprovalStatus, PayoutItemSubject, SettlementRowItemSubject. TransactionPayoutStatus gains ELIMINATED_BY_FULLY_REFUND.
  • Removed fields: payout, merchantPayoutAmount, subMerchantMemberPayoutAmount, subMerchantMemberPayoutRate from PaymentTransaction; payoutStatus from ReportingPaymentTransaction.
  • Removed classes: PaymentTransactionResponse, Payout, PayoutStatus, PayoutDetailResponse, PayoutDetailTransaction, PayoutCompletedTransactionListResponse.
  • Added fields: failedReasonCode on PaymentTransactionApproval, settlementRowId on PayoutRow.
  • Samples moved from PaymentSample to SettlementSample and SettlementReportingSample.

Evidence

  • Before: the client calls the old payment-side approval/update endpoints and reads payout data from payment responses.
  • After: rebased on master; with JDK 8, ./gradlew --offline compileJava compileTestJava and ./gradlew --offline test (unit tests, samples excluded) both pass. Samples were not run against the sandbox.

Merge Danger

Door: one-way
Blast Radius: merchants

Compile-time breaks for users who call approvePaymentTransactions, disapprovePaymentTransactions or updatePaymentTransaction on payment() (now on settlement()), searchPayoutCompletedTransactions or retrievePayoutDetails, or read any removed field or class above. Runtime: nothing changes for code still on an older client version; the old endpoints keep working until their announced shutdown.

# Conflicts:
#	src/main/java/io/craftgate/adapter/SettlementAdapter.java
#	src/test/java/io/craftgate/sample/SettlementSample.java
@tuncaserhat
tuncaserhat merged commit c8b4cba into master Nov 27, 2026
14 checks passed
@tuncaserhat
tuncaserhat deleted the settlement-payout-apis branch November 27, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants