Skip to content
← Back to Index

Message: payment.create

Creates a new Payment.

Schema

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.
externalReferencestring (optional) Optional reference to add to the payment. All must be globally unique across all payments. Can be used to locate the actor with other means than ID and Number. Generally maps to a PSP identifier in 1:1 mapping scenarios.
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

json
[{
  "type": "create",
  "body": {
    "providerKey": "stripe",
    "commands": [{
        "type": "setDynamicFields",
        "fields": {
          "paymentIntentId": "pi_3MtwBwLkdIwHu7ix28a3tqPa"
        }
      }
    ]
  }
}]

© 2024 Hantera AB. All rights reserved.