WooshPay OpenAPI
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Back to WooshPay Website
  1. Real-time payments
  • Online payments
    • Quick Start
    • Integration overview
    • Wooshpay JS SDK
    • Wooshpay Checkout
    • Wooshpay Direct API
    • Payment Link
    • Authorize and capture
    • Build subscriptions integration
    • Testing cards
  • After the payment
    • Payouts
    • Webhook
    • Check the webhook signatures
    • 校验webhook签名
  • Add more payment methods
    • Supported payment method
    • Cards
    • Wallets
      • Alipay
      • Alipay HK
      • Apple Pay
      • Google Pay
      • Wechat Pay
      • 微信支付
      • Kakao Pay
      • DANA
      • Boost
      • Grabpay
      • Mcash
      • Touch'n Go
      • ShopeePay
      • UnionPay
      • 9Pay
      • OVO
      • GCash
      • TrueMoney
    • Bank redirects
      • Bancontact
      • BPI
      • Trustly
      • EPS
      • Giropay
      • iDEAL
      • Przelewy24
      • FPX
    • Buy Now Pay Later
      • Klarna
    • Bank Debits
      • Sepa Direct Debit
    • Bank Transfer
      • Bank Transfer in Europe
      • Bank Transfer in United Kingdom
      • Bank Transfer in Indonesia
    • QR Payments
      • QRIS
      • PromptPay
    • Real-time payments
      • PIX
      • PayNow
      • UPI
      • SPEI
  • More payment scenarios
    • Set up future payments
    • Save payment method during payment
  • SaaS platform integration
    • Shopify Plugin
    • Shopastro 星盘
    • WooCommerce
    • Shoplazza 店匠
    • Shopline Plugin
    • Sage Connection
  • Resources
    • Supported currencies
  1. Real-time payments

SPEI

The Sistema de Pagos Electrónicos Interbancarios (SPEI) is an electronic payment system developed and operated by the Banco de México, which is Mexico’s central bank. SPEI facilitates real-time , secure electronic transfers between bank accounts within the country.

Features#

Processing currenciesMXN
Settlement currenciesUSD
Minimum transaction amount1.00 MXN
Refunds❌
Partial Refunds❌
Multiple partial refund❌
Chargeback❌

Integration Method#

Payment method enumeration values: spei
There is integration method for SPEI
1.
Direct API
2.
Checkout

Direct API#

How to integration#

For direct API integration, you can create a PaymentIntent and get url in only one step. The following is the demo of creating payment intent:
Create a PaymentIntent
A PaymentIntent is an object that represents your intent to collect payment from your customer and tracks the lifecycle of the payment process. Create a PaymentIntent on your server and specify the amount to collect and a supported currency. If you have an existing Payment Intents integration, add speithe list of payment method types.
Request Create a PaymentIntent
{
    "amount":1000,
    "currency":"BRL",
    "confirm":true,
    "payment_method_data" : {
        "type":"spei",
        "billing_details": {
            "name": "Test Name"
        }
    },
    "payment_method_options":{
        "spei":{
            "curp":"PAPP971101MASNNN01",
            "rfc_pf":"PAPP971101F15"
        }
    },
    "description": "product description",
    "merchant_order_id": "Order112344343",
    "return_url":"https://your.website"
}
Response
{
    "id": "pi_1858691017545351168",
    "object": "payment_intent",
    "created": 1731981446000,
    "livemode": true,
    "currency": "MXN",
    "amount": 1000,
    "status": "requires_action",
    "client_secret": "pi_1858691017545351168_secret_5gpILS8AXPv3yxO55TwlTEbQ",
    "next_action": {
        "type": "spei_handle_redirect",
        "spei_handle_redirect": {
            "url": "https://XXXXXXXXXXXXXXXXXXXXX"
        }
    },
    "payment_method_types": [
        "spei",
    ],
    "confirmation_method": "automatic",
    "payment_method_options": {
        "spei": {
            "curp": "PAPP971101MASNNN01",
            "rfc_pf": "PAPP971101F15"
        }
    },
    "return_url": "https://swooshtransfer.com/",
    "payment_method": "pm_1858691017415327744",
    "capture_method": "automatic"
}

Checkout#

Payment flow#

1.
Customer selects SPEI from the list of payment methods available and clicks on the Pay botton
e31bcfc8-5e54-4cae-8f18-76c8ac20e107.png
beda8d1c-df45-49ba-a43d-3454d0f7ccbe.png

Create a Session#

Request
{
    "cancel_url": "www.wooshpay.com",
    "mode": "payment",
    "success_url": "https://wooshpay.com/",
    "payment_method_types": [
        "spei"
    ],
    "line_items": [
        {
            "price_data": {
                "currency": "MXN",
                "unit_amount": 20000,
                "nickname": "apple",
                "product_data": {
                    "name": "apple"
                }
            },
            "quantity": 1
        }
    ]
}
Response
{
    "id": "cs_1858755815456899072",
    "object": "checkout.session",
    "created": 1731996895000,
    "livemode": true,
    "currency": "MXN",
    "customer": "",
    "mode": "payment",
    "status": "open",
    "url": "https://checkout.wooshpay.com/pay/cs_1858755815456899072?key=cGtfbGl2ZV9OVEUzTmpBNU16ZzRPREV3TmpReU5ETXlNREF4T2tsVGR6VkZSVEZxWm5ST2FXbDJhM3B1VVc1VGVIcE1TakUzTURnMk56VTFNakExTnpn",
    "cancel_url": "www.wooshpay.com",
    "line_items": {
        "object": "list",
        "data": [
            {
                "id": "li_1858755815473676288",
                "object": "item",
                "currency": "MXN",
                "description": "Test Product",
                "price": {
                    "id": "price_1858755815490453504",
                    "object": "price",
                    "created": 1731996895000,
                    "livemode": true,
                    "active": true,
                    "currency": "MXN",
                    "nickname": "apple",
                    "product": {
                        "id": "prod_1858755815511425024",
                        "object": "product",
                        "created": 1731996895000,
                        "livemode": true,
                        "active": true,
                        "name": "Test Product",
                        "updated": 1731996895000,
                        "images": [
                            "https://appletservice.oss-accelerate.aliyuncs.com/checkout_0517/icon0720/pic.png"
                        ]
                    },
                    "type": "one_time",
                    "unit_amount": 20,
                    "billing_scheme": "per_unit"
                },
                "quantity": 7,
                "amount_subtotal": 140,
                "amount_total": 140
            }
        ]
    },
    "payment_intent": "pi_1858755815737917440",
    "payment_method_types": [
        "spei"
    ],
    "payment_status": "unpaid",
    "success_url": "https://wooshpay.com/",
    "amount_subtotal": 140,
    "amount_total": 140,
    "billing_address_collection": "auto",
    "expires_at": 1732083295078,
    "payment_link": "",
    "client_secret": "pi_1858755815737917440_secret_7VRbujSC2ey7Wye2STHJENvx",
    "customer_creation": "if_required",
    "total_details": {
        "amount_discount": 0
    }
}

Next step#

You can add more features to your integration as needed

Webhook#

Listen to events on your WooshPay account so your integration can automatically trigger reactions. Create a webhook that mainly focuses on enabled_events and url.

Refund#

Create a refund to repay funds to your customer. You can also perform partial refunds, but not every payment method supports them. A partial refund is when you refund only part of the original transaction amount.
Modified at 2024-11-19 06:23:37
Previous
UPI
Next
Set up future payments
Built with