Skip to content

Let register_card send the customer back to redirect URLs - #4

Merged
martian56 merged 1 commit into
mainfrom
register-card-redirects
Oct 19, 2026
Merged

martian56 merged 1 commit into
mainfrom
register-card-redirects

Conversation

@martian56

Copy link
Copy Markdown
Owner

Closes #3

/api/1/card-registration takes optional success_redirect_url and error_redirect_url. The sandbox honours both, but register_card never sent them.

  • register_card in EpointClient and AsyncEpointClient accepts both arguments. When they are not given, it falls back to the client's success_redirect_url and error_redirect_url defaults, as the pay methods do. With neither set, nothing is sent, the same as before.
  • Unit tests cover explicit URLs, the defaults and their absence, for both the sync and async clients. A sandbox test checks that an approved card lands on the success URL and a declined one on the error URL.
  • The README has a short "Saving a card without a payment" section.

The version bump and changelog follow in a separate release PR.

Epoint's card-registration takes success_redirect_url and error_redirect_url, and the
sandbox honours them, but register_card never sent them, so a card saved without a
payment could not bring the customer back to the merchant's page. Both arguments are
now accepted by the sync and async clients and fall back to the client defaults, as
the pay methods already do.
@martian56 martian56 self-assigned this Oct 19, 2026
@martian56
martian56 merged commit d61a906 into main Oct 19, 2026
6 checks passed
@martian56
martian56 deleted the register-card-redirects branch October 19, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

register_card: accept success and error redirect URLs

1 participant