Charges
To request a cryptocurrency payment, you create a charge. You can create, view or update your charges.
Charge resource
Note: Since cryptocurrency payments are push payments, a charge will expire after a waiting period (payment window) if no payment has been detected. Charges are identified by a unique code.
Fields
id
string
Charge id
transactionType
string
Enum value. One of EXTERNAL, PRODUCT_CHECKOUT, INVOICE
amountReceived
Object
List of payments of this charge.
merchantId
string
Id of owner/creator
name
string
Charge name
description
string
Charge description
pricingType
string
Enum value. One of no_price, fixed_price
status
string
Enum value. One of NEW, PENDING, COMPLETED, EXPIRED, UNRESOLVED, RESOLVED, CANCELLED, REFUNDED
context
string
For charges with UNRESOLVED
status, additional context is provided. Context can be one of the following: UNDERPAID
, OVERPAID
, DELAYED
, MULTIPLE
, MANUAL
, OTHER
localCurrency
string
Local currency used for the charge. Default is USD
localPrice
Object
Charge price by local currency. This object has 2 fields.
amount
: Charge amount.
currency
: local currency used
fizenpayFeePerc
number
FizenPay service fee. Initialized with 0.5
, mean FizenPay will cut out 0.5% value of payments
flexiblePaymentSettings
Object
Flexible payment settings at the time that the charge is created. This object has 3 fields.
type
: Enum value. One of ABSOLUTE, RELATIVE.
underPaymentThresholdValue
: value that merchant accept for underpaid payment.
overPaymentThresholdValue
: value that merchant accept of overpaid payment.
metadata
any
Self defined metadata provided creator.
logoUrl
string
Merchant logo URL. This logo will be displayed on the payment screen.
redirectUrl
string
Redirect URL
cancelUrl
string
Cancel URL
hostedUrl
string
Hosted URL which is generated by FizenPay
timeline
Object Array
Charge status changes. This object has 3 fields.
status
: changed status.
context
: Context that status is changed to UNRESOLVED
.
time
: the time that status changed
code
string
Unique charge code. Generated by FizenPay
resolvedRemark
string
Any remark when merchant resolves an unresolved charge.
expiredAt
Date
Expired time if there is no payment is made for this charge
createdAt
Date
Time that charge is created
updatedAt
Date
Time that charge is last updated
amountRequested
string
Local currency or Crypto currency requested to pay
currencyType
string
LOCAL_CURRENCY
or CRYPTO_CURRENCY
. The type of currency is requested to pay
cryptoSlug
string
Crypto slug of crypto currency requested if currencyType= CRYPTO_CURRENCY
You can explore more details of charge actions by go through next API document details
Object amountReceived
amountReceived
crypto
string
Cryptocurrency symbol
cryptoAmount
string
Paid amount by crypto
localAmount
string
Paid amount converted to local currency
localCurrency
string
Local currency symbol
transactionHash
string
Blockchain transaction hash for the payment
Object timeline
timeline
status
string
Status of charge. One of: NEW, PENDING, COMPLETED, EXPIRED, UNRESOLVED, RESOLVED, CANCELLED, REFUNDED
context
string
Context detail if the charge is UNRESOLVED. One of: OVERPAID, UNDERPAID, MULTIPLE, DELAYED, OTHER
JSON sample
Last updated