All successful or unsuccessful payments in the past can be queried using the Craftgate API.
The endpoint and http method information to query payment are stated below.
HTTP Method | URL |
---|---|
GET |
/payment-reporting/v1/payments |
Payment query can be done using the following parameters.
Parameter Name | Type | Required | Description |
---|---|---|---|
paymentId |
number |
No | ID of payment |
paymentTransactionId |
number |
No | ID of payment transactions |
buyerMemberId |
number |
No | Buyer member ID related to the payment |
subMerchantMemberId |
number |
No | ID value of related sub-merchant |
conversationId |
string |
No | conversationId value that sent in payment request by merchant |
externalId |
string |
No | externalId value that sent in payment request by merchant |
merchantPosId |
number |
No | ID of merchant POS that payment is recieved |
orderId |
string |
No | orderId value retrieved from bank related to the payment |
paymentType |
PaymentType |
No | See: Payment Types |
paymentStatus |
PaymentStatus |
No | See: Payment Status |
paymentChannel |
string |
No | paymentChannel value sent by the merchant in the payment request |
binNumber |
string |
No | First 8 digits of card that payment is done |
lastFourDigits |
string |
No | Last 4 digits of card that payment is done |
currency |
Currency |
No | Payment currency See: Currencies |
minPaidPrice |
decimal |
No | Minimum paid price collected in payment |
maxPaidPrice |
decimal |
No | Maximum paid price collected in payment |
installment |
number |
No | Installment number of payment |
isThreeDS |
boolean |
No | Whether the payment is 3D Secure payment |
minCreatedDate |
date |
No | Minimum payment create date to filter payments |
maxCreatedDate |
date |
No | Maximum payment create date to filter payments |
page |
number |
No | Page number for pagination |
size |
number |
No | Page size for pagination |
The parameters returned as a result of the payment are also subject to the rules specified in the Response Formats section of the API documentation home page. The object structure in the response is as follows:
Parameter Name | Type | Description |
---|---|---|
id |
number |
ID of the payment |
createdDate |
date |
The date that payment created |
price |
decimal |
Total amount of the payment |
paidPrice |
decimal |
Total amount paid by the buyer. The amount also included in collected from wallet for payments that fully or partially collected from the wallet. Müşterinin ödediği toplam tahsilat tutarı. |
walletPrice |
decimal |
The amount collected from wallet |
currency |
string |
Payment currency See: Currencies |
buyerMemberId |
number |
Buyer member ID related to the payment |
installment |
number |
Installment number of the payment |
conversationId |
string |
conversationId value that sent in payment request by merchant |
externalId |
string |
externalId value that sent in payment request by merchant |
paymentType |
PaymentType |
See: Payment Types |
paymentGroup |
PaymentGroup |
See: Payment Groups |
paymentSource |
PaymentSource |
See: Payment Sources |
paymentStatus |
PaymentStatus |
See: Payment Status |
paymentPhase |
PaymentPhase |
See: Payment Phases |
paymentChannel |
string |
paymentChannel value sent by the merchant in the payment request |
isThreeDS |
boolean |
Indicates whether the payment is 3D Secure payment |
merchantCommissionRate |
decimal |
Interest rate to calculate paid price that buyer will pay |
merchantCommissionRateAmount |
decimal |
Interest amount. Equal to the difference between paidPrice and price values |
bankCommissionRate |
string |
Bank commission rate |
bankCommissionRateAmount |
string |
Bank commission rate amount |
paidWithStoredCard |
boolean |
Indicates whether the payment was made with a stored card |
binNumber |
string |
Exist for the payments fully or partially collected from the card. First 8 digits of the card |
lastFourDigits |
string |
Exist for the payments fully or partially collected from the card. Last 4 digits of the card |
authCode |
string |
authCode value retrieved from bank related to the payment |
hostReference |
string |
hostReference value retrieved from bank related to the payment |
transId |
string |
transId value retrieved from bank related to the payment |
orderId |
string |
orderId value retrieved from bank related to the payment |
cardType |
CardType |
Type of the card. Exist for the payments fully or partially collected from the card (See: Card Types) |
cardAssociation |
CardAssociation |
Card association. Exist for the payments fully or partially collected from the card (See: Card Associations) |
cardBrand |
string |
Brand of card. Exist for the payments fully or partially collected from the card |
cardHolderName |
string |
Card holder name surname |
bankCardHolderName |
string |
Card holder name surname retrieved from bank |
cardIssuerBankName |
string |
Name of card issuer bank |
mdStatus |
string |
Payment status retrieved from bank for 3D secure payment |
retryCount |
string |
Retry count while payment is done |
refundablePrice |
string |
Refundable amount |
refundStatus |
PaymentRefundStatus |
Status of refund see: Payment Refund Status |
pos |
MerchantPos |
POS info that payment is received see: Merchant POS Information |
loyalty |
Loyalty |
Loyalty info that used in payment (see: Reward Usage) |
paymentError |
PaymentError |
Detail information of the error, if the payment received an error. See: Payment Error Groups |
refunds |
ReportingPaymentRefundResponse[] |
See: Payment Refund Information |
Parameter Name | Type | Description |
---|---|---|
id |
number |
ID of merchant POS |
name |
string |
Name of merchant POS |
alias |
string |
POS Alias value of merchant POS |
bankId |
number |
Bank ID of merhcant POS |
If there is refund information for the payment, it contains the detail information about the refund.
Parameter Name | Type | Description |
---|---|---|
id |
number |
ID of payment refund |
createdDate |
date |
The date that refund request is done |
status |
Status |
For successful refunds SUCCESS , failed refund FAILURE See: Refund Status |
refundDestinationType |
RefundDestinationType |
If refund destination is card or payment provider, this value returns as PROVIDER . If refund destination is wallet, this value returns as WALLET . See: Refund Type |
refundPrice |
decimal |
Amount that is refunded |
refundBankPrice |
decimal |
Amount that is refunded to bank |
refundWalletPrice |
decimal |
Amount that is refunded to wallet |
conversationId |
string |
conversationId value that is sent in payment request related to the refund |
authCode |
string |
authCode value of the payment related to the refund |
hostReference |
string |
hostReference value of the payment related to the refund |
transId |
string |
transId value retrieved of the payment related to the refund |
paymentType |
PaymentType |
See: Payment Types |
error |
PaymentError |
See: Payment Error Groups |
You can review the sample codes in the open source Craftgate API clients.