Initialize Payment
Initialize a new payment transaction to collect money from customers via cards, bank transfers, or mobile wallets.This endpoint creates a payment session and returns a checkout URL where customers can complete their payment securely.
Endpoint
POST/transaction/initialize
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | Required | Bearer token with your secret API key |
Content-Type | string | Required | Must be application/json |
Idempotency-Key | string | Optional | Unique key to prevent duplicate transactions |
Request Body
Customer’s email address for transaction receipt and notifications
Transaction amount in kobo (NGN) or the smallest currency unit
For ₦500.00, send
"50000" (500 × 100 kobo)Three-letter ISO currency codeSupported currencies:
NGN, USD, GBP, EUR, GHS, KES, ZARUnique transaction reference. If not provided, PayVessel will generate one automatically
URL to redirect customers after payment completion
Additional information about the transaction in key-value pairs
Payment methods to allow for this transactionAvailable channels:
card, bank, ussd, qr, mobile_money, bank_transferIf not specified, all available channels will be enabled
Customer information object
Example Request
Response
Request status indicator -
"success" or "error"Human-readable message describing the result
Transaction data object
Example Response
Integration Flow
1
Initialize Transaction
Make a POST request to
/transaction/initialize with transaction details2
Redirect Customer
Redirect your customer to the
authorization_url from the response3
Customer Completes Payment
Customer enters payment details and completes the transaction
4
Handle Callback
Customer is redirected to your
callback_url with transaction status5
Verify Transaction
Use the Verify Transaction endpoint to confirm payment status
Next Steps
After initializing a payment:Verify Payment
Confirm transaction status after payment
Handle Webhooks
Receive real-time payment notifications
Process Refunds
Handle refund requests when needed
View Transactions
Retrieve transaction history
Webhook Events
This endpoint triggers the following webhook events:transaction.pending- Transaction created and pending paymenttransaction.success- Payment completed successfullytransaction.failed- Payment failed or was declined
