Payment Callback

Description

The callback URL will be used for sending updates and statuses of payments. The callback URL is indicated from the customer's cabinet on the configuration page.

The order callback

The information about order status changes and new transactions will be sent to the callback URL.

Callback data is sent in the POST method in JSON format.

CityPay callback sends data as it is described below:

Name

Value

type

order callback

action

The information about the type of change: receive new transaction, order creation, receive confirmation.

status

CityPay Order status for the moment you received the callback.

order_id

Unique ID of order, given by CityPay.

client_order_id

Custom order ID of the merchant. Should be used to identify order or invoice number.

transaction_id

Transaction id of the last transaction of this order.

received_amount_in_coins

Amount of the last transaction in coins

received_amount_in_fiat

Amount of the last transaction in fiat

fiat_currency

Order's fiat currency.

crypto_currency

Order's cryptocurrency.

created_at

Invoice creation time.

order_token

Unique token created by the customer.

order_expiration

The time in minutes from order creation to its expiration.

exchange_rate

The exchange rate for the moment transaction was received

You will receive calls in the three cases. First when an order will be generated and currency is chosen. Second when payment is received, and third when the status is changed. Note you won't receive calls for expired status.

The deposit callback

The information about deposit transactions and their confirmation status are sent using this callback.

Name

Value

type

deposit callback

action

receive_transaction/confirmation

transaction_id

unique identification of the transaction

received_amount

the amount received during the transaction

status

Pending (0-5 confirmations); Confirmed (5+ confirmations)

crypto_currency

cryptocurrency id

exchange_rate

The exchange rate at the moment of transactions

crated_at

date transaction was sent

deposit_token

the unique string which is given by the customer to the transaction.

Last updated