Developer API
Integrate with URL schemes
Launch Payment for Stripe from your app or website to process transactions. Pass customer data, amounts, and product info — then handle the callback when complete.
How it works
Your app opens a payment:// URL with parameters
Payment for Stripe launches and processes the transaction
On completion, the app redirects to your callback URL with the result
Endpoints
Create a Charge
payment://new?Process a one-time payment with amount, currency, and description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
amount | integer | Yes | Amount in cents (e.g., 1000 = $10.00) |
currency | string | No | Three-letter ISO currency code (default: USD) |
description | string | No | URL-encoded charge description |
customer | string | No | Existing Stripe customer ID |
email | string | No | Customer email for receipt |
name | string | No | URL-encoded customer name |
metadata | string | No | Custom key-value pairs (URL-encoded JSON) |
callback | string | No | URL to return to after completion |
autoprocess | boolean | No | Skip home screen and start charge immediately |
auto_return | boolean | No | Fire callback when result loads instead of waiting for the merchant to dismiss the result dialog. Default false. |
Create an Invoice
payment://cart?Create a Stripe invoice with line items from your product catalog.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
prices | string | Yes | Comma-separated price IDs with quantities (e.g., price_abc:2,price_xyz:1) |
customer | string | No | Existing Stripe customer ID |
email | string | No | Customer email for receipt |
name | string | No | URL-encoded customer name |
callback | string | No | URL to return to after completion |
auto_return | boolean | No | Fire callback when result loads instead of waiting for the merchant to dismiss the result dialog. Default false. |
Pay an Existing Invoice (iOS only)
payment://invoice?Collect an in-person payment against an existing Stripe invoice. Amount, currency, customer, and tax come from the invoice — overriding any of those is rejected. The merchant taps a card via reader / Tap to Pay / manual entry; on success the invoice is marked paid out-of-band and linked via charge_id and payment_intent_id metadata. Invoices with subscriptions, default_payment_method, or non-open status are rejected with an actionable error.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Stripe invoice ID (must start with in_) |
callback | string | No | URL to return to after completion. Receives invoice_id and payment_intent_id on success. |
metadata | string | No | Custom key-value pairs (URL-encoded JSON) merged into the PaymentIntent metadata |
autoprocess | boolean | No | Skip home screen and start charge immediately |
auto_return | boolean | No | Fire callback when result loads instead of waiting for the merchant to dismiss the result dialog. Default false. |
Handling callbacks
When the transaction completes, Payment for Stripe redirects to your callback URL with query parameters indicating the result. By default the redirect fires after the merchant dismisses the result dialog so they can take post-charge actions (email a receipt, refund). Pass auto_return=true to fire as soon as the result is known. Supported on iOS and Android.
Callback Parameters
| Parameter | Values | Description |
|---|---|---|
status | success | error | cancelled | Result of the transaction |
charge_id | string | Stripe charge ID (on success) |
invoice_id | string | Stripe invoice ID (on success, payment://invoice flow only) |
payment_intent_id | string | Stripe PaymentIntent ID (on success, payment://invoice flow only) |
error | string | Error message (on error) |
Examples
Simple charge
Charge $10.00 with just an amount
payment://new?amount=1000Charge with description
Charge €25.00 with a description
payment://new?amount=2500¤cy=eur&description=Coffee%20and%20pastryCharge with new customer
Charge $50.00 and create a customer record
payment://new?amount=5000&name=John%20Smith&[email protected]Charge existing customer
Charge $75.00 to an existing Stripe customer
payment://new?amount=7500&customer=cus_ABC123xyzCharge with metadata
Charge $100.00 with custom metadata for your records
payment://new?amount=10000&description=Invoice%20%231234&metadata=%7B%22order_id%22%3A%221234%22%2C%22location%22%3A%22Store%20A%22%7DAuto-process with callback
Skip the home screen and return to your app when done
payment://new?amount=3500&autoprocess=true&callback=myapp://payment-completeAuto-return on result
Fire the callback as soon as the result is known, instead of waiting for the merchant to dismiss the result dialog
payment://new?amount=3500&autoprocess=true&auto_return=true&callback=myapp://payment-completeInvoice with line items
Create an invoice with products from your Stripe catalog
payment://cart?prices=price_coffee:2,price_muffin:1&[email protected]Pay an existing invoice (iOS)
Collect in-person payment for an existing Stripe invoice. Returns invoice_id and payment_intent_id on success.
payment://invoice?id=in_1ABC123xyz&autoprocess=true&callback=myapp://invoice-paidComplete example
All parameters combined for a fully integrated flow
payment://new?amount=15000¤cy=usd&description=Service%20Fee&customer=cus_ABC123xyz&metadata=%7B%22invoice%22%3A%22INV-2024-001%22%7D&autoprocess=true&callback=myapp://payment-resultURL Encoding
Remember to URL-encode special characters in parameter values. Spaces become %20, curly braces become %7B and %7D.
Ready to integrate?
Download the app and start testing your integration today.