Skip to content

Message: payment.create

Back to Index

Creates a new Payment.

Body
currencyCodestring

ISO-4217 currency code (recommended), or a custom code.

providerKeystring (optional)

A key used for indicating external provider used to enable Payment Provider Integrations.

commandsarray of command (optional)

An array of payment commands to be applied upon creation. If any command fail, the payment will not be created.

Response Type string

Rule Hooks

During the create message, the following Rule Hooks are run in the given order:

  1. OnPaymentBeforeCreated
  2. OnPaymentCreated
  3. OnPaymentCommands

Examples

Create New Order

POST https://<hantera-hostname>/resources/actors/payment/new
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
[{
"type": "create",
"body": {
"providerKey": "stripe",
"commands": [{
"type": "setDynamicFields",
"fields": {
"paymentIntentId": "pi_3MtwBwLkdIwHu7ix28a3tqPa"
}
}
]
}
}]
Back to Index