{
"amount": 1000,
"amount_capturable": 1000,
"authorization_reason": "blocking_funds",
"base_currency_code": "USD",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWltgF2p6",
"date": 1600968316,
"deleted": false,
"exchange_rate": 1,
"fraud_reason": "Payment complete.",
"gateway": "stripe",
"gateway_account_id": "gw___test__KyVnGlSBWltbL2AB",
"id": "txn___test__KyVnHhSBWltv42pB",
"id_at_gateway": "ch_1HUyC0Jv9j0DyntJiR6W37yv",
"linked_payments": [],
"masked_card_number": "************1111",
"object": "transaction",
"payment_method": "card",
"payment_source_id": "pm___test__KyVnHhSBWltu42p7",
"resource_version": 1517505917000,
"status": "success",
"type": "authorization",
"updated_at": 1517505917
}
payment_method
= check
. amount
which has not been invoiced yet and is therefore added to excess_payments
for the customer. Applicable only for a transaction of type
= payment
. transaction
. This is always the same as the business entity of the customer. Authorizes a specific amount in customer's Credit card, which can be collected within a span of time. Read more on authorization and capture here.
curl https://{site}.chargebee.com/api/v2/transactions/create_authorization \ -u {site_api_key}:\ -d customer_id="__test__KyVnHhSBWltgF2p6" \ -d amount=1000
This API voids the specific authorization transaction in order to release the blocked funds from the customer’s card. Voiding an already captured or voided transaction is not possible.
curl https://{site}.chargebee.com/api/v2/transactions/txn___test__KyVnHhSBWlzMQ2rA/void \ -X POST \ -u {site_api_key}:
Records a refund made offline. Applicable only for transaction
s of type
= payment
.
curl https://{site}.chargebee.com/api/v2/transactions/txn___test__KyVnHhSBWlwT42q7/record_refund \ -u {site_api_key}:\ -d date=1601054726 \ -d amount=1000 \ -d payment_method="CHARGEBACK" \ -d reference_number="5266787652" \ -d comment="payment disputed"
amount_unused
. If not passed then all of amount_unused
is recorded as refunded. Refunds an online payment. Applicable only for transaction
s of type
= payment
. You can only refund a transaction
whose status
is success
.
curl https://{site}.chargebee.com/api/v2/transactions/txn___test__KyVnpGSCut0cY8/refund \ -u {site_api_key}:\ -d comment="Refunding a transaction"
amount_unused
. If not passed then all of amount_unused
is refunded. curl https://{site}.chargebee.com/api/v2/transactions \ -G \ -u {site_api_key}:\ --data-urlencode limit=2 \ --data-urlencode status[is]="success" \ --data-urlencode sort_by[asc]=date
payment_method
= check
. updated_at
. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the sort_by
input parameter as updated_at
for a faster response. curl https://{site}.chargebee.com/api/v2/invoices/__demo_inv__4/payments \ -G \ -u {site_api_key}:\ --data-urlencode limit=1
curl https://{site}.chargebee.com/api/v2/transactions/txn___test__KyVnHhSBWlxBX2qV \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/transactions/txn___test__KyVnHhSBWluhp2pD/delete_offline_transaction \ -X POST \ -u {site_api_key}: