---
updatedAt: 2026-07-28T09:00:00.000Z
agentTools:
  projectIndex: https://docs.onramper.com/llms.txt
---

# Initiate a Transaction (V2)

Creates a checkout session bound to the end user's IP and returns the URL to redirect them to.

**This endpoint requires a Signature V2 request.** Sign every call with your Ed25519 key and send `x-onramper-signature`, `x-onramper-timestamp` and `x-onramper-nonce`. There is no API-key-only mode: an unsigned or invalid request returns 401. See [API: Sign requests (V2)](https://docs.onramper.com/docs/api-sign-requests-v2).

The body is the same as `POST /checkout/intent`, plus `endUserIpHash` (required) and `platform`. Both are covered by the signature, so build them before you sign. `clientIpHash` remains accepted as a deprecated alias.

Step-by-step integration guide: [Checkout V2](https://docs.onramper.com/docs/checkout-v2). Widget integrations do not call this endpoint. They pass `endUserIpHash` as a signed URL parameter instead: [Widget: Sign a URL (V2)](https://docs.onramper.com/docs/widget-sign-a-url-v2#bind-the-session-to-the-end-users-ip).

Redirect the browser to `redirectUrl` exactly as returned. It carries a one-time resume token, so treat it as a credential. Each session is single-use and expires 10 minutes after intent.

🛠️ Please Use [https://api-stg.onramper.com/](https://api-stg.onramper.com/) For Test Environments

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Onramper API Collection V2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.onramper.com"
    },
    {
      "url": "https://api-stg.onramper.com"
    }
  ],
  "tags": [
    {
      "name": "Transactions"
    }
  ],
  "paths": {
    "/checkout/v2/intent": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Initiate a Transaction (V2)",
        "description": "Creates a checkout session bound to the end user's IP and returns the URL to redirect them to.\n\n**This endpoint requires a Signature V2 request.** Sign every call with your Ed25519 key and send `x-onramper-signature`, `x-onramper-timestamp` and `x-onramper-nonce`. There is no API-key-only mode: an unsigned or invalid request returns 401. See [API: Sign requests (V2)](https://docs.onramper.com/docs/api-sign-requests-v2).\n\nThe body is the same as `POST /checkout/intent`, plus `endUserIpHash` (required) and `platform`. Both are covered by the signature, so build them before you sign. `clientIpHash` remains accepted as a deprecated alias.\n\nStep-by-step integration guide: [Checkout V2](https://docs.onramper.com/docs/checkout-v2). Widget integrations do not call this endpoint. They pass `endUserIpHash` as a signed URL parameter instead: [Widget: Sign a URL (V2)](https://docs.onramper.com/docs/widget-sign-a-url-v2#bind-the-session-to-the-end-users-ip).\n\nRedirect the browser to `redirectUrl` exactly as returned. It carries a one-time resume token, so treat it as a credential. Each session is single-use and expires 10 minutes after intent.\n\n🛠️ Please Use [https://api-stg.onramper.com/](https://api-stg.onramper.com/) For Test Environments",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "pk_prod_01HETEQF46GSK6BS5JWKDF31BT"
          },
          {
            "name": "x-onramper-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ed25519 signature over the canonical request, prefixed with `v2:`.",
            "example": "v2:MEUCIQDKZf3L8gT2x..."
          },
          {
            "name": "x-onramper-timestamp",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "ISO 8601 timestamp used in the signature.",
            "example": "2024-01-15T10:30:00.000Z"
          },
          {
            "name": "x-onramper-nonce",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "UUID v4, unique per request. A reused nonce is rejected.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "required": [
                  "onramp",
                  "source",
                  "destination",
                  "amount",
                  "type",
                  "paymentMethod",
                  "endUserIpHash"
                ],
                "properties": {
                  "onramp": {
                    "type": "string",
                    "description": "Provider to transact with, as returned by the quote you selected.",
                    "example": "moonpay"
                  },
                  "source": {
                    "type": "string",
                    "description": "Source currency. Fiat for a buy, crypto for a sell.",
                    "example": "eur"
                  },
                  "destination": {
                    "type": "string",
                    "description": "Destination currency. Crypto for a buy, fiat for a sell.",
                    "example": "btc"
                  },
                  "amount": {
                    "type": "number",
                    "description": "Amount in the source currency. Must be greater than 0.",
                    "example": 300
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "buy",
                      "sell"
                    ],
                    "description": "Transaction direction.",
                    "example": "buy"
                  },
                  "paymentMethod": {
                    "type": "string",
                    "description": "Payment method identifier from the quote.",
                    "example": "creditcard"
                  },
                  "network": {
                    "type": "string",
                    "description": "Crypto network for the destination asset. Required for a buy.",
                    "example": "bitcoin"
                  },
                  "endUserIpHash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$",
                    "minLength": 64,
                    "maxLength": 64,
                    "description": "Lowercase hex SHA256 of the end user's IP address, hashed on your backend. Onramper matches the IP of the browser that opens the session against this value and rejects a mismatch with 403. Uppercase hex is rejected.",
                    "example": "3b7a4f1c8e2d5a9b6c0f3e8d1a4b7c2e5f8a1d4b7c0e3f6a9b2c5d8e1f4a7b0c"
                  },
                  "clientIpHash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$",
                    "minLength": 64,
                    "maxLength": 64,
                    "deprecated": true,
                    "description": "Deprecated alias for `endUserIpHash`, still accepted. If both are sent, `endUserIpHash` is used."
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "web",
                      "mobile-ios",
                      "mobile-android",
                      "webview-ios",
                      "webview-android",
                      "browser-extension",
                      "desktop"
                    ],
                    "description": "Where your integration runs. Send the same value you used on the quotes call. Providers that require platform whitelisting are unavailable when this is absent.",
                    "example": "mobile-ios"
                  },
                  "wallet": {
                    "type": "object",
                    "description": "End user's wallet. Required for a buy.",
                    "required": [
                      "address"
                    ],
                    "properties": {
                      "address": {
                        "type": "string",
                        "description": "Destination wallet address.",
                        "example": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
                      },
                      "memo": {
                        "type": "string",
                        "description": "Memo or tag, for chains that need one."
                      }
                    }
                  },
                  "country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country of the end user. Derived from the request when omitted.",
                    "example": "de"
                  },
                  "subdivision": {
                    "type": "string",
                    "description": "ISO 3166-2 subdivision, where the provider requires it (for example US states).",
                    "example": "NY"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "End user's email, prefilled at the provider.",
                    "example": "satoshi@gmx.com"
                  },
                  "partnerContext": {
                    "type": "string",
                    "description": "Opaque value echoed back on webhooks and transaction reads. Use it to correlate with your own order id.",
                    "example": "123-CLIENT-ORDER-ID-456"
                  },
                  "externalCustomerId": {
                    "type": "string",
                    "description": "Your identifier for the end user."
                  },
                  "uuid": {
                    "type": "string",
                    "description": "Client-generated request id, useful for tracing.",
                    "example": "6756256e-d07f-42f0-a873-4d992eec8a2e"
                  },
                  "originatingHost": {
                    "type": "string",
                    "description": "Host the flow originates from. Overridden with the verified request origin when one is present.",
                    "example": "buy.onramper.com"
                  },
                  "allowOnrampPmSelection": {
                    "type": "boolean",
                    "description": "Let the provider offer its own payment-method picker."
                  },
                  "targetContractAddress": {
                    "type": "string",
                    "description": "Contract address for token purchases that are not a listed asset."
                  },
                  "supportedParams": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Provider-facing extras, including `theme` for widget styling and `partnerData.redirectUrl.success` for the post-purchase return URL."
                  },
                  "metaData": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Free-form key/value pairs stored with the session."
                  }
                },
                "example": {
                  "onramp": "moonpay",
                  "source": "eur",
                  "destination": "btc",
                  "amount": 100,
                  "type": "buy",
                  "paymentMethod": "creditcard",
                  "network": "bitcoin",
                  "uuid": "6756256e-d07f-42f0-a873-4d992eec8a2e",
                  "originatingHost": "buy.onramper.com",
                  "partnerContext": "123-CLIENT-ORDER-ID-456",
                  "email": "satoshi@gmx.com",
                  "wallet": {
                    "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
                  },
                  "supportedParams": {
                    "theme": {
                      "isDark": false,
                      "themeName": "light-theme",
                      "primaryColor": "#241D1C",
                      "secondaryColor": "#FFFFFF",
                      "primaryTextColor": "#141519",
                      "secondaryTextColor": "#6B6F80",
                      "cardColor": "#F6F7F9"
                    },
                    "partnerData": {
                      "redirectUrl": {
                        "success": "http%3A%2F%2Fredirecturl.com%2F"
                      }
                    }
                  },
                  "endUserIpHash": "3b7a4f1c8e2d5a9b6c0f3e8d1a4b7c2e5f8a1d4b7c0e3f6a9b2c5d8e1f4a7b0c",
                  "platform": "mobile-ios"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Content-Type": {
                "schema": {
                  "type": "string",
                  "example": "application/json"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "redirectUrl",
                    "sessionId"
                  ],
                  "properties": {
                    "redirectUrl": {
                      "type": "string",
                      "description": "Send the end user's browser here, unmodified. Carries the session id and a one-time resume token.",
                      "example": "https://buy.onramper.com?session=01ABCDEFGHIJKLMNOPQRSTUVWX&resumeToken=8f2c1d5e9a3b7c0f"
                    },
                    "sessionId": {
                      "type": "string",
                      "description": "Checkout session id. Single-use, expires 10 minutes after intent.",
                      "example": "01ABCDEFGHIJKLMNOPQRSTUVWX"
                    },
                    "resumeToken": {
                      "type": "string",
                      "description": "Capability token for resuming the session. Already embedded in `redirectUrl`; treat it as a credential.",
                      "example": "8f2c1d5e9a3b7c0f"
                    }
                  }
                },
                "example": {
                  "redirectUrl": "https://buy.onramper.com?session=01ABCDEFGHIJKLMNOPQRSTUVWX&resumeToken=8f2c1d5e9a3b7c0f",
                  "sessionId": "01ABCDEFGHIJKLMNOPQRSTUVWX",
                  "resumeToken": "8f2c1d5e9a3b7c0f"
                }
              }
            }
          },
          "400": {
            "description": "`endUserIpHash` is missing or is not a 64-character hex SHA256 hash",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "clientIpHash is required and must be a 64-character hex SHA256 hash"
                    }
                  }
                },
                "example": {
                  "message": "clientIpHash is required and must be a 64-character hex SHA256 hash"
                }
              }
            }
          },
          "401": {
            "description": "Signature missing, expired, replayed or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorId": {
                      "type": "integer",
                      "description": "Internal error code. 4011 is a signature validation failure.",
                      "example": 4011
                    },
                    "message": {
                      "type": "string",
                      "example": "Signature validation failed. Please check your signature and try again."
                    }
                  }
                },
                "example": {
                  "errorId": 4011,
                  "message": "Signature validation failed. Please check your signature and try again."
                }
              }
            }
          }
        }
      }
    }
  }
}
```