Payment Methods

This page describes the payment methods available through the Two-Coin API and how to work with them in your integration.

Available Payment Methods

The Two-Coin platform supports various payment methods that may differ based on the user's location, currency, and other factors. The available payment methods include:

  • Credit/Debit Cards: Visa, Mastercard, American Express, and more
  • Bank Transfers: ACH, SEPA, Faster Payments, and other regional methods
  • Mobile Payments: Apple Pay, Google Pay, and regional mobile payment systems
  • E-wallets: PayPal, Skrill, Neteller, and others
  • Local Payment Methods: Region-specific options like iDEAL, Sofort, Pix, etc.

Retrieving Available Payment Methods

To get a list of payment methods available for a specific country, make a GET request to the payment-methods endpoint:

GET https://api.dev2coin.space/payment-methods?country_code=US

This will return a response like the following:

{
  "payment_methods": [
    {
      "id": "pm_credit_card",
      "name": "Credit Card",
      "description": "Pay with Visa, Mastercard, or American Express",
      "providers": ["provider_a", "provider_b"],
      "limits": {
        "min": 10,
        "max": 20000
      },
      "currencies": ["USD", "EUR", "GBP"]
    },
    {
      "id": "pm_bank_transfer",
      "name": "Bank Transfer (ACH)",
      "description": "Pay directly from your bank account",
      "providers": ["provider_c"],
      "limits": {
        "min": 50,
        "max": 50000
      },
      "currencies": ["USD"]
    },
    {
      "id": "pm_apple_pay",
      "name": "Apple Pay",
      "description": "Pay with Apple Pay",
      "providers": ["provider_a"],
      "limits": {
        "min": 10,
        "max": 10000
      },
      "currencies": ["USD", "EUR", "GBP"]
    }
    // More payment methods...
  ]
}

Payment Method Properties

PropertyDescription
idUnique identifier for the payment method
nameDisplay name for the payment method
descriptionBrief description of the payment method
providersList of provider IDs that support this payment method
limitsMinimum and maximum amounts allowed
currenciesSupported currencies for this payment method

Using Payment Methods

When creating an order, the payment method is determined by the offer selected. Each offer is associated with a specific payment method.

Integration Flow

  1. 1. Retrieve available payment methods for the user's location:
    https://api.dev2coin.space/payment-methods?country_code=US
  2. 2. Display the available payment methods to the user
  3. 3. When the user selects a payment method, fetch offers filtered by that payment method:
    https://api.dev2coin.space/offers?source_currency=USD&source_amount=100&target_currency=BTC&payment_method_id=pm_credit_card
  4. 4. Create an order with the chosen offer:
    POST https://api.dev2coin.space/orders { "offer_id": "ofr_123456", "target_address": "bc1q...", "customer_email": "[email protected]", "redirect_url": "https://your-site.com/order-complete" }

Payment Method Availability

The availability of payment methods depends on several factors:

  • Geographic Location: Some payment methods are only available in specific countries or regions
  • Currency: Payment methods may support only certain currencies
  • Amount: Some payment methods have minimum and maximum amount restrictions
  • Provider Support: Not all providers support all payment methods

Note

Always check for available payment methods dynamically rather than hardcoding them in your application. This ensures your integration adapts to changes in payment method availability.

Testing Payment Methods

In the test environment, you can use test payment methods with predefined test credentials. See the Testing section for more information on testing different payment methods.

Next Steps

Support

If you encounter any issues or have questions not addressed in this documentation, please contact our support team on Telegram at https://t.me/cs_2coin (@cs_2coin).