Reserve credits
This endpoint is relevant for partners that would like to process the payments themselves. It enables you to reserve credits which will be invoiced at an agreed billing frequency (see contract, f.ex. once per quarter).
Legend
❓ - clarification will be provided
⚪️ - discontinued
⏳ - TBD
🟡 - supported but requires changes
🟢 - supported
Request
Comparison
| Term | Old API | New API | 
|---|---|---|
| Endpoint | 🟡  | |
| Authorization | 🟢 Via  | 🟡 Via the  | 
| Specify projects | 🟢 Specify multiple projects and respective volumes via  | 🟡 Single project id in  ⏳ Multi project support - TBD | 
| Specify currency | 🟢 Via  | 🟡 Via  | 
| Provide additional notes | 🟢 Via  | ⚪️ Removed | 
| Redirect to success page | 🟢 Via  | ⚪️ Partner handles success page | 
| Language | 🟢 Via  | ⚪️ Partner handles localisation | 
| Referral Code | 🟢 Via  | ⚪️ - discontinued | 
| Customer First Name | 🟢 Via  | 🟡 Via  | 
| Customer Last Name | 🟢 Via  | 🟡 Via  | 
| Customer Email | 🟢 Via  | 🟡 Via  | 
| Customer Company | 🟢 Via  | 🟡 Via  | 
| Customer Street | 🟢 Via  | 🟡 Via  | 
| Customer City | 🟢 Via  | 🟡 Via  | 
| Customer Zip | 🟢 Via  | 🟡 Via  | 
| Customer Country Code | 🟢 Via  | 🟡 Via  | 
| Customer name on certificate | 🟢 Via  | ⚪️  | 
| Skip emailing | 🟢 Via  | 🟡 Omit  | 
Examples
curl --request POST \
  --url https://sandbox.market-api.southpole.com/api/offset-certificate \
  --header 'Content-Type: application/json' \
  --data '{
  "t": "token",
  "p": {
    "300190": "2",
    "300990": "1"
  },
  "c": "USD",
  "n": "notes...",
  "r": "www.company.com",
  "l": "en",
  "rc": "referral code",
  "billing_first_name": "John",
  "billing_last_name": "Doe",
  "billing_email": "[email protected]",
  "billing_company": "Test company",
  "billing_street": "1234 Main Street, Apartment 101",
  "billing_city": "Washington",
  "billing_zip": "77578",
  "billing_country_code": "US",
  "billing_name_on_certificate": "Test name",
  "noemail": 0
}'curl --request POST \
     --url https://dcs-compensate-api-sandbox.southpole.com/v1/compensate/emission \
     --header 'accept: application/json' \
     --header 'authorization: Bearer token' \
     --header 'content-type: application/json' \
     --data '
{
     "volume": {
          "unit": "t",
          "quantity": "5"
     },
     "criteria": {
          "ids": [
               "7619267199133"
          ]
     },
     "currency": "EUR",
     "consumer": {
          "firstName": "John",
          "lastName": "Doe"
     }
}
'Response
Comparison
| Data Model (JSON path) | Old API | New API | 
|---|---|---|
| Status | 🟢 status | ⚪️ Removed in favour of the HTTP client response status field | 
| Message | 🟢 msg | ⚪️ Removed (success is indicated with HTTP 200) | 
| Order ID | 🟢 orderId | 🟡 order.id | 
| Certificate ID | 🟢 certificateId | ⏳ TBD | 
Examples
{
  "status": "ok",
  "msg": "Order saved. Certificate sent to email: [email protected]",
  "orderId": 1598959529,
  "certificateId": 1598959529
}{
  "order": {
    "consumer": {
      "firstName": "John",
      "lastName": "Doe",
      "country": "DEU"
    },
    "createdAt": "2023-01-19T13:26:31Z",
    "id": "4802296938653",
    "projects": [
      {
        "contribution": {
          "amount": "30",
          "currency": "EUR"
        },
        "id": "7619267199133",
        "volume": {
          "quantity": "5",
          "unit": "t"
        }
      }
    ],
    "status": "RESERVED",
    "totalPrice": {
      "amount": "30",
      "currency": "EUR"
    },
    "totalVolume": {
      "quantity": "5",
      "unit": "t"
    },
    "updatedAt": "2023-01-19T13:26:31Z"
  }
}Updated about 1 month ago
