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 fiat currency and country, make a GET request:

GET https://api.dev2coin.space/api/on_ramp/payment_methods?fiat_currency=35&country_code=US

Note: The fiat_currency parameter uses integer IDs from GET /api/dict/currencies (e.g., 35 for USD)

Query Parameters

ParameterTypeRequiredDescription
fiat_currencyintegerYesCurrency ID (e.g., 35 for USD)
country_codestringNoTwo-letter country code (ISO 3166-1)
statestringNoState/province code (for US)
provider_codesstringNoComma-separated provider codes to filter

Example Response

{
  "payment_methods": [
    {
      "code": "card",
      "name": "Credit Card",
      "icon_url": "https://assets.dev2coin.space/payment-methods/card.svg"
    },
    {
      "code": "bank_transfer",
      "name": "Bank Transfer",
      "icon_url": "https://assets.dev2coin.space/payment-methods/bank.svg"
    },
    {
      "code": "apple_pay",
      "name": "Apple Pay",
      "icon_url": "https://assets.dev2coin.space/payment-methods/apple-pay.svg"
    },
    {
      "code": "sepa",
      "name": "SEPA Direct Debit",
      "icon_url": null
    }
  ]
}

Payment Method Properties

PropertyTypeDescription
codestringPayment method code used in order creation
namestringDisplay name for the payment method
icon_urlstring | nullURL to payment method icon (may be null)

Available Payment Method Codes

card

Credit/Debit Card

bank_transfer

Bank Transfer

apple_pay

Apple Pay

paypal

PayPal

sepa

SEPA Direct Debit

ideal

iDEAL (Netherlands)

sofort

Sofort (EU)

bancontact

Bancontact (Belgium)

pix

PIX (Brazil)

yellow_card

Yellow Card (Africa)

payid

PayID (Australia)

Using Payment Methods

When creating an order, specify the payment method code from this endpoint in the payment_method field.

Integration Flow

  1. 1. Retrieve available payment methods for the user's currency and location:
    https://api.dev2coin.space/api/on_ramp/payment_methods?fiat_currency=35&country_code=US
  2. 2. Display the available payment methods to the user
  3. 3. When the user selects a payment method, fetch offers optionally filtered by that payment method:
    https://api.dev2coin.space/api/on_ramp/offers?external_user_id=user123&currency_from=35&currency_to=15&amount_from=100&country=US&payment_method=card
  4. 4. Create an order with the selected provider and payment method:
    POST https://api.dev2coin.space/api/on_ramp/orders
    {
      "provider_code": "changelly",
      "external_user_id": "user_12345",
      "external_order_id": "order_67890",
      "from_currency": 35,
      "to_currency": 15,
      "from_amount": "100.00",
      "payment_method": "card",
      "country_code": "US",
      "wallet_address": "bc1q..."
    }

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).