Follow the standard PaymentsOS integration procedure, and then apply the relevant extra specifications in this section to integrate with Diem.
This functionality will be released soon

If you wish to use this functionality in the near future, please contact our support team at hubtechsupport@payu.com for more information. Meanwhile, you may use the information in this topic to familiarize yourself with the Diem integration. The information presented may be subject to change without notice.

API Version

Minimum required API version: 1.2.0

Payment Methods

The following table lists all supported payment methods.

Payment MethodPayment Method Type
Diem Billing ConsenteWallet
Diem One-time PaymenteWallet


Payout currencies: EUR, GBP, USD


The following table lists all supported requests for card-based transactions.

Use the bodybuilder to create a sample request body for each request type.

AuthorizePartial and multiple are not supportedAsynchronous
Capture Both partial and multiple are supportedAsynchronous
Charge Not ApplicableAsynchronous
Refund Both partial and multiple are supportedSynchronousMultiple refunds can be made as long as the cumulative refunded amount does not exceed the original transaction value.
Void Not ApplicableSynchronous

Setup Procedures

The following table lists the setup procedures that are specific to this provider.

In the PaymentsOS Control Center, configure the following credentials:
  • api_key. The API key you received from First.

Integration Procedures

The following sections list the integration procedures that are specific to this provider.

Implementing a Diem One-time Payment Transaction Flow

With a Diem one-time payment flow, shoppers complete a transaction by selecting to pay with Diem from the balance in one of their wallets (such as Novi by Facebook). A Diem one-time payment flow is not quite the same as that of card-based transactions, since:

  • You do not need to create a token. Shoppers select to pay using the Diem digital currency in their wallet.

  • The transaction flow is always asynchronous. As part of the payment flow, you must allow customers to select the wallet they want to use and then redirect them to a page on which they can complete the transaction.

The steps in the flow are as follows:

  1. Create a Payment.

  2. Implement a redirection flow. As part of this flow, invoke the Create Authorization API or Create Charge API and grab the list of available wallets from the response data. You can then present the list available wallets to your customers so that they can choose the wallet they want to use for the payment. After customers choose a wallet, redirect them to the page on which they can approve the transaction (we provide you with the payment page site URL in the Redirection object of the authorization or charge response data).

  3. If you invoked a Create Authorization request, invoke a Create Capture request after the customer approved the transaction.

After completing the flow, customers will be redirected to your merchant_site_url on which you can display a payment completed message.

When a customer wants to make a purchase on your site, you can choose to create a billing agreement between you and your customer. Also known as a billing consent, this agreement allows you to charge your customer against that billing agreement in future transactions, without requiring your customer to select a preferred wallet and approve the transaction.

A billing consent transaction flow is similar to the flow followed by card transactions, in that you must first create a token which you then use in a subsequent Authorization or Charge request. It differs, however, in that:

  • The token represents a billing agreement, rather than a credit card.

  • After you receive the token, you must store it in a customer object so that the token can be reused in future transactions.

Let’s lay it out in steps. Use the Bodybuilder to generate sample request bodies for each of the requests outlined below.

  1. First invoke the Create Token request, passing in a token_type of billing_agreement and a vendor value of First.

  2. Grab the token from the response and store it in a customer object, as explained in Saving the Token.

After you created a billing agreement (token) and stored it in a customer object, you can prompt users to use it in a next transaction. For more information, see how to Use the Saved Token to Accept a Payment.

Frequently Asked Questions about Diem

Allowing shoppers to pay with Diem coins will soon be a reality! Our integration will allow you to offer shoppers the option of paying with Diem, through any supported wallet (for example, Novi by Facebook).

What is Diem?

Diem is a digital currency perfect for doing business around the world. The currency was created by a group of companies, including Facebook, Uber, Shopify and others in order to digitally represent traditional currencies such as USD, EUR and GBP. Click here to read more.

What are the benefits for Merchants?

Save costs on fees and leverage Facebook’s 2.7 billion users and gain global access, even to people without a bank account. Diem provides a seamless payment experience for your customers.

Diem Benefits

Do I need a special account to accept Diem?

No. PayU, via our partnership with First (a Diem partner), takes care of everything. You continue to price your products and services in your preferred currency, and receive payouts as usual.

So what exactly is the Diem payment system?

The Diem payment system is a new global payment system based on blockchain technology, designed to enable open, secure and low cost payments. It incorporates three aspects that work together to deliver that promise:

  • A secure, scalable, and reliable blockchain as the technological backbone of the payment system;

  • Diem Coins that are full backed by a reserve of assets made up of cash or cash equivalents and very short-term government securities;

  • Governance by the independent Diem Association and its subsidiary Diem Networks, tasked with developing and operating the payment system.

Where can I find more information?

Want to know more about Diem? Check out the Diem project’s website. And of course, feel free to contact our support team at hubtechsupport@payu.com for more information.

Is this integration already available?

No, not yet. But our engineering team is working hard to make this integration available as soon as possible. So please stay tuned for further updates!

Last modified May 16, 2022