Basic Payment cycle

This guide explains how to use the basic payment process in MoneyHash. In addition, it also presents how to send the customer's billing data to MoneyHash.

In MoneyHash, the basic payment option is creating an Intent without any customizable scenarios. Sending just the required fields when creating the intent, you can give your customer a checkout experience.

The Billing Data presents situations that allow you to customize the customer's experience, in this case, by feeding MoneyHash with the customer's billing details to avoid asking them to fill in the same information again.

Payment steps

Below, you will find a step-by-step guide on how to execute a payment using the basic cycle:

  1. Create an **intent** using the Create Intent endpoint:

POST
/api/v1.1/payments/intent/
  • You need to inform the required data:
PropertyTypeDescription
amountNumberThe amount to charge in the payment process.
amount_currencyStringThe currency of the amount is represented by a string of alphabetic codes from ISO 4217 Currency codes.
operationStringThe type of the current intent. It can be one of purchase, authorize, or capture.
webhook_urlStringA URL that the MoneyHash server will send a POST request to you when needed.
  • The response will contain the following fields:
FieldsDescription
data.embed_urlA URL to be used if integrating through the Embedded integration.
data.idThe unique identifier of the created intent.
data.statusThe current status of the intent.
  1. From here, you can proceed with any integration except the HPP one.
  2. Keep track of the webhook endpoint you sent within the request to see the progress of the payment process.

Billing Data

MoneyHash provides a feature to send multiple parameters when creating an Intent to enhance your customer's experience. One such parameter is the customer's billing data.

Suppose a customer chooses a payment method that requires them to provide their full name, email, and phone number. If you have already requested this information from them within your application, asking them to fill it up again would be inconvenient. Therefore, MoneyHash enables you to send the customer's information while creating the Intent, simplifying the process for them. More information about this feature is on the Create an Intent page.

Partial Billing Data

When you create the intent, let's say you only sent us the customer's email within the billing_data field. Like this:

{
  "billing_data": {
    "email": "[email protected]"
  },
  "amount": 50,
  "amount_currency": "USD",
  "operation": "purchase",
  "webhook_url": "https://webhook.site/4d487d3a-2644-4e48-b985-46ccd7350a29"
}

This will already improve their experience because when they reach the step to fill in their personal information, the email field will be previously filled by MoneyHash.

Full Billing Data

When you require your customer's billing details, such as their name and email, you can send all the necessary information to the billing_data field when creating an intent. Once this is done, MoneyHash will automatically fill in the required fields, eliminating the need for the customer to provide this information again. This not only saves time but also improves the overall experience for your customer.

{
  "billing_data": {
    "name": "John Doe",
    "first_name": "John",
    "last_name": "Doe",
    "phone_number": "+201564310000",
    "email": "[email protected]"
  },
  "amount": 50,
  "amount_currency": "USD",
  "operation": "purchase",
  "webhook_url": "https://webhook.site/4d487d3a-2644-4e48-b985-46ccd7350a29"
}