The Crypto Payment API is Shiba Inu’s service to integrate payment with blockchain tokens in your application. This guide provides step-by-step instructions for implementing crypto payments in your projects.

Overview

The Crypto Payment API enables you to accept cryptocurrency payments in your applications. By following this integration guide, you can implement secure, reliable crypto payment processing with minimal development effort.
If you need to check API endpoints and parameters without implementation guidance, visit the Swagger documentation for the complete API reference.

Integration Steps

1

Create a Merchant Account

Currently, merchants are being manually onboarded by the Shiba Inu team. Use the official form to apply for a merchant position.
Merchant accounts are not automatically approved. The onboarding process may take several business days.
2

Set Up Payment Request Endpoint

Create a server-side route that handles payment requests from your application.
3

Create Payment Session via API

Make a POST request to create a new payment session with required parameters.
4

Store Payment Session Data

Keep track of payment sessions in your database for status updates and verification.
5

Redirect User to Payment Page

Direct users to the payment interface to complete their transaction.
6

Handle Payment Status Updates via Webhook

Receive real-time updates about payment status from the Payment API.
Webhook payload format:
Webhook Payload
7

Implement Payment Status Checking

Allow client applications to check payment status through polling.
8

Monitor User Interaction

Detect when users abandon the payment process to handle it appropriately.

API Reference

Create Payment Session

Payment Status Values

string
Payment session created but not yet completed by the user.
string
Payment successfully completed and confirmed on the blockchain.
string
Payment was rejected or failed during processing.
string
User abandoned the payment process without completing it.

Troubleshooting

Problem: Payment status updates are not being received via webhook.Solutions:
  • Verify webhook endpoint is publicly accessible
  • Check webhook URL configuration in merchant dashboard
  • Ensure proper HTTP status codes (200) are returned
  • Monitor webhook logs for delivery failures
  • Test webhook endpoint with a simple POST request
Problem: Unable to create payment sessions via API.Solutions:
  • Verify merchant_id is correct and active
  • Check API endpoint URL and authentication
  • Ensure all required parameters are provided
  • Validate currency codes are supported
  • Check network connectivity to payment API
Problem: Users encounter issues during payment completion.Solutions:
  • Verify session_url is valid and accessible
  • Check if user has sufficient funds in their wallet
  • Ensure supported cryptocurrencies are available
  • Monitor payment page for JavaScript errors
  • Test payment flow in different browsers

Best Practices

  • Always implement proper error handling for all API calls
  • Store payment session data securely in your database
  • Use HTTPS for all webhook endpoints
  • Implement idempotency for webhook processing
  • Monitor payment success rates and user abandonment
  • Provide clear feedback to users during payment process
Never store sensitive payment information like private keys or wallet credentials. Only store session IDs and status information.