Refund a transaction

Refunds a transaction with a specified ID.

The refund is in the same currency as the original transaction.

SecurityAPI Key: SecretApiKey or HTTP: JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Request Body schema: application/json

Transaction resource.

amount
required
number <double>

Amount of the refund.

description
string <= 255 characters

Description of the refund.

isProcessedOutside
boolean
Default: false

Specifies if the refund is processed outside of Rebilly.

post
/transactions/{id}/refund
Request samples
application/json
{ "amount": 0.1, "description": "string", "isProcessedOutside": false }
Responses

201

Transaction refunded.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

Response samples
application/json
{ "id": "txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0", "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "type": "3ds-authentication", "status": "completed", "result": "abandoned", "amount": 0.1, "currency": "USD", "purchaseAmount": 0.1, "purchaseCurrency": "USD", "requestAmount": 0.1, "requestCurrency": "USD", "parentTransactionId": "txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0", "childTransactions": [ "4f6cf35x-2c4y-483z-a0a9-158621f77a21" ], "invoiceIds": [ "4f6cf35x-2c4y-483z-a0a9-158621f77a21" ], "subscriptionIds": [ "4f6cf35x-2c4y-483z-a0a9-158621f77a21" ], "planIds": [ "4f6cf35x-2c4y-483z-a0a9-158621f77a21" ], "isRebill": true, "rebillNumber": 0, "billingAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "has3ds": true, "3ds": { "server": "string", "version": "1.0.2", "enrolled": "yes", "authenticated": "yes", "liability": "protected", "flow": "frictionless", "isDowngraded": false }, "redirectUrl": "http://example.com", "retryNumber": 0, "isRetry": true, "billingDescriptor": "string", "description": "string", "requestId": "string", "hasAmountAdjustment": true, "gatewayName": "A1Gateway", "customFields": { "foo": "bar" }, "processedTime": "2019-08-24T14:15:22Z", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "gatewayAccountId": "gw_acc_0YVCXMF26DDNKAERE5NW727S34", "gatewayTransactionId": "txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0", "gateway": { }, "acquirerName": "Adyen", "method": "payment-card", "velocity": 0, "revision": 0, "referenceData": { "gatewayTransactionId": "GAT123" }, "bin": "string", "paymentInstrument": { "method": "payment-card", "paymentInstrumentId": "inst_0YVB8KPKNXCBR9EDX7JHSED75N" }, "hasDcc": true, "dcc": { "usdMarkup": 10, "outcome": "rejected" }, "hasBumpOffer": true, "bumpOffer": { "version": "string", "language": "US", "outcome": "presented", }, "riskScore": 0, "riskMetadata": { "ipAddress": "93.92.91.90", "fingerprint": "pIUt3xbgX3l9g3YDiLbx", "isProxy": true, "isVpn": true, "isTor": true, "isHosting": true, "hostingName": "string", "isp": "string", "country": "US", "region": "NY", "city": "New York", "latitude": 0.1, "longitude": 0, "postalCode": "string", "timeZone": "America/New_York", "accuracyRadius": 0, "distance": 0, "hasMismatchedBillingAddressCountry": true, "hasMismatchedBankCountry": true, "hasMismatchedTimeZone": true, "hasMismatchedHolderName": true, "hasFakeName": true, "isHighRiskCountry": true, "paymentInstrumentVelocity": 0, "declinedPaymentInstrumentVelocity": 0, "isBot": true, "deviceVelocity": 0, "ipVelocity": 0, "emailVelocity": 0, "billingAddressVelocity": 0, "paymentInstrumentApprovedTransactionCount": 0, "score": 0 }, "notificationUrl": "http://example.com", "isDisputed": true, "disputeTime": "2019-08-24T14:15:22Z", "disputeStatus": null, "isReconciled": true, "isProcessedOutside": true, "isMerchantInitiated": true, "hadDiscrepancy": true, "orderId": "string", "arn": "74836950144358910018150", "reportAmount": 0.1, "reportCurrency": "USD", "settlementTime": "2019-08-24T14:15:22Z", "discrepancyTime": "2019-08-24T14:15:22Z", "limits": { "amount": 275.35, "currency": "USD", "resetTime": "2019-08-24T14:15:22Z" }, "organizationId": "org_0YVDM8RC7GDADADSBSMW124JA8", "depositRequestId": "dep_req_0YVJ65BSGYC3EAT58SEX8KY6J7", "payoutRequestId": "pout_req_0YVJ65BSGYC3EAT58SEX8KY6J7", "_links": [ ], "_embedded": { "parentTransaction": { }, "childTransactions": [ ], "gatewayAccount": { }, "customer": { }, "leadSource": { }, "website": { }, "invoices": [ ], "organization": { }, "dispute": { }, "paymentCard": { }, "bankAccount": { } } }