CoinPayment Create Payment 2 API

Simplified cryptocurrency payment creation with streamlined response for basic integration needs

Crypto Payments

CoinPayment Create Payment V2 API

A simplified version of the CoinPayments integration with a streamlined response format. Ideal for basic cryptocurrency payment flows with minimal implementation complexity.

Simplified Response

Streamlined response with essential fields only.

Easy Integration

Minimal response parsing for quick implementation.

Error Focused

Clear error reporting for easier debugging.


Endpoint Overview

MUTATION/graphql

Create a cryptocurrency payment with a simplified response format. Returns only error status, making it ideal for fire-and-forget payment initiations.

Authentication:Bearer Token

When to Use This API

Use This API When

You need simple payment initiation with redirect to CoinPayments hosted page.

Use Full API When

You need wallet address, QR code, and amount for custom checkout UI.


Request Parameters

categoryPaymentCategory!Required

The category of the payment. Values: SUBSCRIPTION, ONE_TIME, ADDON.

groupIdIntRequired

The ID of the subscription group/plan associated with the payment.

moreLoginCountIntRequired

Number of additional logins to purchase (set to 0 if not needed).

coinString!Required

The cryptocurrency to use. Examples: BTC, ETH, LTC, USDT.


GraphQL Mutation

mutation coinpaymentCreatePayment2(
  $category: PaymentCategory!
  $groupId: Int
  $moreLoginCount: Int
  $coin: String!
) {
  coinpaymentCreatePayment2(
    category: $category
    groupId: $groupId
    moreLoginCount: $moreLoginCount
    coin: $coin
  ) {
    error
  }
}

Variables:

{
  "category": "SUBSCRIPTION",
  "groupId": 1,
  "moreLoginCount": 0,
  "coin": "BTC"
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
    "query": "mutation coinpaymentCreatePayment2($category: PaymentCategory!, $groupId: Int, $moreLoginCount: Int, $coin: String!) { coinpaymentCreatePayment2(category: $category, groupId: $groupId, moreLoginCount: $moreLoginCount, coin: $coin) { error } }",
    "variables": {
      "category": "SUBSCRIPTION",
      "groupId": 1,
      "moreLoginCount": 0,
      "coin": "BTC"
    }
  }'

Response

200Payment Created Successfully
{
  "data": {
    "coinpaymentCreatePayment2": {
      "error": null
    }
  }
}
200Payment Error
{
  "data": {
    "coinpaymentCreatePayment2": {
      "error": "Invalid cryptocurrency selected"
    }
  }
}
400Request Error
{
  "errors": [
    {
      "message": "Missing required field: coin",
      "path": ["coinpaymentCreatePayment2"],
      "extensions": {
        "code": "VALIDATION_ERROR"
      }
    }
  ],
  "data": null
}

Comparison with Full API

Full API (V1)

Returns address, amount, QR code, checkout URL, status URL, and transaction ID for custom UI.

Simplified API (V2)

Returns only error status. Use when redirecting to CoinPayments hosted checkout.


Best Practices

Check Error Field

Always check if error is null before considering the payment successful.

Use for Redirects

Best used when you'll redirect users to CoinPayments' hosted checkout page.

Webhook Integration

Set up CoinPayments IPN webhooks to receive payment confirmations.

Consider Full API

If you need custom checkout UI, use the full coinpaymentCreatePayment API instead.



Choosing the Right API

Use this simplified V2 API when you want to redirect users to CoinPayments' hosted checkout. Use the full V1 API when building a custom payment UI with wallet address and QR code display.

Need Custom Checkout UI?

The full CoinPayment API provides wallet addresses, QR codes, and all details needed to build a custom cryptocurrency checkout experience.

View Full API