v1

latestOpenAPI 3.0.32026-07-2476126451.9 KB
v1.1

Create payment Intent

Create a payment intent

post/api/v1.4/payments/intent/

Request body

idstring required
descriptionstring
amountstring decimal required

The amount to charge. The field must have no more than 14 total digits and no more than 2 decimal places.

amount_currencystring required

The currency of the amount represented by a string of alphabetic code from ISO 4217 Currency codes

operation'purchase' | 'authorize' | 'PURCHASE' | 'AUTHORIZE' | ''

The type of the current intent which can be one of 'purchase', 'authorize' or 'capture'. Note that operation is required if flow_id is not provided.

  • purchase - purchase
  • authorize - authorize
  • PURCHASE - PURCHASE
  • AUTHORIZE - AUTHORIZE
webhook_urlstring uri required

A URL that the Moneyhash server will send a POST request to with payment data after payment.

accountstring
flow_idstring

MoneyHash flow ID to be used during payment. If provided, operation shouldn't be provided.

payment_providerstring nullable

The ID of a specific payment provider method you want to directly return for the user. If not provided, the user will be presented with a list of payment providers to choose from.

{"stackTrail":"components:schemas:BaseIntent:properties:custom_fields","oasType":"schema","type":"unknown","description":"Key value pairs of any additional information you want to save with the payment."}
card_tokenstring

The ID of a card token you wish to process this payment with

bankaccount_tokenstring
tokenize_cardboolean
customerstring

The ID of a specific customer you wish to associate this payment with.

hide_amount_sidebarboolean

If set to true, the payment amount overview side panel will be hidden from the embed

hide_payment_method_selectorboolean
hide_payment_headerboolean
hide_headerboolean

if set to True, hides MoneyHash branding header from the returned embed

form_onlyboolean

Only show the payment form to the user without other payment choices.

back_urlstring uri

A URL that allows your customers to go back to your website at anytime during the payment.

top_up_walletboolean

If you want to top up a customer wallet using a payment, set this to true. If set to true, customer is required to create payment intent.

use_walletboolean

Use customer wallet to process the payment. If set to True, customer is required.

authorization_type'incremental' | 'final' | 'INCREMENTAL' | 'FINAL' | ''
  • incremental - incremental
  • final - final
  • INCREMENTAL - INCREMENTAL
  • FINAL - FINAL
show_save_card_checkboxboolean

Will show a save card checkbox if it's applicable and the user can proceed without ticking the box

allow_tokenize_cardboolean

Allowing non-embedded experience to control whether to save the card for future use

show_mandatory_save_card_checkboxboolean

Will show a save card checkbox if it's applicable and the user can NOT proceed without ticking the box

expires_after_secondsinteger

The number of seconds after which the intent will expire

show_countdown_timerboolean

Shows a countdown timer till intent expires, only valid in combination with expires_after_seconds

hidden_methodsstring[]

A list of payment methods to hide from the user

create_customerboolean

Use details in customer_details to create a new customer

{"stackTrail":"components:schemas:BaseIntent:properties:customer_details","oasType":"schema","type":"unknown","description":"Customer details to be used to create a new customer, required if `create_customer` is true"}
hide_loader_messageboolean
hide_form_header_messageboolean
hide_navigation_to_payment_methodsboolean
successful_redirect_urlstring uri

A URL to redirect to after a successful payment transaction

pending_external_action_redirect_urlstring uri

A URL to redirect to after a payment transaction pending external action

failed_redirect_urlstring uri

A URL to redirect to after a failed payment transaction

processed_redirect_urlstring uri

A URL to redirect to after a payment intent is processed

closed_redirect_urlstring uri

A URL to redirect to after a payment intent is closed

time_expired_redirect_urlstring uri

A URL to redirect to after a payment intent is expired

use_external_apiboolean

To use intent without any hosted pages. Note that your business has to be PCI compliant

ip_addressstring

User's IP address to be used inside Flows and Risk rules, used only when use_direct_api is true

payment_type'regular' | 'recurring' | 'moto' | 'installment' | 'unscheduled' | 'REGULAR' | 'RECURRING' | 'MOTO' | 'INSTALLMENT' | 'UNSCHEDULED' | ''

This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order)

  • regular - regular
  • recurring - recurring
  • moto - moto
  • installment - installment
  • unscheduled - unscheduled
  • REGULAR - REGULAR
  • RECURRING - RECURRING
  • MOTO - MOTO
  • INSTALLMENT - INSTALLMENT
  • UNSCHEDULED - UNSCHEDULED
previous_transaction_idstring

MoneyHash transaction Id as UUID. Used to link the transaction to an existing series of transactions.

{"stackTrail":"components:schemas:BaseIntent:properties:custom_webhook_headers","oasType":"schema","type":"unknown","description":"Custom headers to be sent in the webhooks."}
paying_with_network_tokenboolean

