Bring ShamCash payments into your app.
Your customers transfer funds to your ShamCash account. Your server reads the incoming transfers through our API, verifies the payment and credits the correct customer in your own database. Choose one of these two workflows.
1. Verify using a transaction ID
- Show your ShamCash receiving address and the requested amount in your checkout.
- After paying, the customer submits the transfer transaction ID in your app.
- One shared worker fetches incoming transfers for that linked account every 12 seconds and saves them locally. Search the local records for the submitted ID.
- Verify the receiving account, currency, amount and transfer time. Match the record to one customer request, then record the payment and update the customer balance in one database transaction.
2. Match a unique invoice reference
- Let the customer choose the amount. Create an invoice in your database with the customer, expected amount, currency, receiving account and an expiry time.
- Generate an unpredictable, unique reference such as SC-7K4M8Q. Ask the customer to put the exact reference in the ShamCash transfer note.
- The same shared polling worker saves incoming transfers. Match the exact note reference to the invoice, then verify the amount, currency, account and payment time.
- Mark the invoice paid and credit the customer atomically. The customer does not need to submit a transaction ID when the note match is valid.
Five polls per minute means one request every 12 seconds, shared across customers using the same linked account. Balance and transfer requests share the account quota (the default is 6 per minute). Coordinate all workers, respect rate-limit responses and use backoff after errors.
Make payment matching dependable
- Keep API keys on your server. Never expose them in browser code or your mobile app bundle.
- Store a unique (account_id, transaction_id) key and enforce it in the database. A retry, duplicate customer submission or two workers must not credit the same transfer twice.
- Use decimal values or integer minor units for money. Compare the expected currency and amount exactly; route mismatches for review.
- Keep requests pending while the transfer has not appeared. Two empty polls do not prove that payment failed. Apply your invoice expiry and a clear late-payment or manual-review policy.
- Never recycle invoice references. A short numeric reference can collide, and a delayed payment may arrive after an invoice expires.
- Fetch an appropriate date window and handle bounded or paginated responses. Resume from a saved watermark with an overlap, and deduplicate records so busy periods do not lose payments.
- Our API supplies account data. Invoice creation, customer crediting, refunds and the payment-matching logic belong in your application.