> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.simjuno.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.simjuno.com/_mcp/server.

# Payment Crypto Create

POST https://api.simjuno.com/v1/payments/crypto
Content-Type: application/json

Create a crypto payment link

Reference: https://docs.simjuno.com/api-reference/payments/payment-crypto-create

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: SimJuno API
  version: 1.0.0
paths:
  /payments/crypto:
    post:
      operationId: payment-crypto-create
      summary: Payment Crypto Create
      description: Create a crypto payment link
      tags:
        - payments
      parameters:
        - name: x-api-key
          in: header
          description: API key generated from the dashboard (Settings → API Keys).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/payments_payment-crypto-create_Response_200
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                purchase:
                  $ref: >-
                    #/components/schemas/PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase
                coupon_code:
                  type: string
                return_url:
                  type: string
                  format: uri
              required:
                - purchase
servers:
  - url: https://api.simjuno.com/v1
    description: https://api.simjuno.com/v1
components:
  schemas:
    PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchaseOneOf0Data:
      type: object
      properties:
        name:
          type: string
        location_logo:
          type: string
        slug:
          type: string
        count:
          type: number
          format: double
          default: 1
        amount:
          type: number
          format: double
      required:
        - name
        - location_logo
        - slug
        - amount
      title: >-
        PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchaseOneOf0Data
    PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase0:
      type: object
      properties:
        type:
          type: string
          enum:
            - esim
        data:
          $ref: >-
            #/components/schemas/PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchaseOneOf0Data
      required:
        - type
        - data
      title: PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase0
    PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchaseOneOf1Data:
      type: object
      properties:
        esim:
          type: string
        slug:
          type: string
        amount:
          type: number
          format: double
      required:
        - esim
        - slug
        - amount
      title: >-
        PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchaseOneOf1Data
    PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase1:
      type: object
      properties:
        type:
          type: string
          enum:
            - topup
        data:
          $ref: >-
            #/components/schemas/PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchaseOneOf1Data
      required:
        - type
        - data
      title: PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase1
    PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchaseOneOf2Data:
      type: object
      properties:
        amount:
          type: number
          format: double
      required:
        - amount
      title: >-
        PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchaseOneOf2Data
    PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase2:
      type: object
      properties:
        type:
          type: string
          enum:
            - balance
        data:
          $ref: >-
            #/components/schemas/PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchaseOneOf2Data
      required:
        - type
        - data
      title: PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase2
    PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase:
      oneOf:
        - $ref: >-
            #/components/schemas/PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase0
        - $ref: >-
            #/components/schemas/PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase1
        - $ref: >-
            #/components/schemas/PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase2
      title: PaymentsCryptoPostRequestBodyContentApplicationJsonSchemaPurchase
    payments_payment-crypto-create_Response_200:
      type: object
      properties:
        message:
          type: string
        redirect_url:
          type: string
      required:
        - message
        - redirect_url
      title: payments_payment-crypto-create_Response_200
    ErrorBadRequestIssuesItems:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: ErrorBadRequestIssuesItems
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The error code
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ErrorBadRequestIssuesItems'
          description: An array of issues that were responsible for the error
      required:
        - message
        - code
      description: The error information
      title: error.BAD_REQUEST
    ErrorUnauthorizedIssuesItems:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: ErrorUnauthorizedIssuesItems
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The error code
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ErrorUnauthorizedIssuesItems'
          description: An array of issues that were responsible for the error
      required:
        - message
        - code
      description: The error information
      title: error.UNAUTHORIZED
    ErrorForbiddenIssuesItems:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: ErrorForbiddenIssuesItems
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The error code
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ErrorForbiddenIssuesItems'
          description: An array of issues that were responsible for the error
      required:
        - message
        - code
      description: The error information
      title: error.FORBIDDEN
    ErrorInternalServerErrorIssuesItems:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      title: ErrorInternalServerErrorIssuesItems
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The error code
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ErrorInternalServerErrorIssuesItems'
          description: An array of issues that were responsible for the error
      required:
        - message
        - code
      description: The error information
      title: error.INTERNAL_SERVER_ERROR
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key generated from the dashboard (Settings → API Keys).

```

## Examples



**Request**

```json
{
  "purchase": {
    "type": "string",
    "data": {
      "name": "string",
      "location_logo": "string",
      "slug": "string",
      "amount": 1.1
    }
  }
}
```

**Response**

```json
{
  "message": "string",
  "redirect_url": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.simjuno.com/v1/payments/crypto"

payload = { "purchase": {
        "type": "string",
        "data": {
            "name": "string",
            "location_logo": "string",
            "slug": "string",
            "amount": 1.1
        }
    } }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.simjuno.com/v1/payments/crypto';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"purchase":{"type":"string","data":{"name":"string","location_logo":"string","slug":"string","amount":1.1}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.simjuno.com/v1/payments/crypto"

	payload := strings.NewReader("{\n  \"purchase\": {\n    \"type\": \"string\",\n    \"data\": {\n      \"name\": \"string\",\n      \"location_logo\": \"string\",\n      \"slug\": \"string\",\n      \"amount\": 1.1\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.simjuno.com/v1/payments/crypto")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"purchase\": {\n    \"type\": \"string\",\n    \"data\": {\n      \"name\": \"string\",\n      \"location_logo\": \"string\",\n      \"slug\": \"string\",\n      \"amount\": 1.1\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.simjuno.com/v1/payments/crypto")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"purchase\": {\n    \"type\": \"string\",\n    \"data\": {\n      \"name\": \"string\",\n      \"location_logo\": \"string\",\n      \"slug\": \"string\",\n      \"amount\": 1.1\n    }\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.simjuno.com/v1/payments/crypto', [
  'body' => '{
  "purchase": {
    "type": "string",
    "data": {
      "name": "string",
      "location_logo": "string",
      "slug": "string",
      "amount": 1.1
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.simjuno.com/v1/payments/crypto");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"purchase\": {\n    \"type\": \"string\",\n    \"data\": {\n      \"name\": \"string\",\n      \"location_logo\": \"string\",\n      \"slug\": \"string\",\n      \"amount\": 1.1\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["purchase": [
    "type": "string",
    "data": [
      "name": "string",
      "location_logo": "string",
      "slug": "string",
      "amount": 1.1
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.simjuno.com/v1/payments/crypto")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```