Create a recalculation

post
Create invoice recalculation

https://business-sandbox.cryptopay.me/api/invoices/:invoice_id/recalculations
This endpoint allows you to recalculate invoices.
Request
Response
Request
Headers
Authorization
required
string
HMAC using API key and signature
Content-Type
required
string
application/json
Date
required
string
Current date in HTTP-date format
Query Parameters
invoice_id
required
string
Invoice ID
force_commit
optional
string
Set true by default. Set false for two-step recalculation and commit it within 30 seconds
Response
201: Created
{
"id": "f5f5c3d1-ea6b-45f1-9f52-cdf077aabe9b",
"invoice_id": "90b80f37-7531-4e0c-8c38-c6c8e5b68465",
"pay_amount": "0.01",
"pay_currency": "BTC",
"price_amount": "49.51",
"price_currency": "EUR",
"fee": "0.5",
"fee_currency": "EUR",
"previous_pay_amount": "0.0203336",
"previous_price_amount": "100.0",
"previous_exchange_rate": "4917.9697",
"exchange": {
"pair": "BTCEUR",
"rate": "4951.2207",
"fee": "0.0",
"fee_currency": "EUR"
},
"created_at": "2019-05-02T15:12:36Z"
}

Response schema.

Parameter

Type

Description

id

string

Recalculation ID

invoice_id

string

Invoice ID

pay_amount

string

Cryptocurrency amount received

pay_currency

string

Cryptocurrency type

price_amount

string

New invoice amount

price_currency

string

Invoice amount currency. Refer to a list of supported currencies‚Äč

fee

string

Processing fee

fee_currency

string

Processing fee currency

previous_pay_amount

string

Previous amount to pay

previous_price_amount

string

Previous invoice amount

previous_exchange_rate

string

Previous exchange rate

exchange

object

Exchange details

pair

string

Currency pair

rate

string

Exchange rate

fee

string

Exchange fee

fee_currency

string

Exchange fee currency

created_at

string

Recalculation creation date and time