These docs are for v1.0.1. Click to read the latest docs for v2.1.0.

Cryptocurrencies (Coinify)

120

paymentmethod=CFY

Payment ProcessIntegration
Authorization:heavy-check-mark:Payment Page:heavy-check-mark:
Deferred Settlement:x:Split Mode:x:
Refund:heavy-check-mark:Mobile SDK:x:
Cancel:x:
Alias:x:

Description

With Coinify, you have the option to add cryptocurrency payments to your merchant account at Datatrans. By creating Coinify Invoices through our gateway, you can now accept payments in cryptocurrencies. Consumers simply have to scan a QR code within their crypto wallet to conclude a payment. When the consumer initiates the payment, the value of the transaction is converted and settled instantly in your preferred currency. This is done at no cost to you and with no currency risk. To accept payments via Coinify, you will require a Coinify merchant account. The only additional costs that occur for you as a merchant are those you have to pay for the payouts to your bank account. The Coinify FAQ lists the costs of the payouts here.

📘

Sign Up for Coinify!

You can signup for a Coinify account by using this link.

Technical Integration

The most popular cryptocurrencies are supported, including BTC, ETH, LTC, BHC, NEO, XRP, and many more. Depending on the transaction amount, more cryptocurrencies will be available for the end customer to select. The full list of accepted cryptocurrencies can be found here.

As soon as your account is set up and you have been fully approved as a merchant by Coinify, you can start issuing invoices. If you want to accept crypto payments with values higher than 10,000 EUR you will have to go through an additional approval process at Coinify.

API Key, Public Account ID & IPN Secret

In order to let our gateway create Coinify invoices, you will have to share with us the following credentials:

  • API Key & Password – These values can be found in Integration tools > API keys.
  • Instant Payment Notification Secret – This value can be found in Integration Tools > Online Store > Instant Payment Notification.

Please make sure that your API key contains at least the following permissions:

  • Invoice: Read invoices
  • Invoice: Create new invoices
  • Invoice: Update existing invoices
  • Account: Create refund

To transfer these credentials securely, you may send us a password-protected file to [email protected] and the password in a separate email to [email protected].

Redirect & IPN Settings

To simplify the transaction flow and immediately redirect the consumer to the success page after the QR code has been scanned and the payment initiated by the crypto wallet, you may set the following settings in your Coinify configuration:

Integration Tools > Online Store > Redirect URLs

  • Redirect to success URL on: Payment received
  • Success URL: https://api.datatrans.com/upp/jsp/upCoinifyReturn
  • Cancel URL: https://api.datatrans.com/upp/jsp/upCoinifyCancel

Integration Tools > Online Store > Instant Payment Notification

  • Callback URL: https://api.datatrans.com/upp/jsp/upCoinifyCallback

In case of a successful payment, the consumer will be redirected to the successURL at Datatrans. The transaction will receive the status authorised at Datatrans (Coinify Status: PAID). Once the crypto transaction was confirmed by Coinify, the Datatrans transaction will switch to settled (Coinify Status: COMPLETE). In case of a time out or cancel request, the consumer will be redirected to the cancelURL at Datatrans.

Over- & Underpayment

During a crypto payment a consumer might overpay or underpay a transaction. For such cases, we include the following information of an over- or underpayment in our webhook to your server:

  • type - normal, underpaid, extra
  • nativeAmount - The amount paid in the submitted currency.
  • nativeCurrency - The submitted currency

Refunds

Transactions can currently only be refunded through our webadmin tool. You will need to specify an e-mail address to refund a transaction.

Testing Crypto Payments

Coinify provides a sandbox platform to test crypto payments. Please bear in mind that you will have to send additional credentials for your sandbox account to us in order to let you process test payments via Coinify. You can sign up for your sandbox merchant account here.

To proceed with a test payment, you can use the following setup:

  • Install a testnet wallet on your smartphone (eg. by using Testnet Wallet)
  • Add funds to your wallet by using a Testnet faucet (eg. this one)

Server to Server Requests

After a successful authorization with Coinify, you have the option to send the server to server calls below.

Status Request

You can check the status of a Coinify transaction by sending the request below.

Request

curl -v -X POST https://api.sandbox.datatrans.com/upp/jsp/XML_status.jsp \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d @- << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<statusService version="5">
  <body merchantId="1000011011">
    <transaction>
      <request>
        <uppTransactionId>200221152154592554</uppTransactionId>
        <reqtype>STX</reqtype>
      </request>
    </transaction>
  </body>
</statusService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<statusService version='5'>
  <body merchantId='1000011011' status='accepted'>
    <transaction trxStatus='response'>
      <request>
        <uppTransactionId>200221152154592554</uppTransactionId>
        <reqtype>STX</reqtype>
      </request>
      <response itemNr='1'>
        <responseCode>21</responseCode>
        <responseMessage>Trx already settled</responseMessage>
        <refno>CFY-Payment</refno>
        <amount>1000</amount>
        <currency>CHF</currency>
        <authorizationCode>435624354</authorizationCode>
        <pmethod>CFY</pmethod>
        <uppTransactionId>200221152154592554</uppTransactionId>
        <maskedCC></maskedCC>
        <aliasCC></aliasCC>
        <expm></expm>
        <expy></expy>
        <trxDate>20200221</trxDate>
        <trxTime>152154</trxTime>
        <trtype>05</trtype>
        <settledAmount>1000</settledAmount>
        <acqAuthorizationCode></acqAuthorizationCode>
        <uppStatus3D></uppStatus3D>
      </response>
    </transaction>
   </body>
  </statusService>