If set to true, the payment is being made with a network token

merchant_initiatedboolean

Flags the payment as a merchant-initiated transaction (MIT). It must be set to true for all MITs.

partial_walletboolean
aftboolean
vault_region'sa' | 'default' | ''
  • sa - sa
  • default - default
createdstring date-time required
modifiedstring date-time required
processed_atstring date-time nullable
last_indexed_atstring date-time nullable
sdk_cp_versionstring nullable
for_sandboxboolean required

This field used to filter data to be used in sandbox

redirect_strategy'redirect_inside_embed' | 'redirect_entire_window' | 'redirect_to_new_tab' | '' | 'null' nullable
  • redirect_inside_embed - redirect_inside_embed
  • redirect_entire_window - redirect_entire_window
  • redirect_to_new_tab - redirect_to_new_tab
intent_sdk_statestring nullable
{"stackTrail":"components:schemas:BaseIntent:properties:intent_sdk_state_details","oasType":"schema","type":"unknown","nullable":true}
mh_versionstring nullable
{"stackTrail":"components:schemas:BaseIntent:properties:risk_data","oasType":"schema","type":"unknown","nullable":true}
{"stackTrail":"components:schemas:BaseIntent:properties:provider_fields","oasType":"schema","type":"unknown","nullable":true}
success_messagestring nullable
fail_messagestring nullable
mixpanel_status'NOT_SENT' | 'SENDING' | 'SENT' | '' | 'null' nullable
  • NOT_SENT - NOT_SENT
  • SENDING - SENDING
  • SENT - SENT
