Skip to content

Create a donation order

Request

A donation-flavoured order. Unlike /orders, this route takes the parameters as plain JSON — it carries no signature check.

Security
ClientKey
Bodyapplication/jsonrequired
idstring, (uuid), <= 100 charactersrequired

Your own identifier for the order.

Example:"3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19"
currencystring(Currency)required
Enum:"USD""JMD""GBP""EUR""TTD""BBD""XCD""GYD""SRD"
Example:"JMD"
settlement_countrystring, <= 100 characters

Country the order settles in, as an ISO 3166-1 alpha-2 or alpha-3 code or the English country name. Selects the merchant's processing configuration for the currency in that country; defaults to the merchant's own country.

Example:"TT"
subtotalnumber, >= 0required
Example:1000
totalnumber, >= 0required
Example:1100
taxnumber, >= 0required
Example:100
emailstring, (email)required
Example:"buyer@example.com"
fulfilledbooleanrequired

Whether the goods have already been delivered.

Example:true
ipAddressstring

The buyer's IP address.

Example:"198.51.100.10"
referenceTransactionIdstring
Example:"order-1024"
descriptionstring
Example:"A short description."
itemsArray of objects(LineItem)
billingPersonobject(BillingPerson)
is_subscriptionboolean
Example:true
tokenizeboolean
Example:true
subscription_instructionsobject
curl -i -X POST \
  https://docs.dimepay.net/_mock/apis/v1/dime-v1/donate-orders \
  -H 'Content-Type: application/json' \
  -H 'client_key: YOUR_API_KEY_HERE' \
  -d '{
    "id": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19",
    "currency": "JMD",
    "settlement_country": "TT",
    "subtotal": 1000,
    "total": 1100,
    "tax": 100,
    "email": "buyer@example.com",
    "fulfilled": true,
    "ipAddress": "198.51.100.10",
    "referenceTransactionId": "order-1024",
    "description": "A short description.",
    "items": [
      {
        "id": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19",
        "name": "Sample Item",
        "price": 1100,
        "quantity": 1,
        "sku": "SAMPLE"
      }
    ],
    "billingPerson": {
      "name": "Sample Item",
      "email": "buyer@example.com",
      "phone": "example",
      "street": "example",
      "city": "example",
      "stateOrProvinceName": "Sample Item",
      "stateOrProvinceCode": "parameter_missing",
      "postalCode": "parameter_missing",
      "countryCode": "JM",
      "countryName": "Jamaica"
    },
    "is_subscription": true,
    "tokenize": true,
    "subscription_instructions": {
      "recurring_frequency": "WEEKLY",
      "billing_cycles": 12
    }
  }'

Responses

The donation order was created.

Bodyapplication/json
statusCodeintegerrequired

Repeats the HTTP status code.

Example:200
headersobject
bodyobjectrequired
Response
{ "statusCode": 200, "headers": {}, "body": { "message": "string", "response": null } }