This page describes the payment methods available through the Two-Coin API and how to work with them in your integration.
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:
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...
]
}
Property | Description |
---|---|
id | Unique identifier for the payment method |
name | Display name for the payment method |
description | Brief description of the payment method |
providers | List of provider IDs that support this payment method |
limits | Minimum and maximum amounts allowed |
currencies | Supported currencies for this payment method |
When creating an order, the payment method is determined by the offer selected. Each offer is associated with a specific payment method.
https://api.dev2coin.space/payment-methods?country_code=US
https://api.dev2coin.space/offers?source_currency=USD&source_amount=100&target_currency=BTC&payment_method_id=pm_credit_card
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"
}
The availability of payment methods depends on several factors:
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.
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.
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).