mixpanel_transition_statestring nullable
{"stackTrail":"components:schemas:BaseIntent:properties:loyalty_data","oasType":"schema","type":"unknown","description":"Loyalty context attached by the SDK at method selection time. Shape: {provider_id, identifier, identifier_type}","nullable":true}
{"stackTrail":"components:schemas:BaseIntent:properties:loyalty_context","oasType":"schema","type":"unknown","description":"Loyalty earn result written by the async earn task. Shape: {earn_called, earned, points, earn_request_date}","nullable":true}
hide_retry_buttonboolean
hide_try_different_method_buttonboolean
hide_iframe_go_backboolean nullable
intent_resetedboolean nullable
do_risk_checkerboolean nullable
{"stackTrail":"components:schemas:BaseIntent:properties:fraud_data_collected","oasType":"schema","type":"unknown","nullable":true}
payment_method'CASH_OUTLET' | 'MOBILE_WALLET' | 'CARD' | 'USSD' | 'KNET' | 'CASH_COLLECTION' | 'AMAN_MASARY' | 'PAYPAL' | 'PAY_AT_FAWRY' | 'VALU' | 'SHAHRY' | 'CASH_ON_DELIVERY' | 'BANK_INSTALLMENTS' | 'BANK_TRANSFERS' | 'REFERENCE_NUMBER' | 'SELFSERVE_WALLET' | 'APPLE_PAY' | 'CLICK2PAY' | 'GOOGLE_PAY' | 'CAREEM_PAY' | 'PAY_FLEX' | 'M_PESA' | 'MOBILE_MONEY' | 'CRYPTO_WALLET' | 'NAPS' | 'FORSA' | 'SYMPL' | 'TABBY' | 'SOUHOOLA' | 'GETGO' | 'SAMSUNG_PAY' | 'QPAY' | 'TAMARA' | 'BENEFIT' | 'RAZER' | 'ININAL' | 'STC' | 'MOKAFAA' | 'SADAD' | 'EFAWATEERCOM' | 'OMANNET' | 'MADA' | 'TAPTOPAY' | 'GRABPAY' | 'GRABPAYPAYLATER' | 'SHOPEEPAY' | 'SHOPEEPAYPAYLATER' | 'ATOME' | 'TOUCHNGO' | 'BOOST' | 'PAYNOW' | 'UPI' | 'ZAINCASH' | 'WALAONE' | 'QITAF' | 'EFT' | 'CAPITEC_PAY' | '' | 'null' nullable
  • CASH_OUTLET - CASH_OUTLET
  • MOBILE_WALLET - MOBILE_WALLET
  • CARD - CARD
  • USSD - USSD
  • KNET - KNET
  • CASH_COLLECTION - CASH_COLLECTION
  • AMAN_MASARY - AMAN_MASARY
  • PAYPAL - PAYPAL
  • PAY_AT_FAWRY - PAY_AT_FAWRY
  • VALU - VALU
  • SHAHRY - SHAHRY
  • CASH_ON_DELIVERY - CASH_ON_DELIVERY
  • BANK_INSTALLMENTS - BANK_INSTALLMENTS
  • BANK_TRANSFERS - BANK_TRANSFERS
  • REFERENCE_NUMBER - REFERENCE_NUMBER
  • SELFSERVE_WALLET - SELFSERVE_WALLET
  • APPLE_PAY - APPLE_PAY
  • CLICK2PAY - CLICK2PAY
  • GOOGLE_PAY - GOOGLE_PAY
  • CAREEM_PAY - CAREEM_PAY
  • PAY_FLEX - PAY_FLEX
  • M_PESA - M_PESA
  • MOBILE_MONEY - MOBILE_MONEY
  • CRYPTO_WALLET - CRYPTO_WALLET
  • NAPS - NAPS
  • FORSA - FORSA
  • SYMPL - SYMPL
  • TABBY - TABBY
  • SOUHOOLA - SOUHOOLA
  • GETGO - GETGO
  • SAMSUNG_PAY - SAMSUNG_PAY
  • QPAY - QPAY
  • TAMARA - TAMARA
  • BENEFIT - BENEFIT
  • RAZER - RAZER
  • ININAL - ININAL
  • STC - STC
  • MOKAFAA - MOKAFAA
  • SADAD - SADAD
  • EFAWATEERCOM - EFAWATEERCOM
  • OMANNET - OMANNET
  • MADA - MADA
  • TAPTOPAY - TAPTOPAY
  • GRABPAY - GRABPAY
  • GRABPAYPAYLATER - GRABPAYPAYLATER
  • SHOPEEPAY - SHOPEEPAY
  • SHOPEEPAYPAYLATER - SHOPEEPAYPAYLATER
  • ATOME - ATOME
  • TOUCHNGO - TOUCHNGO
  • BOOST - BOOST
  • PAYNOW - PAYNOW
  • UPI - UPI
  • ZAINCASH - ZAINCASH
  • WALAONE - WALAONE
  • QITAF - QITAF
  • EFT - EFT
  • CAPITEC_PAY - CAPITEC_PAY
{"stackTrail":"components:schemas:BaseIntent:properties:recommended_payment_methods","oasType":"schema","type":"unknown","nullable":true}
{"stackTrail":"components:schemas:BaseIntent:properties:paying_network_token_payload","oasType":"schema","type":"unknown","nullable":true}
{"stackTrail":"components:schemas:BaseIntent:properties:bin_lookup_result","oasType":"schema","type":"unknown","nullable":true}
show_back_to_merchant_buttonboolean nullable
last_fraud_servicestring nullable
require_early_apple_pay_receiptboolean nullable
requires_early_receiptboolean nullable
merchant_referencestring nullable
hide_filled_billing_fieldsboolean nullable
{"stackTrail":"components:schemas:BaseIntent:properties:apple_pay_receipt","oasType":"schema","type":"unknown","nullable":true}
apple_pay_reset_method_buttonboolean nullable
{"stackTrail":"components:schemas:BaseIntent:properties:google_pay_receipt","oasType":"schema","type":"unknown","nullable":true}
{"stackTrail":"components:schemas:BaseIntent:properties:click2pay_receipt","oasType":"schema","type":"unknown","nullable":true}
{"stackTrail":"components:schemas:BaseIntent:properties:receipt","oasType":"schema","type":"unknown","nullable":true}
is_embeddedboolean nullable
merchant_originstring uri nullable
number_of_transactionsinteger nullable

Number of transactions that have been attempted for this intent.

polymorphic_ctypeinteger nullable required
agentic_tokenstring nullable

A unique customer identifier, identifier is V4 UUID

paying_bankaccount_tokenstring nullable
tokenizing_subscriptionstring nullable

The subscription that is using this intent to tokenize the customer card.

Response

idstring required

Payment intent id unique identifier

statusstring
amountnumber double required

The amount to charge. The field must have no more than 14 total digits and no more than 2 decimal places.

amount_currencystring required

The currency of the amount represented by a string of alphabetic code from ISO 4217 Currency codes

typestring required

Intent type

accountstring required

Account ID associated with the intent

custom_fieldsobject required

Associated intent's custom fields if exists

billing_dataobject required

Customer's billing data added during payment

transaction_provider_fieldsobject required

Key value pairs of any additional information needed from the payment provider

active_transactionobject required
transactions_historyobject[] required

An array of all transactions history associated with the intent

flowstring required

Associated flow id if provided while creating the intent

flow_dataobject required
is_livetrue | false
  • True - Yes
  • False - No
createdstring required

Intent creation date

{"stackTrail":"components:schemas:RetrieveIntent:properties:template","oasType":"schema","type":"unknown","nullable":true}
merchant_referencestring nullable
customerobject required
statestring required

Intent SDK state

state_detailsobject required

Intent SDK state details

customer_last_used_payment_methodstring nullable required
last_used_methodstring nullable required
payment_statusobject required