Set up a subscription with Nigerian cardsPrivate preview
Learn how to create and charge a subscription with Nigerian cards.
Set up a subscription using Naira card as a payment method.
Create and confirm a Subscription using two API calls. The first API call sends customer and product information to the Subscriptions API to create a Subscription and PaymentIntent in one call. The response includes a PaymentIntent ID that you must use in a Payment Intents API call to confirm a payment.
Create a product and priceDashboard
Products represent the item or service you’re selling. Prices define how much and how frequently you charge for a product. This includes how much the product costs, what currency you accept, and whether it’s a one-off or recurring charge. If you only have a few products and prices, create and manage them in the Dashboard.
This guide uses a stock photo service as an example and charges customers a 100,000 NGN monthly subscription. To model this:
- Navigate to the Add a product page.
- Enter a Name for the product.
- Enter 100,000 for the price.
- Select NGN as the currency.
- Click Save product.
After you create the product and the price, record the price ID so you can use it in subsequent steps. The pricing page displays the ID and it looks similar to this: price_
.
Note
You must convert your prices to NGN to use the payment method.
Create a SetupIntentServer-side
Create a SetupIntent to save a customer’s payment method for future payments. The SetupIntent
tracks the steps of this setup process.
The SetupIntent object contains a unique client_
. Pass it to Stripe.js on the client side to redirect your customer to our local processor’s checkout page and authorise the mandate.
Create a subscriptionServer-side
Create a subscription that has a price and a customer. Set the value of the default_
parameter to the PaymentMethod ID from the SetupIntent response.
Creating subscriptions automatically charges customers based on the preset default payment method. After a successful payment, the status in the Stripe Dashboard changes to Active
. The price that you previously set determines the amount for future billings. Learn how to create a subscription with a free trial period.
Confirm a paymentServer-side
Confirm a payment with PaymentIntents using the PaymentIntent ID from the Subscriptions response. Add the PaymentIntent ID to the URL path and set the value of the payment_
parameter to ng_
:
The PaymentIntent response includes the status requires_
. This status indicates that the customer must complete the payment with the payment method they selected to complete the PaymentIntent. After a successful payment, the subscription becomes active and saves the payment method as the default payment method.