Message: payment.create
Back to IndexCreates a new Payment.
Schema
Body
currencyCode | string ISO-4217 currency code (recommended), or a custom code. |
providerKey | string (optional) A key used for indicating external provider used to enable Payment Provider Integrations. |
externalReference | string (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. |
commands | array 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:
Examples
Create New Order
POST https://<hantera-hostname>/resources/actors/payment/newAuthorization: Bearer <YOUR TOKEN>Content-Type: application/json
[{ "type": "create", "body": { "providerKey": "stripe", "commands": [{ "type": "setDynamicFields", "fields": { "paymentIntentId": "pi_3MtwBwLkdIwHu7ix28a3tqPa" } } ] }}]curl -i -X POST \ https://<hantera-hostname>/resources/actors/payment/new \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '[{ "type": "create", "body": { "providerKey": "stripe", "commands": [{ "type": "setDynamicFields", "fields": { "paymentIntentId": "pi_3MtwBwLkdIwHu7ix28a3tqPa" } } ] }}]'Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/actors/payment/new" `-Method POST `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"} `-Body '[{ "type": "create", "body": { "providerKey": "stripe", "commands": [{ "type": "setDynamicFields", "fields": { "paymentIntentId": "pi_3MtwBwLkdIwHu7ix28a3tqPa" } } ] }}]'