Skip to main content
POST

Authorizations

x-api-key
string
header
required

Body

application/json

Execute a refund for a consumer offer bill.

requestId
string
required

Bango-generated Request ID (UUID v4). Should be returned in the API response.This allows correalating individual requests and responses.

billEffectiveDate
string
required

Date the bill was generated for.

billType
enum<string>
required

Bill type

  • PRO_RATED_REFUND: the amount of the refund is lower than the amount of the original charge.
  • FULL_REFUND: the amount of the refund equals the amount of the original charge.
Available options:
PRO_RATED_REFUND,
FULL_REFUND
billId
string
required

Bango-generated unique bill identifier (UUID v4).If the initial charge fails, all subsequent retries will have the same billId.

amount
integer
required

Charge amount, in minor units

currency
string
required

Currency code (ISO 4217)

resourceType
string
required

Type of resource that is being refunded.

Allowed value: "CONSUMER_OFFER"
consumer
ConsumerWithBillingIdentifier · object
required

Consumer with billing identifier.

originalChargeId
string
required

Bango-generated unique identifier of the charge transaction (UUID v4) that is being refunded.

Example:

"c699aa49-35ea-4a23-9c3e-4479413db91d"

refundId
string
required

Bango-generated unique identifier of the refund transaction (UUID v4). There could be more than one partial refund per charge.

Example:

"d56442de-ca64-411f-8585-830291b3d6cf"

refundAttempt
integer
required

Refund attempt. 0 if it's the first attempt, 1 for the first retry...

Example:

0

isRetry
boolean
required

Whether this is a retry of a charge

Example:

false

consumerOffer
Consumer Offer · object
required

Consumer offer details

billingDetails
Billing Details · object
required

Billing details

lineItems
(LineItemForCancellationProration · object | LineItemForWithdrawalCancellation · object | LineItemForTierChangeProration · object)[]
required

List of line items

Line item details - pro-ration caused by an entitlement tier change.

externalRecurringChargeId
string

Partner-generated identifier of the authorization for recurring charges.

originalPartnerChargeId
string

Reseller generated unique identifier of the charge that is being refunded.

Response

OK

Refund approved response.

requestId
string
required

Bango-generated Request ID (UUID v4). Should be returned in the API response.This allows correalating individual requests and responses.

responseCode
string
required

Result of the operation

Allowed value: "APPROVED"
partnerRefundId
string

Unique identifier of the refund operation, generated by reseller.