Initialize Transaction
Create a collection link to collect payment by initialization
Body Parameters
type
string
The type of the transaction to be initialized. This can either be fixed
or dynamic
"fixed"
Yes
currency
string
currency of the transaction. This can be NGN
or USD
. This defaults to NGN
if not specified.
"NGN"
No
reuseable
boolean
Specify if payment url should be recurring ( i.e. re-useable ) or one-time. Defaults to false
true
No
amount
number
Amount of required for the payment link. This should be set if type is fixed
1000.99
Only if type is fixed
reference
string
A unique reference to identify transaction after successful payment. Note that this overrides reuseable
property and it becomes false
"RVFGHYU3"
redirectUrl
string
Preferred payment link redirect url. Customers will be redirected to this link on payment success or failure.
No. Defaults to Terraswitch's url
message
string
Success message after a successful payment.
"Thank you for your payment"
No
description
string
Describe the payment link and its purpose.
"For donation"
No
subaccounts
array
An array of strings that holds subaccount codes if you plan to split the payment.
[ "VSA_6yhyzzkcHc" ]
No
customer
object
An object that hold the customer's (your user) details
{...}
No
customer.email
string
Email of the customer
"emmabidem@gmailcom"
Yes
customer.firstName
string
First name of the customer
"Oluwatobi"
Yes
customer.lastName
string
Last name of the customer
"Immanuel"
Yes
customer.phoneNumber
string
Phone number of the customer
"08137031202"
Yes
customer.phoneCode
string
Country code of the phone number for the customer. Use NGA +234
"+234"
No
metadata
Array of objects
[ {...} , {...} ]
No
Last updated