Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added expires_at option for creating payment request #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions instamojo_wrapper/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ def payment_request_create(
send_sms=False,
redirect_url=None,
webhook=None,
allow_repeated_payments=True
allow_repeated_payments=True,
expires_at=None,
):
"""
Create a Payment Request
Expand Down Expand Up @@ -261,6 +262,8 @@ def payment_request_create(
To disallow multiple successful payments on a Payment Request pass false for this field.
If this is set to false then the link is not accessible publicly after first successful
payment, though you can still access it using API(default value: True).
expires_at: str, optional
Time after which the payment request will be expired in ISO format. Max value is 600 seconds. Default is Null.

Returns
_______
Expand All @@ -287,7 +290,8 @@ def payment_request_create(
send_sms=send_sms,
redirect_url=redirect_url,
webhook=webhook,
allow_repeated_payments=allow_repeated_payments
allow_repeated_payments=allow_repeated_payments,
expires_at=expires_at
)
response = self._api_call(method='post', path='payment-requests/', **payment_request_data)
return response
Expand Down