Skip to main content
All options are passed to the Reeple constructor as a single ReepleConfig object.

Required fields

FieldTypeDescription
publicKeystringYour Reeple public key (issued by Payshiga)
amountnumberPayment amount in the smallest currency unit (kobo for NGN, cents for USD, etc.)
currencyCurrencyCurrency code. See supported currencies
narrationstringShort description of the payment shown on the checkout page
customer.emailstringCustomer’s email address
customer.firstNamestringCustomer’s first name
customer.lastNamestringCustomer’s last name
customer.phoneNumberstringCustomer’s phone number (include country code, e.g. +2348012345678)
metaobjectArbitrary key-value data attached to the transaction. Pass {} if you have nothing to add
amount is always in the smallest unit of the currency — e.g. 5000 for NGN means ₦50.00 (kobo), and 5000 for USD means $50.00 (cents). See Supported Currencies for more examples.

Optional fields

FieldTypeDefaultDescription
callbackUrlstringURL Payshiga redirects to after payment. Required if you want onSuccess to fire in the browser
referencestringauto-generatedYour unique transaction reference. SDK generates one if omitted
mode'sandbox' | 'production''production'Use 'sandbox' for testing — see Sandbox / Testing

Callbacks

CallbackSignatureFires when
onSuccess(data: ReepleSuccessData) => voidPayment completes and the iframe reaches the callback URL
onClose() => voidUser closes the modal without completing payment
onError(error: Error) => voidAPI call fails, network error, or session times out (10 min)
onLoad() => voidThe payment iframe finishes loading
For the full ReepleSuccessData shape and how to verify a payment server-side, see Callbacks & Verification.

Methods

reeple.open();   // Initiates the API call and opens the payment modal
reeple.close();  // Programmatically closes the modal (fires onClose)
Calling open() while the modal is already open is a no-op.