Add Zap digital bank mandate support to PaystackCore#126
Merged
Conversation
Introduce the Zap mandate API on the public `Paystack` surface:
`initiateZapMandate(_:)` initiates a mandate and `listenForZapResponse(onChannel:)`
subscribes for status updates (reusing the Pay-with-Transfer Pusher response shape).
- ZapMandateService posts to `bank/digitalbankmandate/{id}/{transactionId}`,
overriding `baseURL` to `https://standard.paystack.co`
- Make `baseURL` an overridable PaystackService requirement (defaults to
api.paystack.co) so services can target a non-default host
- Add `postForm`/`setFormBody` for application/x-www-form-urlencoded bodies
with percent-encoded fields
- Add ZapMandateRequest/ZapMandateResponse and SupportedBank models
- Decode `supported_banks` from the verify-access-code response
Tests: Zap initiate/listen, form-body encoding, and supported-banks decoding.
|
zaheer-paystack
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Introduce the Zap mandate API on the public
Paystacksurface:initiateZapMandate(_:)initiates a mandate andlistenForZapResponse(onChannel:)subscribes for status updates (reusing the Pay-with-Transfer Pusher response shape).
bank/digitalbankmandate/{id}/{transactionId}, overridingbaseURLtohttps://standard.paystack.cobaseURLan overridable PaystackService requirement (defaults to api.paystack.co) so services can target a non-default hostpostForm/setFormBodyfor application/x-www-form-urlencoded bodies with percent-encoded fieldssupported_banksfrom the verify-access-code responseTests: Zap initiate/listen, form-body encoding, and supported-banks decoding.