Payment Intents

Create payment forms

post/api/v1/PaymentIntents

Request

  • Base URL: https://api.payex.io
  • URL: https://api.payex.io/api/v1/PaymentIntents
  • Auth: HTTP bearer

Request body

amountinteger

Values should be in cents. For example, MYR 10.00 should be inputed as 1000. Maximum of MYR 30,000.00 for FPX, and MYR 1,000,000.00 for FPX Corporate

currencystring

Default is MYR

collection_idstring

Default collection id will be used if not provided

captureboolean

Default is 'true' to capture the payment immediately. Set to 'false' to authorize payment to be captured at a later date, using the /api/v1/Transactions/Capture endpoint. Please request from Payex Team if pre-authorization is required

customer_namestring
emailstring email
contact_numberstring
addressstring
postcodestring
citystring
statestring
countrystring
shipping_namestring
shipping_emailstring email
shipping_contact_numberstring
shipping_addressstring
shipping_postcodestring
shipping_citystring
shipping_statestring
shipping_countrystring
descriptionstring
reference_numberstring
itemsobject[]
metadataobject

Any data as long as in the form of dictionary

payment_type'card' | 'fpx' | 'ewallet' | 'instalment'

Authorized values for merchant can be retrieved using "/api/v1/Merchants/TransactionTypes"

payment_typesstring[]

Customize payment types that are visible to users for each transaction. Defaults to all 'payment_types' enabled for merchant if not specified.

show_payment_typesboolean

When 'payment_type' is specified, use this flag to determine whether all payment types are visible to users, or just the specified 'payment_type'. Default when 'payment_type' is specified is 'false', while default when 'payment_type' is unspecified is 'true'.

tokenizeboolean

"true" if Merchant wants to tokenize customer's card details, else, omit parameter

card_on_filestring

When "tokenize" is checked, a "card_on_file" will be returned to Merchant at the end of the transaction, that ID must then be stored by Merchant in order to reuse CARD ON FILE functionality

return_urlstring
callback_urlstring
accept_urlstring

Redirect URL upon accepted payment. If not provided, return_url will be used

reject_urlstring

Redirect URL upon rejected payment. If not provided, return_url will be used

noncestring

Unique identifier to be returned during payment response

sourcestring

Custom field to specify source of transaction

send_emailboolean

"true" to email payment intent link to recipient as specified by "email" parameter

single_attemptboolean

"true" if payment intent can only be attempted once and will be deactivated after the attempt regardless of payment status. "false" if payment intent can be reattempted multiple times and will only be deactivated once "expiry_date" of payment intent has passed

expiry_datestring datetime

Expiry date of the payment intent, after which the payment intent will no longer be valid. Parameter should be in UTC timezone, following the format of the example. Default is 2 day after creation

Example request

[
  {
    "amount": 1000,
    "currency": "MYR",
    "items": [
      {
        "product_id": 1,
        "product_name": "test product",
        "price": 10,
        "weight": 5
      }
    ],
    "metadata": {
      "id": 1,
      "color": "blue"
    },
    "expiry_date": "yyyy-MM-ddTHH:mm:ssZ",
    "splits": [
      {
        "amount": 1000,
        "destination": "contact@payex.io",
        "type": "platform",
        "description": "Platform commission fees"
      }
    ]
  }
]

Response

Success

status'00' | '99'
messagestring

Changes

No recorded changes to this operation across all 1 revision of this API.