An Execution submits a Session for payment processing. All execution endpoints return an ExecutionResponse.
Idempotency
The reference_id you provide is your idempotency key. If you are uncertain whether a request was received (e.g., due to a network timeout), do not generate a new reference_id. Query the transaction status with the original one before retrying.
importuuidimportrequestsBASE_URL="https://api.heydollr.app"headers={"Authorization":"Bearer YOUR_ACCESS_TOKEN","Content-Type":"application/json"}reference_id=str(uuid.uuid4())# store this before callingresponse=requests.post(f"{BASE_URL}/v1/executions/collection",headers=headers,json={"session_id":"55","payment_account_id":"18","currency":"USD","reference_id":reference_id,},)execution=response.json()print("Status:",execution["status"])print("Reference:",execution["reference_id"])
import{randomUUID}from"crypto";constBASE_URL="https://api.heydollr.app";constTOKEN="YOUR_ACCESS_TOKEN";constreferenceId=randomUUID();// store this before callingconstresponse=awaitfetch(`${BASE_URL}/v1/executions/collection`,{method:"POST",headers:{Authorization:`Bearer ${TOKEN}`,"Content-Type":"application/json",},body:JSON.stringify({session_id:"55",payment_account_id:"18",currency:"USD",reference_id:referenceId,}),});constexecution=awaitresponse.json();console.log("Status:",execution.status);
importjava.util.UUID;importjava.net.URI;importjava.net.http.*;importjava.net.http.HttpRequest.BodyPublishers;StringreferenceId=UUID.randomUUID().toString();// store before callingStringbody=String.format(""" { "session_id": "55", "payment_account_id": "18", "currency": "USD", "reference_id": "%s" } """,referenceId);HttpClientclient=HttpClient.newHttpClient();HttpRequestrequest=HttpRequest.newBuilder().uri(URI.create("https://api.heydollr.app/v1/executions/collection")).header("Authorization","Bearer YOUR_ACCESS_TOKEN").header("Content-Type","application/json").POST(BodyPublishers.ofString(body)).build();HttpResponse<String>response=client.send(request,HttpResponse.BodyHandlers.ofString());System.out.println(response.body());
// go get github.com/google/uuidpackagemainimport("bytes""encoding/json""fmt""io""net/http""github.com/google/uuid")funcmain(){referenceId:=uuid.New().String()// store before callingpayload:=map[string]string{"session_id":"55","payment_account_id":"18","currency":"USD","reference_id":referenceId,}body,_:=json.Marshal(payload)req,_:=http.NewRequest("POST","https://api.heydollr.app/v1/executions/collection",bytes.NewBuffer(body),)req.Header.Set("Authorization","Bearer YOUR_ACCESS_TOKEN")req.Header.Set("Content-Type","application/json")client:=&http.Client{}resp,_:=client.Do(req)deferresp.Body.Close()data,_:=io.ReadAll(resp.Body)fmt.Println(string(data))}