{
"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
}
type
= refund
. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.payment_method
= check
.amount
from the customer’s payment_source
.paymentThe transaction represents capture of amount
from the customer’s payment_source
.refundThe transaction represents a refund of amount
to the customer’s payment_source
.payment_reversalIndicates a reversal transaction.resource_version
is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.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
.id
of the offline transaction that is being refunded or reversed. Applicable only for transaction of type
= refund
or payment_reversal
.id
of the transaction (always of type
= payment
) being refunded. Applicable only for transaction of type
= refund
.id
of the transaction (always of type
= authorization
) which authorizes the payment being captured. Applicable only for transaction of type
= payment
.amount
that is yet to be captured. The payment capture is recorded as a transaction of of type
= payment
. Applicable only for a transaction of type
= authorization
.transaction
. This is always the same as the business entity of the customer. status
when it has line items that belong to items that are metered
or when the subscription.create_pending_invoices
attribute is set to true
.status
when Metered Billing is enabled for the site.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
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}:
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"
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.
type
= refund
. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.payment_method
= check
.
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"
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"
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"
offset
to the value of next_offset
obtained in the previous iteration of the API call.
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/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__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}:
curl https://{site}.chargebee.com/api/v2/transactions/txn___test__KyVnHhSBWluhp2pD/delete_offline_transaction \ -X POST \ -u {site_api_key}: