Skip to main content
POST
/
add_paypal_credits
Add PayPal Credits
curl --request POST \
  --url https://app.closerx.ai/api/add_paypal_credits/ \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '
{
  "amount": 25,
  "currency": "USD",
  "user_id": "user_12345"
}
'
{
  "payment_link": "https://xyz.com/abc?token=123",
  "status": "pending"
}

Authorizations

api_key
string
header
required

Body

application/json
amount
number<float>
required

The amount of credits (in currency) the user wants to purchase.

Example:

25

currency
string
required

The currency in which the payment will be made.

Example:

"USD"

user_id
string
required

The ID of the user purchasing the credits.

Example:

"user_12345"

Response

PayPal payment link successfully created

The PayPal payment link the user should be redirected to.

Example:

"https://xyz.com/abc?token=123"

status
string

The status of the payment link generation.

Example:

"pending"