To download a full working project visit our examples GitHub repo
If you would like to know how Smartpay payment works, please see the checkout flow for more details.
Follow the guide bellow to create you server side integration.
Now all you need to do is call
create-smartpay-checkout anytime a shopper would like to pay using Smartpay.
You can use the following simple example for testing.
<!DOCTYPE html> <html> <head> <link href="./demo.css" rel="stylesheet" /> </head> <body> <form method="POST" action="http://127.0.0.1:5000/create-smartpay-checkout"> <button id="checkout" type="submit">Checkout</button> </form> </body> </html>
We aim to provide the smoothest developer experience, hence we make it straightforward for you to test your integration.
When testing, please use your test API keys to create a checkout session and launch Smartpay checkout (for further details on authenticating your API requests see Authentication ). In test mode the payment is not processed by card networks or payment providers. It enables you to feel safe working on the integration without having to worry about actually being charged.
Test mode checkout will show a テスト中 banner on the top left corner so you can easily verify you are using test mode.
To complete a test mode checkout you need a test user account. Please follow the instructions below to sign up as a test user to Smartpay.
Once you are redirected to Smartpay checkout, all you need to do is to use any email with a
+test suffix, e.g.
[email protected] to sign up, and it will immediately be regarded as a test account.
When prompted for a phone number please provide a valid Japanese mobile number.
Smartpay verifies the shoppers' phone number by sending a one time password via SMS to the phone number specified during sign up. For test accounts however this one time password is not sent via SMS, it is already pre-filled for you on the form.
Your test Smartpay account will come with pre-configured card numbers so you can test all the different outcomes:
4242 4242 4242 4242
- Hard decline:
4100 0000 0000 0019
- Soft decline:
4000 0000 0000 0119
For test consumers you will not be able to add your own card or use Apple Pay or Google Pay.
Updated 10 months ago