Create a payment session
POST/v1/payment/sessions
Creates a new payment session and returns the session details. With channel set to email or sms, OpenHive sends the payment link to your customer over that channel. With channel set to link, nothing is sent and the link is returned in links.payment_session_url for you to deliver. After payment completion, a webhook is sent to your configured endpoint; see callbacks below for the payload.
Request
Responses
- 200
- 201
- 400
- 403
- 422
- 503
Payment session created successfully
Payment resource created
Invalid input
Forbidden
Invalid configuration or parameters
Payment gateway unavailable
Callbacks
- POST payment.succeeded
- POST payment.failed
- POST payment.expired
- POST payment.processing
POST{$your-configured-webhook-endpoint}
[OUTGOING EVENT] Sent when a payment is successful.
[DOCUMENTATION ONLY] This webhook is sent by our system to your configured endpoint when the corresponding payment event occurs.
POST{$your-configured-webhook-endpoint}
[OUTGOING EVENT] Sent when a payment fails.
[DOCUMENTATION ONLY] This webhook is sent by our system to your configured endpoint when the corresponding payment event occurs.
POST{$your-configured-webhook-endpoint}
[OUTGOING EVENT] Sent when a payment session has expired.
[DOCUMENTATION ONLY] This webhook is sent by our system to your configured endpoint when the corresponding payment event occurs.
POST{$your-configured-webhook-endpoint}
[OUTGOING EVENT] Sent when a payment is being processed.
[DOCUMENTATION ONLY] This webhook is sent by our system to your configured endpoint when the corresponding payment event occurs.