POST https://api.stripay.io/v1/direct/pay
Field | Type | Required | Description |
---|---|---|---|
key | String | ✅ | Stripay merchant key |
merchantOrderId | String | ✅ | Your order id, maximum length is 64 characters |
amount | Double | ✅ | Amount, up to 2 decimal |
currency | String | ❌ | Currency, 3-letter ISO code, default USD |
successUrl | String | ✅ | Payment successful redirect url, maximum length is 1024 characters |
failUrl | String | ✅ | Payment failed redirect url, maximum length is 1024 characters |
cardNumber | String | ✅ | Credit card number, eg: 4242424242424242 |
cardExpYear | String | ✅ | Credit card expire year, eg: 2028 |
cardExpMonth | String | ✅ | Credit card expire month, eg: 08 |
cardCvc | String | ✅ | Credit card cvc, eg: 888 |
cardHolderName | String | ❌ | Credit card holder name, eg: Elon Musk |
ip | String | ✅ | Customer IP |
String | ✅ | Customer email | |
phone | String | ❌ | Customer phone number, eg: +1xxxxxxxxxxx |
billingFirstName | String | ❌ | Billing firstname |
billingLastName | String | ❌ | Billing lastname |
billingCountry | String | ❌ | Billing country, 2-letter ISO code, eg: US |
billingState | String | ❌ | Billing state, 2-letter ISO code, eg: CA |
billingCity | String | ❌ | Billing city, eg: Fullerton |
billingLine1 | String | ❌ | Billing street line 1 |
billingLine2 | String | ❌ | Billing street line 2 |
billingPostCode | String | ❌ | Billing postcode |
force3ds | Boolean | ❌ | Whether to force 3ds to be enabled, default false |
Note: Please make sure your Stripe account supports Direct payment.
POST https://api.stripay.io/v1/inline/pay
Field | Type | Required | Description |
---|---|---|---|
key | String | ✅ | Stripay merchant key |
merchantOrderId | String | ✅ | Your order id, maximum length is 64 characters |
amount | Double | ✅ | Amount, up to 2 decimal |
currency | String | ❌ | Currency, 3-letter ISO code, default USD |
successUrl | String | ✅ | Payment successful redirect url, maximum length is 1024 characters |
failUrl | String | ✅ | Payment failed redirect url, maximum length is 1024 characters |
ip | String | ✅ | Customer IP |
String | ✅ | Customer email | |
phone | String | ❌ | Customer phone number, eg: +1xxxxxxxxxxx |
billingFirstName | String | ❌ | Billing firstname |
billingLastName | String | ❌ | Billing lastname |
billingCountry | String | ❌ | Billing country, 2-letter ISO code, eg: US |
billingState | String | ❌ | Billing state, 2-letter ISO code, eg: CA |
billingCity | String | ❌ | Billing city, eg: Fullerton |
billingLine1 | String | ❌ | Billing street line 1 |
billingLine2 | String | ❌ | Billing street line 2 |
billingPostCode | String | ❌ | Billing postcode |
force3ds | Boolean | ❌ | Whether to force 3ds to be enabled, default false |
POST https://api.stripay.io/v1/checkout/pay
Field | Type | Required | Description |
---|---|---|---|
key | String | ✅ | Stripay merchant key |
merchantOrderId | String | ✅ | Your order id, maximum length is 64 characters |
amount | Double | ✅ | Amount, up to 2 decimal |
currency | String | ❌ | Currency, 3-letter ISO code, default USD |
successUrl | String | ✅ | Payment successful redirect url, maximum length is 1024 characters |
failUrl | String | ✅ | Payment failed redirect url, maximum length is 1024 characters |
ip | String | ✅ | Customer IP |
String | ✅ | Customer email | |
phone | String | ❌ | Customer phone number, eg: +1xxxxxxxxxxx |
billingFirstName | String | ❌ | Billing firstname |
billingLastName | String | ❌ | Billing lastname |
billingCountry | String | ❌ | Billing country, 2-letter ISO code, eg: US |
billingState | String | ❌ | Billing state, 2-letter ISO code, eg: CA |
billingCity | String | ❌ | Billing city, eg: Fullerton |
billingLine1 | String | ❌ | Billing street line 1 |
billingLine2 | String | ❌ | Billing street line 2 |
billingPostCode | String | ❌ | Billing postcode |
force3ds | Boolean | ❌ | Whether to force 3ds to be enabled, default false |
POST https://api.stripay.io/v1/paypal/pay
Field | Type | Required | Description |
---|---|---|---|
key | String | ✅ | Stripay merchant key |
merchantOrderId | String | ✅ | Your order id, maximum length is 64 characters |
amount | Double | ✅ | Amount, up to 2 decimal |
currency | String | ❌ | Currency, 3-letter ISO code, default USD |
successUrl | String | ✅ | Payment successful redirect url, maximum length is 1024 characters |
failUrl | String | ✅ | Payment failed redirect url, maximum length is 1024 characters |
ip | String | ✅ | Customer IP |
String | ✅ | Customer email | |
phone | String | ❌ | Customer phone number, eg: +1xxxxxxxxxxx |
billingFirstName | String | ❌ | Billing firstname |
billingLastName | String | ❌ | Billing lastname |
billingCountry | String | ❌ | Billing country, 2-letter ISO code, eg: US |
billingState | String | ❌ | Billing state, 2-letter ISO code, eg: CA |
billingCity | String | ❌ | Billing city, eg: Fullerton |
billingLine1 | String | ❌ | Billing street line 1 |
billingLine2 | String | ❌ | Billing street line 2 |
billingPostCode | String | ❌ | Billing postcode |
Field | Type | Required | Description |
---|---|---|---|
status | String | ✅ | success/fail/3ds |
statusNote | String | ❌ | Payment failed message |
redirectUrl | String | ✅ | Payment redirect url |
POST https://api.stripay.io/v1/checkout/pay
Request body:
{ "key": "098f6bcd4621d373cade4e832627b4f6", "merchantOrderId": "1", "amount": 0.99, "successUrl": "https://stripay.io/v1/success.html", "failUrl": "https://stripay.io/v1/fail.html", "ip": "38.94.109.229", "email": "[email protected]" }
Successful response body:
{ "status": "success", "statusNote": null, "redirectUrl": "https://stripay.io/v1/success.html" }
Failed response body:
{ "status": "fail", "statusNote": "No account avaliable", "redirectUrl": "https://stripay.io/v1/fail.html" }
Need to redirect to the URL of the payment/3DS page:
{ "status": "3ds", "statusNote": null, "redirectUrl": "https://checkout.stripe.com/c/pay/cs_test_xxx" }
POST https://api.stripay.io/v1/orders
Request body:
{ "key": "098f6bcd4621d373cade4e832627b4f6", "page": 1, "limit": 20 // range of [20, 100] }
Response body:
{ "total": 90, "orders": [ { "id": 1, "merchantId": 1, "merchantOrderId": "your order id", "amount": 1.99, "currency": "USD", "successUrl": "https://stripay.io/v1/success.html", "failUrl": "https://stripay.io/v1/fail.html", "email": "[email protected]", "ip": "102.171.177.216", "riskScore": 65, "status": "completed", "statusNote": null, "is3ds": false, "createdAt": "2023-02-14T12:39:13.000Z", "updatedAt": "2023-02-14T12:39:21.000Z" } ] }
POST https://api.stripay.io/v1/order
Request body:
{ "key": "098f6bcd4621d373cade4e832627b4f6", "merchantOrderId": "merchant order id", // merchantOrderId and orderId, choose one "orderId": "stripay order id" // Recommend. merchantOrderId and orderId, choose one }
Response body:
{ "order": { "id": 1, "merchantId": 1, "merchantOrderId": "your order id", "amount": 1.99, "currency": "USD", "successUrl": "https://stripay.io/v1/success.html", "failUrl": "https://stripay.io/v1/fail.html", "email": "[email protected]", "ip": "102.171.177.216", "riskScore": 0, "status": "rejected", "statusNote": "No valid payment method types for this Checkout Session.", "is3ds": false, "createdAt": "2023-01-10T03:39:53.000Z", "updatedAt": "2023-01-10T03:43:37.000Z" } }
The order status has the following values:
Test account and test credit card reference: