Parspal Create Payment API

Create payments through Parspal gateway for Iranian Rial transactions and local payment processing

Regional Payment

Parspal Create Payment API

Process payments through Parspal, a leading Iranian payment gateway. Support for local bank cards, IRR transactions, and seamless checkout for Iranian users.

Local Currency

Process payments in Iranian Rial (IRR) with local bank support.

Bank Cards

Support for Shetab network cards from all Iranian banks.

Secure Gateway

PCI-compliant payment processing with bank-level security.


Endpoint Overview

MUTATION/graphql

Create a payment through Parspal gateway. Returns a payment ID and redirect link for the user to complete payment on Parspal's secure page.

Authentication:Bearer Token

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.

moreLoginCountInt

Number of additional logins to purchase (optional).


GraphQL Mutation

mutation parspalCreatePayment(
  $category: PaymentCategory!
  $groupId: Int
  $moreLoginCount: Int
) {
  parspalCreatePayment(
    category: $category
    groupId: $groupId
    moreLoginCount: $moreLoginCount
  ) {
    payment_id
    link
    status
    message
    error_type
    error_code
  }
}

Variables:

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

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
    "query": "mutation parspalCreatePayment($category: PaymentCategory!, $groupId: Int, $moreLoginCount: Int) { parspalCreatePayment(category: $category, groupId: $groupId, moreLoginCount: $moreLoginCount) { payment_id link status message error_type error_code } }",
    "variables": {
      "category": "SUBSCRIPTION",
      "groupId": 1,
      "moreLoginCount": 0
    }
  }'

Response

payment_id

Unique identifier for the payment transaction. Use this for approval.

link

Redirect URL to Parspal's secure payment page.

status

Current status of the payment creation request.

error_code

Error code if payment creation failed. Null on success.

200Payment Created Successfully
{
  "data": {
    "parspalCreatePayment": {
      "payment_id": "PP123456789",
      "link": "https://parspal.com/payment/PP123456789",
      "status": "PENDING",
      "message": "Payment created successfully",
      "error_type": null,
      "error_code": null
    }
  }
}
400Payment Creation Error
{
  "errors": [
    {
      "message": "Invalid group ID",
      "path": ["parspalCreatePayment"],
      "extensions": {
        "code": "INVALID_GROUP"
      }
    }
  ],
  "data": null
}

Payment Flow

1

Create Payment

Call this API to create a Parspal payment and receive payment_id and redirect link.

2

Redirect to Parspal

Redirect user to the link URL for secure payment on Parspal's gateway.

3

User Completes Payment

User enters card details and completes payment on Parspal's secure page.

4

Callback Redirect

Parspal redirects user back to your site with payment_id and receipt_number.

5

Approve Payment

Call parspalApprovePayment API to verify and finalize the transaction.


Best Practices

Store Payment ID

Save payment_id immediately. You'll need it for the approval step.

Full Page Redirect

Use full page redirect to Parspal. Don't use iframes for payment pages.

Handle Callback

Set up your callback URL to receive payment_id and receipt_number after payment.

Verify Always

Always call the approve endpoint even if callback seems successful.



Two-Step Process

Parspal payments require two API calls: Create (this API) and Approve. The payment is not finalized until you call the approve endpoint with the payment_id and receipt_number.

Iranian Payment Gateway

Accept payments from Iranian users with local bank card support. Complete the flow with the approve endpoint.

View Approve Payment API